This message was deleted.
# ask-anything
s
This message was deleted.
e
hi. here's an example to use cloud storage https://docs.ploomber.io/en/latest/api/_modules/clients/ploomber.clients.GCloudStorageClient.html#ploomber.clients.GCloudStorageClient for big query, are you looking to run a query and dump the results into a local file or do you want to write SQL scripts that create new tables?
we're still working on improving these examples so please share your feedback!
g
my use case - read a kafka topic, store output to GCS, read GCS and update bigquery table after flattening it, transformation using SQL and create a materialized view.
I saw the documentation. I was hoping you have a github repo of working example of using Bigquery and GCS.
e
ah. we don't have a full example. thanks for the suggestion! I think it makes sense to add one. Also for AWS
but feel free to ask any questions here as you make progress with the gcloud integration
g
@Eduardo - here is the error I’m getting. ModuleNotFoundError: An error occured when trying to import dotted path ‘clients.gcs’: No module named ‘clients’
e
do you have a
clients.py
file in the same folder as your
pipeline.yaml
?looks like it cannot find it
g
thx. now it is ModuleNotFoundError: No module named ‘google’
e
probably missing the g cloud storage package? https://pypi.org/project/google-cloud-storage/
👍 1
g
thx got it working. is there a way to parameterize clients.py? hate to use path hardcoded in .py file.
e
yep, something like this
in your case it'd be something like:
Copy code
File:
  dotted_path: clients.gcs
  name: value
👍 1
hi @Gaurav! I was looking for ideas for our next blog post and I decided to write something on using ploomber with google cloud 🙂 since you're working on setting this up, I thought of sharing the code example I'm working on - right now, it connects to bigquery, but I'll add the cloud storage stuff too. still work in progress but feel free to share your feedback
g
great. i’ll get back to you.
Do you plan to use sqlalchemy client or DBAPIClient or native BigQuery Client?
e
DBAPIPClient is a wrapper for the native client. using the sqlalchemy client has a few extra features, but both work fine