Merge branch 'master' of https://github.com/mariadb-corporation/Developer-Examples
commit
35ca8a3364
|
@ -3,6 +3,6 @@
|
|||
SCHEMA_DIR=$(readlink -f ./schema)
|
||||
|
||||
# create innodbtables: airports, airlines
|
||||
/usr/bin/mysql --defaults-file=/etc/my.cnf -u root -vvv < $SCHEMA_DIR/idb_schema.sql
|
||||
/usr/bin/mysql -udba -pDemo_password1 -h10.10.10.10 -vvv < $SCHEMA_DIR/idb_schema.sql
|
||||
# create columnstore table: flights
|
||||
/usr/bin/mysql --defaults-file=/etc/my.cnf -u root -vvv < $SCHEMA_DIR/cs_schema.sql
|
||||
/usr/bin/mysql -udba -pDemo_password1 -h10.10.10.10 -vvv < $SCHEMA_DIR/cs_schema.sql
|
||||
|
|
|
@ -3,4 +3,6 @@
|
|||
SCHEMA_DIR=$(readlink -f ./schema)
|
||||
|
||||
# use the csv's to load data into the airports and airlines tables
|
||||
/usr/bin/mysql --defaults-file=/etc/my.cnf -u root -vvv < $SCHEMA_DIR/idb_load_data.sql
|
||||
#/usr/bin/mysql --defaults-file=/etc/my.cnf -u root -vvv < $SCHEMA_DIR/idb_load_data.sql
|
||||
/usr/bin/mysql -udba -pDemo_password1 -h10.10.10.10 -e "LOAD DATA INFILE '${SCHEMA_DIR}/airports.csv' INTO TABLE innodb_schema.airports FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '\"' LINES TERMINATED BY '\n';"
|
||||
/usr/bin/mysql -udba -pDemo_password1 -h10.10.10.10 -e "LOAD DATA INFILE '${SCHEMA_DIR}/airlines.csv' INTO TABLE innodb_schema.airlines FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '\"' LINES TERMINATED BY '\n';"
|
||||
|
|
|
@ -11,5 +11,5 @@ fi
|
|||
# the advantage of this being runnable as a regular user with a root installation.
|
||||
for f in $DATA_DIR/$filematch.csv; do
|
||||
echo $f
|
||||
/usr/bin/cpimport -m2 -s ',' -E '"' flights flights -l $f
|
||||
/usr/bin/cpimport -m2 -s ',' -E '"' columnstore_schema flights -l $f
|
||||
done
|
Ładowanie…
Reference in New Issue