Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

Bigquery ODBC Excel - How to use a single session / connection

Hello, 

Currently I am using the BigQuery ODBC (with Sessions enabled in the ODBC Settings) to execute queries within excel. Currently many of my queries are essentially the same query, where multiple temp tables are made, followed by different select statements being the only difference between each query. This is because I do not see a way to have the queries in excel use the same session, so I only need to create the temp tables one time, then just have the subsequent queries with their respective select statements... 

Is it possible to have multiple queries in excel use the same session? How can I specify this? Is there a way to get the session ID and then specify it in subsequent queries in excel? 

Edit: I see I can do something like "SELECT @@session_id" to open a session with an initial query in excel and get the ID, but I am unsure how to get the subsequent queries in excel to use that same session ID. Perhaps in the connection string? But it would need to refer to an Excel table value to not be hardcoded. Unfortunately it appears it is a read only variable so I cannot do something like "SET @@session_id" in subsequent queries. 

0 1 454
1 REPLY 1

Hey joMG,

 

Sorry this is not an answer to your question, but a cry for help to someone who may have figured out how to leverage temp tables via Microsoft Query and Excel using the Simba ODBC. If you wouldn't mind, could you provide a test (simulated) example of how you accomplish this? When I run my query, the data does not return and i am left with the cell populated with External_data1.