The problem I’m having
I have an existing model materialized as a table on Big Query. The table name is daily-events_DATE
I would like to rename this table to daily_events_DATE
without losing any of the data in the table. (Replace the hyphen with underscore)
Is this possible?
The context of why I’m trying to do this
Big Query’s UI doesn’t display date-sharded tables correctly if there’s a -
(hyphen) in the table name and only supports _
(underscore)
What I’ve already tried
Google searching but I’m quite new to dbt and didn’t find any straightforward answers to the question. when rebuilding tables, dbt should use table renaming to minimize amount of time the table is unavailable · Issue #68 · dbt-labs/dbt-core · GitHub seems to suggest renaming will drop the table and all old data will be lost.