Skip to content

Import Table

Imports a table from a text file. The text file is loaded from the server.

Permissions

Command KindNeeded User Kind
WriteAll

Parameters

NameTypeDescriptionRequiredDefaultValues
Dimensionarray of stringColumn 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
FilestringName/path of the import file. The file is imported on the server.yes
TablestringName of the table ([Table]).yes
AddbooleanIf 'True', the new value is added to an existing one. If 'False', the new value overwrites an existing one. The default value is 'False'.nofalse
AdjustbooleanIf 'True' protected command chars are replaced: '[' becomes '(', ']' becomes ')' and '=' becomes empty. The default value is 'True'.notrue
ClearbooleanIf 'True' all records of the table are deleted before import. The default value is 'False'.nofalse
CodingstringCoding 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 AutomaticnoAutomaticAutomatic, Ansi, Ascii, BigEndianUnicode, Unicode, Utf7, Utf8
ContainsItemarray of stringImports only lines which contains the item ([Dimension].[Item]). The check is only executed if elements have been specified in the dimension.no
ContainsItemFilearray of stringLoads '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
ContainsstringIf not empty, only rows containing this value are imported.no
CreateItemsbooleanIf 'True' non existing items will be created. The default value is 'False'.nofalse
DateOffsetintegerMoves 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'.no0
DayFormatstringDay format examples: YYYY-MM-DD, MM/DD/YYYY, MM-DD-YYYY, DD.MM.YYYY.no
DecimalSeparatorstringDecimal separator (long and short): Comma (,) or Point (.). The default value is Point (.)noPointComma, Point
EmptyItemstringIf the name of an item is empty, the value is used for the name.no
Fieldarray of stringColumn 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
FieldSeparatorstringField separator (long and short): Circumflex (^), Comma (,), Semicolon (😉, Tabulator (Tab) or Pipe (|).noTabulatorCircumflex, Comma, Semicolon, Tabulator, Pipe
HeadersintegerNumber of header lines. These are skipped at the import. The default value is '0'.no0
IgnoreErrorsbooleanIf 'True' errors are ignored. If 'False' the command is stopped and an error message is displayed. The default value is 'False'.nofalse
MaxRecordsintegerMax number of records to be imported. The default value is '0', which means all records are imported.no0
QuotedbooleanIf 'True' the text fields are quoted ("Text"). The default value is 'False'.nofalse
ReplaceItemarray of stringChanges items before import ([Dimension].[Old Item].[New Item]). This is helpful for normalization.no
ReplaceItemFilearray of stringLoads '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
RoundintegerRounds all number values to the specified number of digits. The default value is '-1' which means no rounding.no-1
SecondFormatstringSecond format example: HH:MM:SSno
SkipstringIf not empty, rows containing the specified value are skipped.no
SkipItemarray of stringSkip lines which contains the item ([Dimension].[Item]). The check is only executed if elements have been specified in the dimension.no
SkipItemFilearray of stringLoads '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
ThousandSeparatorstringThousand 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]