I didn't find a RENAME option to alter table name. I have a case that I must rename a table, and the only way is to select with result to new table. this query cost money, and taking long time for no reason.
It is especially painful when I need to rename a nested table, so I must export, need to even work on the result set in order to import it back.
Any way that I am missing? anything coming soon?
ALTER TABLE table_name RENAME TO new_table_name; This statement lets you change the name of a table to a different name. As of version 0.6, a rename on a managed table moves its HDFS location as well. (Older Hive versions just renamed the table in the metastore without moving the HDFS location.)
There is no rename option, but there is a copy operation, which uses a fast snapshot process. This doesn't incur any additional charges other than the additional cost of storage (of course you can delete the original table so you only get charged for the storage once).
You can do this in the BigQuery by clicking on the table name and the dropdown arrow next to the table name, then selecting 'copy table'. Alternately you can use the bq cp
command in the bq command-line tool.
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