bigquery-emulator
bigquery-emulator copied to clipboard
Truncate table not working
What happened?
String q = String.format("truncate table %s.%s", getDatasetId(), getTableId());
runQuery(bigQuery, q)
Error
failed to truncate DELETE FROM `test-dataset.records`: no such table: test-dataset.records
What did you expect to happen?
table should be truncated
How can we reproduce it (as minimally and precisely as possible)?
create a table and try to truncate it
Anything else we need to know?
No response
String q = String.format("delete from `test-dataset.records` where true", getDatasetId(), getTableId());
runQuery(bigQuery, q)
this works as expected
I've implemented and released a fix for the TRUNCATE statement in the Recidiviz fork of the emulator https://github.com/Recidiviz/bigquery-emulator/releases/tag/v0.6.6-recidiviz.0