alek6dj
alek6dj

Reputation: 364

Update scheduled query configuration: remove destination dataset

I had a scheduled query with SELECT statement and APPEND configuration, the destination was a specific table within the dataset "genera_analytics". Recently, I modified the query, and now the query follows a sequence of steps: INSERT, DELETE, INSERT, through DML. Now I get this error when the query is executed:

"Dataset specified in the query ('') is not consistent with Destination dataset 'genera_analytics'"

I have tried to update the scheduled query configuration removing the destination dataset through the UI, but it seems impossible. Also I have tried some bq commands:

bq update --transfer_config --target_dataset='' resource_name

but the destination dataset is still 'genera_analytics'.

How can I update this scheduled query, removing the destination dataset from the configuration?

Upvotes: 2

Views: 693

Answers (1)

Abani Mahapatra
Abani Mahapatra

Reputation: 76

Looks like the scheduled query was defined earlier with destination dataset defined with APPEND type transaction. While updating to a DML query, GUI doesn't show the dataset fields to update to NULL. Hence this error is coming considering the previously set dataset and table name in the scheduled query.

Hence the fix is delete the scheduled query and create it from scratch with DML query option.

Upvotes: 1

Related Questions