Home > OS >  SQL PyCharm Style when CREATE Big Query tables
SQL PyCharm Style when CREATE Big Query tables

Time:03-25

I am modifying the SQL PyCharm Style and I did not find any way to avoid the following transformation when creating Big Query tables:

CREATE OR REPLACE TABLE `project.dataset.table`

is transformed into:

CREATE OR REPLACE TABLE ` project.dataset.table `

With the blank spaces before and after the "`". Any way to change the SQL style avoiding that?

CodePudding user response:

I think in SQL it is irrelevant for this situation "`"

project.dataset.table equally `project.dataset.table` 

or trim functions

CREATE OR REPLACE TABLE  TRIM(` project.dataset.table `)

I'm sorry if I made a mistake :)

CodePudding user response:

As a work around this could do the job to remove the spaces:

EXECUTE IMMEDIATE("CREATE OR REPLACE TABLE  "|| Replace("` project.dataset.table `"," ","") || " as Select 1 as a")
~~
  • Related