Skip to content

Association Import

Paritech.Authority.Control Association Import <Service> <FromType> <FromCode>

Defines multiple Associations from an Asset by importing from a file or STDIN.

FieldDescription
ServiceThe Authority Service to connect to.
FromTypeThe type of the Asset the Association is from.
FromCodeThe unique code of the Asset the Association is from.

These options affect the From Asset.

OptionDescription
-App <Code>Specifies metadata for an Application on the From Asset. Affects the -Meta and -ID options. Can be specified multiple times.
-ID <Name>Specifies a new ID for the current App. Can be specified multiple times.
-Meta <Key> <Value>Supplies a metadata key/value for the current App. Can be specified multiple times.
-Val <Key> <Value>Supplies a key/value for the current ID. Can be specified multiple times.

These options affect the data import of the To Assets.

OptionDescription
-Cols <Columns>A comma-separated list of column names. Defaults to type,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.
-HeaderThe input CSV data does contain a header line. With -Cols, specify to skip the header.
-NoHeaderThe input CSV data does not contain a header line.
-StdinRead 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.

  • A:<AppCode>:<Key>: Adds a Metadata value to the AppCode application for the Asset.
  • A:<AppCode>:<IdName>:<Key>: Adds an ID value to the IdName set under the AppCode application for the Asset.
  • X:<AppCode>:<Key>: Adds a Metadata value to the AppCode application for the Association.
  • X:<AppCode>:<IdName>:<Key>: Adds an ID value to the IdName set under the AppCode application for the Association.

When using the JSON format, each line is interpreted as a JSON serialised ToAssetAssociation.

The process result will be 0 on success, and a negative value on failure.

Assocations.csv
Type,Code,X:Zenith:Visibility
TradingAccount,XS:0001,
TradingAccount,XS:0002,
TradingAccount,XS:0003,
TradingAccount,XS:0004,
Market,XSX,Full
Bulk Import Associations
Paritech.Authority.Control Association Import XOSP User 1234 < Associations.csv

Utilises the /association API.