One Star

Running BigQuery project on Unix server

Hi,
I am able to run Biqgquery project on Talend Window interface thru Google provided Secret key and client secret. Now i want to run the same on Unix server. I am able to create a .sh script. But when I am running on unix server I am getting below error.
Exception in component tBigQueryInput_1
com.google.api.client.auth.oauth2.TokenResponseException: 400 Bad Request
{
  "error" : "invalid_grant"
}
        at com.google.api.client.auth.oauth2.TokenResponseException.from(TokenResponseException.java:105)
        at com.google.api.client.auth.oauth2.TokenRequest.executeUnparsed(TokenRequest.java:287)
        at com.google.api.client.googleapis.auth.oauth2.GoogleAuthorizationCodeTokenRequest.execute(GoogleAuthorizationCodeTokenRequest.java:158)
        at bigquery.fb_appreport_0_1.fb_appreport.tBigQueryInput_1Process(fb_appreport.java:1278)
        at bigquery.fb_appreport_0_1.fb_appreport.runJobInTOS(fb_appreport.java:6879)
        at bigquery.fb_appreport_0_1.fb_appreport.main(fb_appreport.java:6760)

Could you plz help me resolve this issue.
Thanks
Manoj
4 REPLIES
One Star

Re: Running BigQuery project on Unix server

Hey Manoj,
You have to allow authorization for using tBigQueryInput component. My suggestion would be,

run the job in unix server using TOS and get authorisation
if it is not possible, goto webbrowser in unix server. goto oauthplayground 2.0 and get a authorization key and reverse engineer your .sh and replace it
Let me know if its helpful
One Star

Re: Running BigQuery project on Unix server

Hi Rajesh,
Thanks for your help. Unfortunately it did not work. Please let me know if you find some other some other solution. 
Thanks
Manoj
One Star

Re: Running BigQuery project on Unix server

Do I need to Install Talend on Unix server? I have been trying to run the shell script generated by talend.
I am using below code to get the auth code :
https://accounts.google.com/o/oauth2/auth?
scope=email%20profile&
redirect_uri=urn:ietf:wgSmiley Surprisedauth:2.0Smiley Surprisedob&
client_id=######&
response_type=code
One Star

Re: Running BigQuery project on Unix server

Hi Manoj,
Did you get any solution for solving Invalid grant for BigQuery export as shell script?.