Skip to content

Instantly share code, notes, and snippets.

@phamngocquy
Last active November 24, 2022 07:52
Show Gist options
  • Select an option

  • Save phamngocquy/bcef84ade4988a8106ed850a02e72279 to your computer and use it in GitHub Desktop.

Select an option

Save phamngocquy/bcef84ade4988a8106ed850a02e72279 to your computer and use it in GitHub Desktop.
cat /dytech/DATA/fut_ciqdb/raw/extracted/FinancialsPremiumStatement/Full/FinancialCollectionData.txt | ./clickhouse client --format_csv_delimiter="|" --host=10.202.208.152 --port=9001 --user=fordev --password=fordev@789 --database=mkt --query="INSERT INTO fin_collection_data(financial_collection_id,data_item_id,data_item_value,unit_type_id,num_flag) SELECT financial_collection_id,data_item_id,data_item_value,unit_type_id,num_flag FROM input('financial_collection_id Int32, data_item_id Int32, data_item_value Decimal(28,6), unit_type_id Int32, num_flag UInt8') FORMAT CSV";
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment