Skip to content

Commit

Permalink
added data load
Browse files Browse the repository at this point in the history
  • Loading branch information
data-sleek committed Mar 16, 2022
1 parent f421086 commit 148f286
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions tpch_data_load.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
array=( customer lineitem nation orders part partsupp region supplier )

# Clickhouse Data Load
for i in "${array[@]}"
do
log "Loading ${i}.tbl..."
clickhouse-client --password xxx --format_csv_delimiter="|" --query="INSERT INTO tpch.${i} FORMAT CSV" < ${targetdir}/${i}.tbl
log "Done Loading ${i}.tbl..."
done

# SingleStore Data Load
for i in "${array[@]}"
do
log "Loading ${i}.tbl..."
memsql -uroot -pxxx tpch -e"LOAD DATA INFILE '${targetdir}/${i}.tbl' INTO TABLE tpch.${i} FIELDS TERMINATED BY '|' LINES TERMINATED BY '|\n';"
log "Done Loading ${i}.tbl..."
done

0 comments on commit 148f286

Please sign in to comment.