Appearance
Import Table
Imports a table from a text file. The text file is loaded from the server.
Permissions
| Command Kind | Needed User Kind |
|---|---|
| Write | All |
Parameters
| Name | Type | Description | Required | Default | Values |
|---|---|---|---|---|---|
| Dimension | array of string | Column of a dimension ([Dimension].[Column1]). [Dimension].[Uid] creates a new item with a Uid. [Dimension].[SerialNumber] creates a new item with a serial number. [Dimension].[Fixed].[Item] uses a fixed item. | yes | ||
| File | string | Name/path of the import file. The file is imported on the server. | yes | ||
| Table | string | Name of the table ([Table]). | yes | ||
| Add | boolean | If 'True', the new value is added to an existing one. If 'False', the new value overwrites an existing one. The default value is 'False'. | no | false | |
| Adjust | boolean | If 'True' protected command chars are replaced: '[' becomes '(', ']' becomes ')' and '=' becomes empty. The default value is 'True'. | no | true | |
| Clear | boolean | If 'True' all records of the table are deleted before import. The default value is 'False'. | no | false | |
| Coding | string | Coding of the file: Automatic (checks the file), Ansi, Ascii, BigEndianUnicode, Unicode (Utf16/Utf-16), Utf7 (Utf-7) or Utf8 (Utf-8). The default value is Automatic | no | Automatic | Automatic, Ansi, Ascii, BigEndianUnicode, Unicode, Utf7, Utf8 |
| ContainsItem | array of string | Imports only lines which contains the item ([Dimension].[Item]). The check is only executed if elements have been specified in the dimension. | no | ||
| ContainsItemFile | array of string | Loads 'ContainsItem' from text file ([Dimension].[File].[Encoding]). Allowed values for 'Encoding' are: Automatic (checks the file), Ansi, Ascii, BigEndianUnicode, Unicode (Utf16/Utf-16), Utf7 (Utf-7) or Utf8 (Utf-8). The default encoding is 'Automatic', e.g. [Products].[Valid_Products.txt].[Automatic] | no | ||
| Contains | string | If not empty, only rows containing this value are imported. | no | ||
| CreateItems | boolean | If 'True' non existing items will be created. The default value is 'False'. | no | false | |
| DateOffset | integer | Moves the date dimension items by the offset. The default value is '0'. For example the month '2022-02' with an offset of 5 becomes '2022-07'. | no | 0 | |
| DayFormat | string | Day format examples: YYYY-MM-DD, MM/DD/YYYY, MM-DD-YYYY, DD.MM.YYYY. | no | ||
| DecimalSeparator | string | Decimal separator (long and short): Comma (,) or Point (.). The default value is Point (.) | no | Point | Comma, Point |
| EmptyItem | string | If the name of an item is empty, the value is used for the name. | no | ||
| Field | array of string | Column of a number or text field ([Field].[Column1]). [Field].[Uid] imports a Uid value. [Field].[SerialNumber] imports a serial number value. [Field].[Fixed].[Value] imports a fixed value. | no | ||
| FieldSeparator | string | Field separator (long and short): Circumflex (^), Comma (,), Semicolon (😉, Tabulator (Tab) or Pipe (|). | no | Tabulator | Circumflex, Comma, Semicolon, Tabulator, Pipe |
| Headers | integer | Number of header lines. These are skipped at the import. The default value is '0'. | no | 0 | |
| IgnoreErrors | boolean | If 'True' errors are ignored. If 'False' the command is stopped and an error message is displayed. The default value is 'False'. | no | false | |
| MaxRecords | integer | Max number of records to be imported. The default value is '0', which means all records are imported. | no | 0 | |
| Quoted | boolean | If 'True' the text fields are quoted ("Text"). The default value is 'False'. | no | false | |
| ReplaceItem | array of string | Changes items before import ([Dimension].[Old Item].[New Item]). This is helpful for normalization. | no | ||
| ReplaceItemFile | array of string | Loads 'ReplaceItem' from text file ([Dimension].[File].[Separator].[Encoding]). The default separator char is '=' (Old=New). Allowed values for 'Encoding' are: Automatic (checks the file), Ansi, Ascii, BigEndianUnicode, Unicode (Utf16/Utf-16), Utf7 (Utf-7) or Utf8 (Utf-8). The default encoding is 'Automatic', e.g. [Products].[Products.txt].[=].[Automatic] | no | ||
| Round | integer | Rounds all number values to the specified number of digits. The default value is '-1' which means no rounding. | no | -1 | |
| SecondFormat | string | Second format example: HH:MM:SS | no | ||
| Skip | string | If not empty, rows containing the specified value are skipped. | no | ||
| SkipItem | array of string | Skip lines which contains the item ([Dimension].[Item]). The check is only executed if elements have been specified in the dimension. | no | ||
| SkipItemFile | array of string | Loads 'SkipItem' from text file ([Dimension].[File].[Encoding]). Allowed values for 'Encoding' are: Automatic (checks the file), Ansi, Ascii, BigEndianUnicode, Unicode (Utf16/Utf-16), Utf7 (Utf-7) or Utf8 (Utf-8). The default encoding is 'Automatic', e.g. [Products].[Invalid_Products.txt].[Automatic] | no | ||
| ThousandSeparator | string | Thousand separator (long and short): None, Apostrophe ('), Comma (,), Point (.) or Space (_). | no |
Result
No fields
Code
text
IMPORT TABLE
DIMENSION=[string, Multiple, Needed]
FILE=[string, Needed]
TABLE=[string, Needed]
ADD=[boolean, default=false]
ADJUST=[boolean, default=true]
CLEAR=[boolean, default=false]
CODING=[string, default=Automatic, values=[Automatic,Ansi,Ascii,BigEndianUnicode,Unicode,Utf7,Utf8]]
CONTAINSITEM=[string, Multiple]
CONTAINSITEMFILE=[string, Multiple]
CONTAINS=[string]
CREATEITEMS=[boolean, default=false]
DATEOFFSET=[integer, default=0]
DAYFORMAT=[string]
DECIMALSEPARATOR=[string, default=Point, values=[Comma,Point]]
EMPTYITEM=[string]
FIELD=[string, Multiple]
FIELDSEPARATOR=[string, default=Tabulator, values=[Circumflex,Comma,Semicolon,Tabulator,Pipe]]
HEADERS=[integer, default=0]
IGNOREERRORS=[boolean, default=false]
MAXRECORDS=[integer, default=0]
QUOTED=[boolean, default=false]
REPLACEITEM=[string, Multiple]
REPLACEITEMFILE=[string, Multiple]
ROUND=[integer, default=-1]
SECONDFORMAT=[string]
SKIP=[string]
SKIPITEM=[string, Multiple]
SKIPITEMFILE=[string, Multiple]
THOUSANDSEPARATOR=[string]