Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
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!
Regards.
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
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;
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"
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.
Tried using both conditions you mentioned. No luck . 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.
Did you use a trigger onSubjobOk after the connection component before the component which executes the queries? If not, please use it. It helps.
Hi ,
Thank you so much. Tried on component ok with bigquerysqlrow component. Worked fine. Thanks for saving my time
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!
Regards.