Could not able to fetch data in datasource in Tableau Desktop,Throws below error - tableau-api

Unable to complete action
[Hortonworks][HiveODBC] (80) Syntax or semantic analysis error thrown in server while execurint query. Error message from server: Error while compiling statement: FAILED: SemanticException Line 0:-1 Argument type mismatch 'TOK_NULL': The expression after ELSE should have the same type as those after THEN: "date" is expected but "timestamp" is found
Error Code: 9F80FB23

It tells you what the problem is. check your query.
The expression after ELSE should have the same type as those after THEN: "date" is expected but "timestamp" is found

Related

Redshift Json extract path text

Hi I was using this code to extract data from a column it was working, but I am now getting an error message. Any input is appreciated.
SQL Error [XX000]: ERROR: JSON parsing error
Detail:
error: JSON parsing error
code: 8001
context: invalid json object false
query: 6047879
location: funcs_json.hpp:127
process: query1_117_6047879 [pid=6614]
select json_extract_path_text (info,'device_category') as device_category
from admin.project

Jmeter: BeanshellAssertion Error: Method Not Found In Class

I simply want to read response from jdbc sampler and use it in an http request.
I created a BeanShellAssertion Script under a jdbc request and wrote just the below code, nothing else.
if(vars.getObjects("jdbcresult1").size!=0)
{
String jdbcresult1=vars.getObjects("jdbcresult1").get(0).get("jdbctrackingnumber1")+"";
vars.put("trackingnumber1",jdbcresult1);
log.info("TrackingNumber1 is: "+trackingnumber1);
}
Error:
2020-08-13 23:32:47,030 ERROR o.a.j.u.BeanShellInterpreter: Error
invoking bsh method: eval Sourced file: inline evaluation of: ``import
java.lang.Object; if(vars.getObjects("jdbcresult1").size!=0) {
String . . . '' : Error in method invocation: Method getObjects(
java.lang.String ) not found in
class'org.apache.jmeter.threads.JMeterVariables'
2020-08-13 23:32:47,030 WARN o.a.j.a.BeanShellAssertion: Error in
BeanShellAssertion
Question1: How do you decide what should you use to write a code to read jdbcresponse value:
a. beanshellassertion
b. beanshellpostprocessor
c. beanshelllistener
Question2: Solution to the original problem, to resolve the error ?
The problem is that:
vars.getObjects(...)
does not exist.
It should be :
vars.getObject(...)
See:
https://jmeter.apache.org/api/org/apache/jmeter/threads/JMeterVariables.html
Also it’s better to use JSR223 Assertion:
https://jmeter.apache.org/usermanual/component_reference.html#JSR223_Assertion

How to merge from SpatialLite to PostGIS?

How can I merge a SpatiaLite database to a PostGIS database?
I tried to use pgloader with the following command:
pgloader db.sqlite3 postgresql:///mydb
But it is not working. (I guess it is not supported). Please see the error output:
KABOOM!
FATAL error: Could not prepare an sqlite statement.
Code ERROR: no such module: VirtualSpatialIndex.
Database: /tmp/db.sqlite3
SQL: PRAGMA table_info(`SpatialIndex`)
An unhandled error condition has been signalled:
Could not prepare an sqlite statement.
Code ERROR: no such module: VirtualSpatialIndex.
Database: /tmp/db.sqlite3
SQL: PRAGMA table_info(`SpatialIndex`)
FATAL: Failed to start the monitor thread.
error opening #P"/tmp/pgloader/pgloader.log": Permission denied
I use in SpatialLite only the simple POINT field. Nothing else from SpatialLite. (With Lat/Lng values)
EDIT1:
#Corion
If I try to do your way I get no error doing this:
pgloader --before load_spatialite.sql db.sqlite3
But loading it to PostGIS with this command:
pgloader --before load_spatialite.sql db.sqlite3 postgresql:///mydb
gives me the following error message:
2018-10-10T11:29:16.056000Z ERROR Database error 42883: function load_extension(unknown) does not exist
HINT: No function matches the given name and argument types. You might need to add explicit type casts.
QUERY: SELECT load_extension('mod_spatialite')
KABOOM!
FATAL error: Database error 42883: function load_extension(unknown) does not exist
HINT: No function matches the given name and argument types. You might need to add explicit type casts.
QUERY: SELECT load_extension('mod_spatialite')
An unhandled error condition has been signalled:
Database error 42883: function load_extension(unknown) does not exist
HINT: No function matches the given name and argument types. You might need to add explicit type casts.
QUERY: SELECT load_extension('mod_spatialite')
What I am doing here?
Database error 42883: function load_extension(unknown) does not exist
HINT: No function matches the given name and argument types. You might need to add explicit type casts.
QUERY: SELECT load_extension('mod_spatialite')
What is here the problem?
SpatiaLite is an extension built into SQLite. You will need an SQLite binary / library that is built with SpatiaLite linked statically or load the SpatiaLite dynamic extension (see link) while importing.
From staring at the pgloader manpage, it seems that you can prepend SQL commands to load the SpatiaLite extension into SQLite like this:
pgloader --before load_spatialite.sql /tmp/db.sqlite3
and load_spatialite.sql contains
SELECT load_extension('mod_spatialite');
You may or may not need to set up additional environment variables such that dynamic libraries are found for your process.

RDBMS to MongoDB using Talend 6.1.2 throwing error

I am trying to convert data from ORacle to MongoDB JSON format . But when trying to convert, I am getting following error when writing to JSON field. can anyone help. I have attached the flow and the mapping
Error message
tarting job ora2mongo at 03:14 17/08/2018.
[statistics] connecting to socket on port 4071
[statistics] connected
Exception in thread "main" java.lang.Error: Unresolved compilation problems:
Incorrect number of arguments for type Queue<E>; it cannot be parameterized with arguments <>
Syntax error on token "null", delete this token
Syntax error on token "null", delete this token
Syntax error on token "null", delete this token
queue cannot be resolved or is not a field
queue cannot be resolved to a variable
queue cannot be resolved or is not a field
queue cannot be resolved to a variable
Syntax error, insert "AssignmentOperator Expression" to complete Assignment
Syntax error, insert ";" to complete Statement
The left-hand side of an assignment must be a variable
Syntax error on token "null", invalid ClassType
Syntax error, insert "new ClassType ( )" to complete Expression
Syntax error, insert "AssignmentOperator Expression" to complete Assignment
Syntax error, insert ";" to complete Statement
Syntax error on token "null", invalid ClassType
Syntax error, insert "new ClassType ( )" to complete Expression
at rdbms_to_mongo.ora2mongo_0_1.ora2mongo.tOracleInput_1Process(ora2mongo.java:3156)
[statistics] disconnected
at rdbms_to_mongo.ora2mongo_0_1.ora2mongo.tOracleConnection_1Process(ora2mongo.java:550)
at rdbms_to_mongo.ora2mongo_0_1.ora2mongo.runJobInTOS(ora2mongo.java:5272)
at rdbms_to_mongo.ora2mongo_0_1.ora2mongo.main(ora2mongo.java:5129)
Job ora2mongo ended at 03:14 17/08/2018. [exit code=0]

Is DB2 CLPPLUS editor able to do xquery

I am new to the CLPPlus editor and I'm trying a simple query that works if I execute it from a file like this
db2 -td% -svf C:\query.sql
and the query.sql file contains:
SELECT tx.ID,XMLQUERY('for $e in $d/Client/Address return data($e)' passing tx.contactinfo as "d") FROM clients tx %
If I just place the query as it is in the CLP or CLPPLUS editor as it is I get errors.
Error FROM CLP: SQL0104N An unexpected token "for $e in $d/Client/Ad"
was found following "LECT tx.ID,XMLQUERY(". Expected tokens may
include: "
Error from CLPPLUS: SQL16002N An XQuery expression has an unexpected
token "in" following "for ". Expected tokens may include: "is". Error
QName=err:XPST0003.