Skip to content

Instantly share code, notes, and snippets.

@kirlf
Created August 21, 2023 14:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kirlf/d38a83b5cfb270cd0ea7acf1b339908f to your computer and use it in GitHub Desktop.
Save kirlf/d38a83b5cfb270cd0ea7acf1b339908f to your computer and use it in GitHub Desktop.
# Input format: JSONEachRow
# Note: ClickHouse should works on localhost, or port forwarding should be used in this example:
cat <FILE NAME>.json | curl 'http://localhost:8123/?input_format_skip_unknown_fields=1&query=INSERT%20INTO%20<DATABASE NAME>.<TABLE NAME>%20FORMAT%20JSONEachRow' --data-binary @-
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment