astronomer / astro-sdk

Astro SDK allows rapid and clean development of {Extract, Load, Transform} workflows using Python and SQL, powered by Apache Airflow.
https://astro-sdk-python.rtfd.io/
Apache License 2.0
329 stars 40 forks source link

Add labels to all (BigQuery) resources and processes #2134

Open adam-phillipps opened 3 months ago

adam-phillipps commented 3 months ago

Please describe the feature you'd like to see It would be very happy-making if I could add arbitrary labels to all BigQuery resources, jobs, queries, etc. that natively support them, so that I can run more accurate cost analysis.

Describe the solution you'd like Please add tags/labels/etc. to the Table objects or allow us to pass tags and labels through as kwargs in create and load functions. We are able to add QueryModifiers to some processes but I’d like to label all queries and the tables they create.

Are there any alternatives to this feature? I’m not aware of any way around this. I can’t remember how it all works in AWS and I’m not sure at all about Azure, Databricks, etc. but in GCP, you can’t add labels to things like queries and jobs after they’ve been submitted and the only way I know how to filter during cost analysis is based on arbitrary metadata, ie cost reporting in AWS and GCP uses tags and labels respectively.

Additional context This issue is similar. Many users have this need. It looks like loading a table in BigQuery can be labeled in a few different places, here are two:

Acceptance Criteria