19.7.2 Import Data Entities using command-line interface (CLI)
The import CLI supports a two-step flow:
- Prepare an INI file with connector-specific import options. See Prepare Import File.
- Submit import job using the prepared INI file. See Submit Import Job.
The CLI script is:
% python -m datatransforms.cli.import_data_entities --help
Prepare Import File
Prepare an INI file for a connection:
% python -m datatransforms.cli.import_data_entities --prepare --connection "Demo Source Data" --schema SHThis creates:
import_entities_demo_source_data.iniFor non-BICC connectors, --schema is required. For BICC connectors, --schema is optional.
The generated INI contains these sections:
[import]: Contains connection and schema values.[system]: Contains system-managed values (do not edit).[import_options]: Contains editable import options.[runtime]: Contains polling and wait settings.[internal]: Contains internal values used by the CLI.
For BICC connectors, these additional sections are generated:
[offerings]: Contains user-selected offerings.Update
[offerings]in the INI before submit. You can select offerings in either (or both) ways:[offerings] selected=Financial,Human Resources item_1=Sales item_2=ServiceAt submit time, the selected values are combined, de-duplicated, validated against live offerings, and submitted as
LIST_OF_OFFERINGS.[offerings_catalog]: Contains offerings discovered from the connection.
Submit Import Job
Submit using only the import file:
% python -m datatransforms.cli.import_data_entities --import-file import_entities_demo_source_data.iniThe CLI will:
- Resolve connection from the INI.
- Validate connector type and template.
- Build REST import payload.
- Submit import job.
- Poll job status (based on
[runtime]settings).
Parent topic: Import Data Entities