Skip to content

Latest commit

 

History

History
92 lines (61 loc) · 2.03 KB

dmimport.adoc

File metadata and controls

92 lines (61 loc) · 2.03 KB

dmimport(1) Manual Page

NAME

dmimport - imports records from file into database

SYNOPSIS

dmimport --help

dmimport --version

dmimport --input file --database file --type type [--quote char] [--separator char] [--dry] [--verbose]

DESCRIPTION

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.

OPTIONS

--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.

EXIT STATUS

0

Success. Records have been imported.

1

Failure. Import of records failed.

EXAMPLE

Import observations from CSV file into database:

$ dmimport --type observ --input observ.csv --database observ.sqlite --verbose

SEE ALSO

dmexport(1)

RESOURCES

Project web site: https://www.dabamos.de/

COPYING

Copyright © 2024 Philipp Engel.
Free use of this software is granted under the terms of the ISC Licence.