Five Stars

How to get token properties file name for big query?

I have a job which connects to big query to get data and was using token properties file.

Due to some unforeseen circumstances I lost data and could only recover job but not token properties.

I do not remember how it was done before as my colleague at that time helped me.

How can I get the token properties for my big query input? 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Employee

Re: How to get token properties file name for big query?

 

You should be able to: 

  1. Delete the token properties file (back it up, although you shouldn't need it)
  2. Set the Authorization code to ""
  3. Run the job
  4. Copy the URL from the job log to a browser and re-authenticate
  5. Get the new authorization code and put it into the field

When you execute, the new refresh token will be created. 

 

 

4 REPLIES
Employee

Re: How to get token properties file name for big query?

This is the location for the refresh token. 

 

I think typical usage is that first you get your authorization code, and then as long as the refresh token path is accessible, it should keep that up to date for future access.

 

To get your authorization code, you can execute the job and check the log. It will give you a link to get your authorization code.  Copy/paste that into the authorization code field and you should be able to execute from there. 

 

Hope this helps.

Five Stars

Re: How to get token properties file name for big query?

I have authorisation code. 

But I still need to still get the refresh token so i can put it in token properties File name. 

Without it I get the following error.

 

Exception in component tBigQueryInput_3 (Copy_of_dev_big_query)

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 dawanda.copy_of_dev_big_query_0_1.Copy_of_dev_big_query.tBigQueryInput_3Process(Copy_of_dev_big_query.java:1589)

at dawanda.copy_of_dev_big_query_0_1.Copy_of_dev_big_query.tPostgresqlInput_2Process(Copy_of_dev_big_query.java:2722)

at dawanda.copy_of_dev_big_query_0_1.Copy_of_dev_big_query.runJobInTOS(Copy_of_dev_big_query.java:3570)

at dawanda.copy_of_dev_big_query_0_1.Copy_of_dev_big_query.main(Copy_of_dev_big_query.java:2817)

Employee

Re: How to get token properties file name for big query?

 

You should be able to: 

  1. Delete the token properties file (back it up, although you shouldn't need it)
  2. Set the Authorization code to ""
  3. Run the job
  4. Copy the URL from the job log to a browser and re-authenticate
  5. Get the new authorization code and put it into the field

When you execute, the new refresh token will be created. 

 

 

Five Stars

Re: How to get token properties file name for big query?

Thanks. It worked!

It automatically created a refresh token file for the path and file name I put there.