Show / Hide Table of Contents

--import

Imports data to a Library, Project, or Scenario Datasheet.

Syntax

--import [argument, argument, ...]

Arguments

--lib=name

The Library file name.

--sheet=name

The Datasheet name.

--file=name

The input file name.

--pid/sid=id

The Project or Scenario ID. Not required if --sheet is a Library Datasheet.

--provider=name

The Data Provider name. Not required if the file extension is for a known Data Provider (e.g. .csv, .xlsx).

Tip

Use --list --dataproviders to see the available Data Providers. [reference]

--append

Appends the data instead of overwriting. Does not apply to single-row or Project Datasheets.

--bulk

Performs a bulk import. Both pid and sid can be specified. CSV only.

--folder=name

The input folder name. Required with the --bulk argument.

Remarks

Because the values for a Project Datasheet can be used for field validation, Project Datasheets are treated differently from Scenario or Library Datasheets. Specifically, when importing to a Project Datasheet:

  • Records with an existing name are updated
  • Records without an existing name are appended

Because of this behavior, the --append argument is ignored when importing to a Project Datasheet.

When importing from CSV, only the required columns must be specified. For example, the ST-Sim State and Transition Model's Transition Target Datasheet has many columns, but only two are required so a CSV import file can be as simple as the following:

TransitionGroupID,Amount
Restoration,80.0000

When bulk importing, each CSV file in the import folder must have the same name as the target Datasheet. For example, to do a bulk import to the ST-Sim State and Transition Model's Run Control and Transition Target Datasheets the import folder must contain the following two files:

stsim_RunControl.csv
stsim_TransitionTarget.csv

Examples

For Scenario 123 in Library my lib.ssim, import the data from data.csv to the sheet name:

SyncroSim.Console.exe --import --lib="my lib.ssim" --sheet=name --file=data.csv --sid=123

For Scenario 123 and Project 345 in Library my lib.ssim, bulk import the data from the folder c:\data:

SyncroSim.Console.exe --import --lib="my lib.ssim" --bulk --folder="data" --pid=123 --sid=456
In This Article
Back to top Copyright 2007-2022 Apex Resource Management Solutions Ltd.
Generated by DocFX