dmimport - imports records from file into database
dmimport --help
dmimport --version
dmimport --input file --database file --type type [--quote char] [--separator char] [--dry] [--verbose]
The dmimport program reads logs, nodes, sensors, targets, and observations in CSV format from file and imports them into the database. The database inserts are transaction-based. If an error occurs, the transaction is rolled back, and no records are written into the database at all.
The database has to be a valid DMPACK database and must contain the tables required for the input records. The nodes, sensors, and targets referenced by input observations must exist in the database. The nodes referenced by input sensors must exist as well.
- --database, -d file
-
Path of the SQLite database (required, unless in dry mode).
- --dry, -D
-
Enable dry mode. Read records from file and validate them without actual database import.
- --help, -h
-
Output available command-line arguments and quit.
- --input, -i file
-
Path of input file in CSV format.
- --quote, -q char
-
CSV quote character. If not passed, quoting is disabled by default.
- --separator, -s char
-
CSV separator character.
- --type, -t [log|node|observ|sensor|target]
-
Type of records to import (required).
- --verbose, -V
-
Print progress to standard output.
- --version, -v
-
Output version information and quit.
Import observations from CSV file into database:
$ dmimport --type observ --input observ.csv --database observ.sqlite --verbose
Project web site: https://www.dabamos.de/