evidence-dev / sqltools-bigquery-driver

Query and Explore BigQuery from VSCode
https://marketplace.visualstudio.com/items?itemName=Evidence.sqltools-bigquery-driver
MIT License
40 stars 5 forks source link

Add another project on the sidebar with single service account #14

Open tim-watcha opened 1 year ago

tim-watcha commented 1 year ago

I have one service account connected to default project, but that service account also have permission to another projects too. It seems like I can only add default project for the service account. please add a functionality to explore another projects on the side bar. thank you for the great project!

archiewood commented 1 year ago

thanks for the suggestion. was not aware this was a possible pattern

archiewood commented 1 year ago

On a bit of research, this is not super easy - BigQuery requires that you specify which project you are connecting to, so we cannot return all the projects using a SQL query (which is how the explorer is populated).

As a workaround if you use a service account, I suspect you could change the project-id in the JSON keyfile if you wanted to access the other project.