How do you choose how many spaces a tab inserts in gcp's SQL workspace editor?
In some scripts it does 2, in others it is 4, and I can't find a place to control that setting
edit due to comments:
Suppose I have query:
SELECT *
FROM `dwh.dataset.table`
order by uid, registration_date
Pressing Tab makes 4 spaces. Format Query will format it with 2 spaces:
SELECT
*
FROM
`dwh.dataset.table`
ORDER BY
uid,
registration_date
If you add something after Format Query and are using Tab - it will still insert 4 spaces on new lines, while it will do 2 spaces on existing lines some times.. eg:
Writing code after format query:
SELECT
uid,
registration_date,
sum(some_column) over (
#<- why is there 4 spaces here now?
)
FROM
`dwh.dataset.table`
GROUP BY
#<- also here
ORDER BY
uid,
registration_date