hello
While i am able to query data from the BigQuery Data Source
When trying to set up an update Query using the GUI options...I dont see any of the tables.
Thanks
hello
While i am able to query data from the BigQuery Data Source
When trying to set up an update Query using the GUI options...I dont see any of the tables.
Thanks
Hey @bigV1! Out of curiosity, do you know how many tables you have in your db? I believe this happens with BiqQuery dbs that have too many tables or a schema that exceeds 100MB.
Got it, ok! And do you have write permissions granted from your db? Are you able to use the SQL mode to run write queries?
Yes I do have write permissions...An i can use SQL mode to create a SQL which returns data and populates the Table.
I now need to be able to update existing data AND add data . If t he GUI mode does not work could you let me know what the right way to set up the query is
Attaching a snapshot of the select statement I now have set up
Hey @bigV1!
You can use MERGE
to update existing data and add new data in BigQuery. MERGE = INSERT
and UPDATE
.
Here's an example!
MERGE dataset.table AS target
USING dataset.new_data AS source
ON target.id = source.id
WHEN MATCHED
THEN UPDATE SET target.column1 = source.new_column1, target.column2 = source.new_column2 WHEN NOT MATCHED THEN INSERT (id, column1, column2) VALUES (source.id, source.new_column1, source.new_column2);
Make sure to replace dataset
with your dataset name and table
with the name of your target table in BigQuery. You'll also need to update the column names!
Is this similar to what you're looking for?