I need help using the template template created in Google Data Catalog through Python programming to tag several BigQuery tables using the same template template created. I don't know how to use the created template tag to attach to tables. I found through this page a sample to create the template and apply it to the table but I would like to use the same template for several tables but I am not able to. I would like some help or guidance on how to do this. Thanks. As a reference I used this quickstart https://cloud.google.com/data-catalog/docs/tag-bigquery-dataset#python
Attach a tag from a existing template along with values to a BigQuery table using the Data Catalog
612 views Asked by dsrebechi At
1
There are 1 answers
Related Questions in GOOGLE-BIGQUERY
- SQL LAG() function returning 0 for every row despite available previous rows
- Convert C# DateTime.Ticks to Bigquery DateTime Format
- SELECT AS STRUCT/VALUES
- Google Datastream errors on larger MySQL tables
- Can i add new label called looker-context-look_id in BigQuery connection(Looker)
- BigQuery external table using JSON files
- Does Apache Beam's BigQuery IO Support JSON Datatype Fields for Streaming Inserts?
- sample query for review for improvement on big query
- How does Big Query differentiate between a day and month when we upload any CSV or text file?
- How to get max value of a column when ids are unique but they are related through different variables
- how to do a filter from a table where 2 different columns has 2 different records which has same set of key combinations in bigquery?
- How to return a string that has a special character - BigQuery
- How do I merge multiple tables into a new table in BigQuery?
- Customer Churn Calculation
- Is it correct to add "UNNEST" in the "ON" condition of a (left) join?
Related Questions in GOOGLE-API
- Can you use the Drive API to share a file in Google Drive to an oath2 subject rather than email address?
- youtube api quota limit of 10000api
- How can i get the reviews in google maps via API
- Google api nearbysearch how to filter data business_status
- Optimizing Gmail API Query or Alternative Method to Retrieve Total Email Size
- How to use Oauth in order to log‑in on .googleapis.com on almost any arbitrary endpoints domains from the web browser?
- How do I get rid of any type of Memory Saver in Chrome
- Google Picker API not firing callback when using toUri() in iframe
- Python Google Speech v1 voice_activity_timeouts error
- How to config expo MapView correctly?
- Google can't find my keyfilePath in my NextJS app?
- Renaming a file - Google API direct download link
- Access Regular Gmail Account with API in Lambda
- Security of Google Drive API Objects using Google Service Account Credentials in Client Side Code for Website
- Dataportablity api stops working after two weeks
Related Questions in GOOGLE-DATA-CATALOG
- How to attach a tag template to a dataset in GCP using terraform
- Integration Testing for Google Cloud Apis
- How exactly should I use GCP Data Catalog?
- Retrieve columns assigned with policy tag
- Google Cloud Data Catalog - Offerings and Flexibility
- Manage Google Data Catalog in Terraform - Set Tag Template's visibility
- How is Data masking price calculated in BigQuery
- Attaching tags to columns in data catalog using python
- How to get the list of columns that the user has access to
- GCP data catalog/dataflex - can I register Kafka topics and on-prem databases?
- Adding multiple fields for the same template in Data Catalog using python
- GCP CLI Command to remove Data Catalog Tag
- How to detach or remove a data catalog tag from a BigQuery table using gcloud command
- Dataplex API Tag Policies
- How to update the Data Catalog tag values through airflow CloudDataCatalog operators
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
You should be able to tag multiple BigQuery tables with one tag template, just be aware that each table and each column in the table can be tagged only once with a given tag template (i.e. you can't create two or more tags on the same table that use the same tag template).
Based on the Python code snippet attached to the mentioned quickstart, after creating the tag template you should do the following:
Check which fields of the tag template are required. You must set them in your tagging request. By default none of the fields is required.
For each table that you want to tag:
Prepare BigQuery resource name of the table. In the quickstart it's achieved with the following snippet:
Convert BigQuery resource name to Data Catalog Entry name. BigQuery tables are automatically imported to Data Catalog. Unfortunately names of Data Catalog entries that represent BigQuery tables aren't easily deductible from BigQuery resource names. This is why you must call LookupEntry method:
Now you create a tag. You do this by specifying:
Tag template to be used and tag name visible in the UI:
Fields in the tag. You must at least specify all required fields. Each field must have name matching some existing field in the tag template. The value of field must have type matching type of field declared in tag template. In this snippet we have field "source" of string type:
Calling CreateTag method to tag the table. The returned tag will have some additional output-only fields filled, e.g. unique tag name, so you can't reuse it in subsequent requests: