What happened?
Attempting to delete a materialized view using bq rm fails
$ bq rm -f pg_test.mv
BigQuery error in rm operation: failed to delete table mv: failed to delete table DROP TABLE `camus-unittest.pg_test.mv`: failed to exec DROP TABLE `camus-unittest.pg_test.mv`: SQL logic error: no such table: camus-unittest_pg_test_mv (1)
What did you expect to happen?
Attempting to delete a materialized view succeeds.
How can we reproduce it (as minimally and precisely as possible)?
Create a new dataset with a single table that is a trivial materialized view, and attempt to delete the table.
# Create the dataset and materialized view
$ bq mk -d pg_test
$ bq mk -t --materialized_view='select 1' pg_test.mv
$ bq ls pg_test
tableId Type Labels Time Partitioning Clustered Fields
--------- ------- -------- ------------------- ------------------
mv TABLE
# Attempt to remove it
$ bq rm -f pg_test.mv
BigQuery error in rm operation: failed to delete table mv: failed to delete table DROP TABLE `camus-unittest.pg_test.mv`: failed to exec DROP TABLE `camus-unittest.pg_test.mv`: SQL logic error: no such table: camus-unittest_pg_test_mv (1)
# Show that it's still present
$ bq ls pg_test
tableId Type Labels Time Partitioning Clustered Fields
--------- ------- -------- ------------------- ------------------
mv TABLE
Anything else we need to know?
Reproduced on ghcr.io/recidiviz/bigquery-emulator:0.6.6-recidiviz.1
What happened?
Attempting to delete a materialized view using
bq rmfailsWhat did you expect to happen?
Attempting to delete a materialized view succeeds.
How can we reproduce it (as minimally and precisely as possible)?
Create a new dataset with a single table that is a trivial materialized view, and attempt to delete the table.
Anything else we need to know?
Reproduced on
ghcr.io/recidiviz/bigquery-emulator:0.6.6-recidiviz.1