Clickhouse-client

From Initech Technical Wiki
Revision as of 21:33, 18 October 2019 by Timprice (talk | contribs) (Created page with "This is a collection of useful things i've learnt about clickhouse-client. * -m - Use this to make clickhouse act more like mysql so that it will accept multi-line querie...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

This is a collection of useful things i've learnt about clickhouse-client.

  • -m - Use this to make clickhouse act more like mysql so that it will accept multi-line queries an expect a ; at the end to execute the query.
  • -f - Use this to make clickhouse output in a different format. Useful for outputing CSV or JSON to the terminal for adhock use elsewhere.
    • CSVWithNames - use this format to output CSV with a header row.
    • JSONEachRow - this is a useful input and output format.
    • A full list can be found here: [1]