vscode-sqltools
vscode-sqltools copied to clipboard
dictGet support for clickhouse code formatter
hi.
CREATE TABLE ahe.up_daily_data (
`device_id` String COMMENT 'device_id',
`clock` DateTime('Asia/Tehran') COMMENT 'clock ',
`pt_text` Nullable(String) MATERIALIZED dictGet(
'ahe.tbl_meters_dict',
'pt_text',
tuple(device_id)
)
) ENGINE = AggregatingMergeTree PARTITION BY toYYYYMM(clock)
ORDER BY (clock, device_id) SETTINGS index_granularity = 8192;
above code no format to this :
CREATE TABLE ahe.up_daily_data (
`device_id` String COMMENT 'device_id',
`clock` DateTime('Asia/Tehran') COMMENT 'clock ',
`pt_text` Nullable(String) MATERIALIZED dictGet('ahe.tbl_meters_dict','pt_text',tuple(device_id))
)
ENGINE = AggregatingMergeTree
PARTITION BY toYYYYMM(clock)
ORDER BY (clock, device_id)
SETTINGS index_granularity = 8192;
https://vscode-sqltools.mteixeira.dev/playground/formatter
Is there any movement on this feature?
Nothing at the moment, nor any work scheduled on it.
@gjsjohnmurray it would be nice to have minimal working formatting. For help there is already cli for it https://clickhouse.com/docs/en/operations/utilities/clickhouse-format But it would be nice to have vscode extension for it