Seems the -f or --force=true flag does not work for views. As it still output the following error.
could not be created; a table with this name already exists.
Below is part of the command I use
bq mk --use_legacy_sql=false -f --description "View on reporting table ..." --view
You can use a CREATE OR REPLACE VIEW statement, e.g.
bq query --use_legacy_sql=false "
CREATE OR REPLACE VIEW dataset.view
OPTIONS (description='View on reporting table ...') AS
SELECT ...
"
See the DDL documentation for more reading.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With