Hi, I'm trying to make an orchestrator to send som...
# integration-bigquery
j
Hi, I'm trying to make an orchestrator to send some sql queries to call some procedures. I understand that i have to use dagster_gcp.bq_op_for_queries(_sql_queries_), but i dont understand how to pass credentials (Expects a BQ client to be provisioned in resources as context.resources.bigquery) Is there some example I can use as a template. Thank you!
j
hi @Juan you should be able to make the bigquery resource and add it to the job that runs the bigquery op
Copy code
from dagster_gcp import bigquery_resource, bq_op_for_queries

bq_op = bq_op_for_queries(...)

@job(
    resource_defs={"bigquery": bigquery_resource}
)
def my_bq_job():
   bq_op()
   # run other ops, etc
i typed this directly into slack so there might be a couple syntax errors. let me know if you run into issues!
j
Thank you!!!