Type Import
Paritech.Authority.Control Type Import <Service>
Defines multiple Asset Types by importing from a file or STDIN.
Arguments
Section titled “Arguments”Field | Description |
---|---|
Service | The Authority Service to connect to. |
Available Options
Section titled “Available Options”Option | Description |
---|---|
-Cols <Columns> | A comma-separated list of column names. Defaults to code. |
-Enc <Encoding> | Input encoding. One of ASCII, UTF8 (default). |
-File <FileName> | Read from the given file |
-Format <Format> | Input data format. One of CSV (default), TSV, JSON. |
-Header | The input CSV data does contain a header line. With -Cols, specify to skip the header. |
-NoHeader | The input CSV data does not contain a header line. |
-Stdin | Read from STDIN. Default. |
When using the CSV format, Type and Code determine the To Asset. Subsequent columns provide context information based on the column header. Empty values are ignored.
M:<Key>
: Adds a Metadata value to the Asset Type.
When using the JSON format, each line is interpreted as a JSON serialised AssetType.
Output
Section titled “Output”The process result will be 0 on success, and a negative value on failure.
Examples
Section titled “Examples”Code,Meta:DisabledExchange,TrueMarket
Paritech.Authority.Control Type Import XOSP < Types.csv
{"Type":"Exchange","Metadata":{"Disabled":"True"}}}{"Type":"Market",}
Paritech.Authority.Control Type Import XOSP -Format Json < Types.json
More Information
Section titled “More Information”Utilises the /type API.