Add support for BigQuery
Closed this issue ยท 6 comments
Problem
I want to use monosi with my BigQuery data store
Solution
Monosi needs to interpret BigQuery configuration details and run on BigQuery accordingly
Requirements
- BigQuery instance
- Refactor to support multiple formats for configurations
- Add BigQuery driver & dialect
In progress on the https://github.com/monosidev/monosi/tree/feat/bigquery-driver branch
@iporollo Thank you for sharing. I definitely understand it is not ready to review. But, let me leave one comment. It would be great to support other authentication ways, say about using GOOGLE_APPLICATION_CREDENTIALS
.
monosi/src/core/drivers/bigquery/configuration.py
Lines 20 to 22 in 53c8d35
Thank you for the input @yu-iskw!
If I understand correctly, GOOGLE_APPLICATION_CREDENTIALS
is an environment variable that is set to hold the path to the service account json file.
For the implementation I was using the sqlalchemy-bigquery engine which takes either a service account json file path or the file base64 encoded. The way I currently wrote it is to let the user upload the file to the UI and then base64 encode it and pass it to the engine.
Since the engine does take a file path as well, we could do something like 'credentials_path={GOOGLE_APPLICATION_CREDENTIALS}'
such that the engine reads the path from the environment variable. This may get a bit tricky with Docker env vars, but I can look into it.
Is this along the lines of what you were thinking?
@iporollo I understand. I totally misunderstood the manner to set up credentials. In that way, the best scenario to me is to manage credentials on monosi as code like terraform in the future. Even APIs to manage credentials would work. Thanks!
Just added BigQuery support to Monosi with the latest release - https://docs.monosi.dev/docs/integrations/bigquery
@yu-iskw @viniciusdsmello @amirbtb let me know if you have any questions / comments as you try it out!