Solved: Cannot set kms key name in jobs with DDL Statements BigQuery

When trying to replace an existing table from BigQuery WebUI, It throws the below error message

Cannot set kms key name in jobs with DDL statements. For CREATE TABLE statement, 
use OPTIONS(kms_key_name

Solution:

There is a "Bug" in the WebUI that is causing this error. Try the below workaround:

1. Open "Query Settings" in the Web UI


2. On the Side Window for Query Settings, Click on the Advanced Options dropdown button, toggle between the radio buttons for the Google Managed Key and the Customer Managed Key, Then hit "Save"


Run your "CREATE OR REPLACE TABLE" query now and it should work fine. Its a known user interface bug that causes this error

mCollins

posted on 21 Sep 21

Enjoy great content like this and a lot more !

Signup for a free account to write a post / comment / upvote posts. Its simple and takes less than 5 seconds