The Fixed Width driver is used to load data from a Fixed Width text file. The driver does not handle data types but loads the data into string that then can be parsed using the InMemory functions.
Connection String Parameters:
Keyword | Value | Description |
encoding | Windows-1252 | Determines the character set. The encoding specified must be in the list of encodings available in the .NET API |
Wiki Markup |
---|
*Query Parameters:* The query parameters for the Fixed Width driver requires specification of the size of the individual columns in the format \[column_width_as_integer\] columnname for each column, which in full syntax would be: SELECT \[column_width_as_integer\] columnname FROM \[path_to_fixedwidth_file\] This is best described with the following data example: !worddavac81886d7d7132ac6fafe72ab25754bb.png|height=176,width=694! Being transformed with the following command: SELECT \[8\] Entry, \[4\] Period, \[12\] PostDate, \[13\] GLAccount,\[26\] Description, \[6\] Srce, \[4\] CFlow, \[10\] Ref, \[4\] Post, \[18\] Debit, \[20\] Credit,\[6\] Alloc FROM\[d:\demodata\fixedwidthexample.txt\] Will be transformed into: !worddavd20d77ed45152148aa1226614a6401a8.png|height=248,width=675! \\ Example: *LOAD* ASSEMBLY 'TARGIT.FixedWidth.dll' *DATASOURCE* \[Fixed Width\] = DOTNET CONNECTION 'FixedWidth.FixedWidthConnection' 'encoding=Windows-1252;' *IMPORT* \[FixedWidthExample\] = \[Fixed Width\].\{{*}SELECT* \[8\] Entry, \[4\] Period, \[12\] PostDate, \[13\] GLAccount,\[26\] Description, \[6\] Srce, \[4\] CFlow, \[10\] Ref, \[4\] Post, \[18\] Debit, \[20\] Credit,\[6\] Alloc *FROM* \[d:\demodata\fixedwidthexample.txt\]\} |