Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anjali3
Contributor
Contributor

tbigquerysqlrow component - Multiple queries issue

Hi ,

 

Im trying to execute tbigquerysqlrow component with Multiple statements.(with delete and insert or delete and delete).

But i get null pointer exception when i execute the job. Does this component allows multiple select statements , if yes what is the syntax. Thank you

Labels (2)
1 Solution

Accepted Solutions
Anonymous
Not applicable

Happy to help!

If it worked, you can accept it as solution. So that if anyone else has the same issue, can refer it.

Don't forget to give kudos if the reply worked!0683p000009MACn.png

 

Regards.

View solution in original post

8 Replies
Anonymous
Not applicable

Hi,

I faced the same issue a while ago. It was because of the connection wasn't successful. You can check for the error by printing ((String)globalMap.get("tBigQueryInput_1_ERROR_MESSAGE")). Make sure all the credentials are correct.

Hope this helps.

 

Regards

Anjali3
Contributor
Contributor
Author

Hi ,

 

Thanks for your reply. I tried printing. But it says null. Below is the syntax im trying to run. Moreover with single query. It is running fine. So connection details should be fine. Let me know if this syntax holds good for multiple queries.

 

"delete from `projectname.datasetname.tablename1` where 1=1;
"delete from `projectname.datasetname.tablename2` where 1=1;

Anjali3
Contributor
Contributor
Author

Sorry there is type o in previous query. Below is the one tried.

 

 

"delete from `projectname.datasetname.tablename1` where 1=1;
delete from `projectname.datasetname.tablename2` where 1=1"

Anonymous
Not applicable

Hi,

Could you try using following query(without single quotes):

 

"delete from projectname.datasetname.tablename1 where 1=1;
delete from projectname.datasetname.tablename2 where 1=1;"

 

And for the worst case, try using column name in the condition.

Eg. delete from <table_name> where <table_name.column=condition>

 

May be it is not getting the value for column when you are using the number. (Just a thought. Not sure about this. But no harm in trying, right?)

 

Regards.

Anjali3
Contributor
Contributor
Author

Tried using both conditions you mentioned. No luck 0683p000009MPcz.png. If i remove the quotes , it is throwing compilation error.

and used where clause in delete statement , still it throws null pointer exception.

 

Note : Combination of Insert and select or both select statements also throwing same issue.

Anonymous
Not applicable

Did you use a trigger onSubjobOk after the connection component before the component which executes the queries? If not, please use it. It helps.

Anjali3
Contributor
Contributor
Author

Hi ,

 

Thank you so much. Tried on component ok with bigquerysqlrow component. Worked fine. Thanks for saving my time 0683p000009MACn.png

Anonymous
Not applicable

Happy to help!

If it worked, you can accept it as solution. So that if anyone else has the same issue, can refer it.

Don't forget to give kudos if the reply worked!0683p000009MACn.png

 

Regards.