Create table using a variable name in the BigQuery UI

前端 未结 3 1898
粉色の甜心
粉色の甜心 2020-12-07 04:37

I am trying to write a BigQuery script that I can store as a procedure, I would like one of the arguments I pass to be used in the table name that is written out by the scri

3条回答
  •  無奈伤痛
    2020-12-07 05:13

    Why not just use Execute Immediate with concat if you know the table schema?

    EXECUTE IMMEDIATE CONCAT('CREATE TABLE `', id, '` (column_name STRING)');
    

提交回复
热议问题