Skip to content

How to copy big data to ClickHouse #503

Closed

Description

@sangli00

I used tpch make 20G data in my OS.
I know used command

 time clickhouse-client --query="INSERT INTO NATION FORMAT CSV" < some.csv

tpch make data format is | ,I read document can't find customer define format .

how to copy this data to ClickHouse?

Thanks....

Activity

  1. ludv1x commented on Feb 17, 2017

    @ludv1x
    Contributor

    Could you provide example of data (or its format description) which you try to load?

  2. sangli00 commented on Feb 17, 2017

    @sangli00
    Author

    1 copy this data to postgres database
    2 copy postgres database from to directory
    3 use ClickHouse-client copy to ClickHouse
    Is very trouble

    Uploading 5784F93A-C638-4F3A-A79B-D653845DAFD6.png…

  3. ludv1x commented on Feb 17, 2017

    @ludv1x
    Contributor

    I downloaded TPCH_Tools_v2.17.1.zip and loaded data from customer.tbl.150000 into ClickHouse.

    You just need to remove last | in each line and replace | to \t.
    After you can import data into ClickHouse using TabSeparated FORMAT.

    sed 's/|$//g' customer.tbl.150000 | tr "|" "\t" | clickhouse-client -q "INSERT INTO tpc FORMAT TSV"
    
  4. sangli00 commented on Feb 17, 2017

    @sangli00
    Author

    yes, I remove last |
    but I can't replace | to \t

    used TabSeparated FORMAT is OK.
    Thanks.

  5. 1 remaining item

  6. added a commit that references this issue on May 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions