Beispiel: Importieren von Daten in Cassandra

Sei folgendes Beispiel gegeben:

In Cassandra können wir die Daten wie folgt importieren:

average_project_duration_by_department

dsbulk load \
--connector.name csv \
--connector.csv.url /mnt/workspace/cassandra_avg_project_duration_by_department.csv \
--connector.csv.delimiter ',' \
--connector.csv.header true \
--schema.keyspace satisfaction \
--schema.table 'average_project_duration_by_department' \
--schema.mapping '0 = department_name, 1 = department_city, 2 = department_zip_code, 3 = project_id, 4 = project_start, 5 = project_end' \
--log.directory /var/lib/cassandra/dsbulk_log \
--engine.dryRun false

average_satisfaction_by_department

dsbulk load \
--connector.name csv \
--connector.csv.url /mnt/workspace/average_satisfaction_by_department.csv \
--connector.csv.delimiter ',' \
--connector.csv.header true \
--schema.keyspace satisfaction \
--schema.table 'average_satisfaction_by_department' \
--schema.mapping '0 = department_name, 1 = department_city, 2 = department_zip_code, 3 = employee_name, 4 = employee_satisfaction' \
--log.directory /var/lib/cassandra/dsbulk_log \
--engine.dryRun false