I have a BigQuery table and I want to update the content of few rows it from a reference CSV file. This CSV file is uploaded to Google cloud storage bucket.
0
votes
Welcome to Stack Overflow. Please take the tour, read about what's on-topic, and read How to Ask a Good Question. Note that Stack Overflow is not a coding service. You're expected to try to solve your problem first. If you get stuck somewhere then it's a good idea to ask a specific question here based on your own solution attempt. So far it's unclear what's preventing you from solving this?
- Ivo Mori
1 Answers
0
votes
When you use external table from storage, you can only read the CSV, not update them.
However, you can load you CSV into a BigQuery native table, perform the update with DML, and then export the table to CSV. That only works if you have only one CSV.
If you have several CSV files, you can, at least, print the pseudo column _FILE_NAME to identify the files where you need to perform the change. But the change will have to be performed manually or with the previous solution (native table)