// tag::picocli-generated-full-manpage[]
// tag::picocli-generated-man-section-header[]
:doctype: manpage
:revnumber: import 2.3
:manmanual: Import Manual
:mansource: import 2.3
:man-linkstyle: pass:[blue R < >]
= import(1)

// end::picocli-generated-man-section-header[]

// tag::picocli-generated-man-section-name[]
== Name

import - Imports data from a file into the infra inventory db.

// end::picocli-generated-man-section-name[]

// tag::picocli-generated-man-section-synopsis[]
== Synopsis

*import* [*-v*] [*--dry-run*] [*--indexed*] [*--[no-]header*] [*-e*=_<charset>_]
       [*-n*=_<number>_] [*-o*=_<format>_] [*-t*=_<tableName>_]
       *-C*=_<file-column>=<db-column>_ [*-C*=_<file-column>=<db-column>_]...
       [*-W*=_<db-column>=<value>_]... _<file>_ _<extraFile>_

// end::picocli-generated-man-section-synopsis[]

// tag::picocli-generated-man-section-description[]
== Description

Imports data from a file into the infra inventory db.

// end::picocli-generated-man-section-description[]

// tag::picocli-generated-man-section-options[]
== Options

*--dry-run*::
  Don't actually add the row(s), just show if they exist and/or will be ignored..

*-n*, _<number>_::
  Number-of-iterations limit as:  `-n number`
+
Specifies the maximum number of iterations, or frames, top should produce before ending.

*-o*, *--format*=_<format>_::
  File format. Valid values: CSV, TSV. Default: CSV

*-t*, *--table*=_<tableName>_::
  Name of the table that the CRUD operations apply to. Default: null.

*-v*, *--verbose*::
  Specify multiple -v options to increase verbosity.
+
For example, `-v -v -v` or `-vvv`

==  CSV/TSV-only Options

_<extraFile>_::
  Extra CSV file.

*-C*, *--column*=_<file-column>=<db-column>_::
  (CSV/TSV-only) Key-value pair specifying the column mapping between the import file column name and the destination table column name.

*-e*, *--encoding*=_<charset>_::
  (CSV/TSV-only) Character encoding of the file to import. Default: Shift_JIS

*--indexed*::
  (CSV/TSV-only) If true, use indexed access in the file, so specify the (1-based) file column index instead of the file column name.

*--[no-]header*::
  (CSV/TSV-only) By default, or if `--header` is specified, the first line of the file is a list of the column names. If `--no-header` is specified, the first line of the file is data (and indexed access is used).

*-W*, *--column-value*=_<db-column>=<value>_::
  (CSV/TSV-only) Key-value pair specifying the destination table column name and the value to set it to.

// end::picocli-generated-man-section-options[]

// tag::picocli-generated-man-section-arguments[]
== Arguments

_<file>_::
  The file to import.

// end::picocli-generated-man-section-arguments[]

// tag::picocli-generated-man-section-footer[]
==  Example:

[%hardbreaks]
pass:c[# ]This imports all rows from the IP_Allocation_v1.20.csv file into the `null` table.
*import -v src/test/resources/IP_Allocation_v1.20.csv -Chostname=hostname -Chw_type=server_type -Cenv=class -Cdeviceid=null -Cenv=env -Cteam=team -COS=os -Cremarks=description -Crack=rack -Clocation=datacenter -Cmgmt_ip=management_ip -Cfront_ip=front_ip -Cilo_ip=ilo_ip -Capp=application*

[%hardbreaks]
pass:c[# ]This imports all rows from the network.csv file into the `network` table.
*import -v --table=network src/test/resources/network.csv -Cdesc=purpose -CDC=datacenter -Csubnet=subnet -Cgateway=gateway -Cvlanid=network*

// end::picocli-generated-man-section-footer[]

// end::picocli-generated-full-manpage[]
