Skip to content

Support SELECT .. INTO OUTFILE ..TRUNCATE| APPEND.. #888

@jovezhong

Description

@jovezhong

In recent version of ClickHouse, there are settings for INTO OUTFILE to specify when the outfile exists, whether to append to clean up content and add.

https://clickhouse.com/docs/en/sql-reference/statements/select/into-outfile

When writing to a file that already exists, APPEND or TRUNCATE must be used.

However this is not available in Timeplus Proton.

Code: 62. DB::Exception: Syntax error: failed at position 1370 ('TRUNCATE') (line 31, col 56): TRUNCATE FORMAT LineAsString
. Expected one of: COMPRESSION, FORMAT, SETTINGS, end of query. (SYNTAX_ERROR)

The use case is to follow the ClickHouse docs script to generate the markdown based on settings source code.

SELECT prefix || (SELECT group_concat(*) FROM main_content)
INTO OUTFILE 'docs/en/operations/settings/settings.md' TRUNCATE FORMAT LineAsString

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions