You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
config {
type: "view",
schema: "my_schema"
}
SELECT
id,
IF( duration >=120, TRUE, FALSE ) AS flag_a
FROM
TABLE
After executing dataform format:
config {
type: "view",
schema: "my_schema"
}
SELECT
id,
IF
( duration >=120, TRUE, FALSE ) AS flag_a
FROM
TABLE
Expected:
config {
type: "view",
schema: "my_schema"
}
SELECT
id,
IF( duration >=120, TRUE, FALSE ) AS flag_a
FROM
TABLE
The text was updated successfully, but these errors were encountered:
kevin-zhou-dev
changed the title
dataform format: if-based columns are indented in the same level as the "select" clause
dataform format: if-based columns are indented at the same level as the "select" clause
Oct 25, 2024
Agreed this is weird. This SQL formatting is actually handled by this package: https://github.com/google/google-sql-syntax-ts. It's the open sourced code from BigQuery's internal formatter, and it doesn't conform to a lot of SQL style principles - so I'm interested in replacing it.
dataform --version
returns3.0.2
Initial sqlx file:
After executing
dataform format
:Expected:
The text was updated successfully, but these errors were encountered: