Upload records from a flat file as raw data, without altering data (preserving spaces)
my flat file is a text file containing records stored sequentially. Each record has a predefined format, where fields are identified either by their position and length (fixed-width format) . no delimiters such as commas in csv format.
"flat file" example :
12345678901234567890123456789012345678
A12345A0005509A00000000012968 000000
A12345A0005509A01123456123456AA123456
A12345A0005509A02 3456 3456AA 3456
A12345A0005509A 1234 1234 AA1234
10000000010000000010000010000010100000
1 1 1 1 11 1 1 1 1
100000000001000 100 10 101
100000000001000 100 10 101
What i've done :
I have tried importing the file using the Fixed-Width format settings in Dataiku DSS, but I cannot find any option to disable the automatic trimming of data. Some fields in the source file intentionally contain leading, trailing, or multiple consecutive spaces. These spaces are part of the data and must be preserved because field positions are defined by a COBOL copybook. When the file is imported, DSS appears to trim spaces automatically, which changes the original record content and shifts the effective field positions.
What i want :
as a first step, i only want to import each complete record as a single column (one row per record), keeping the original content exactly as it appears in the source file. the import process must not trim leading, trailing, or consecutive spaces, and must preserve the exact record length of each line. Each input line should be loaded into a single string column without parsing any fields.
is it possible in DSS to load records from a flat file (in .txt format) as raw data without altering or transforming it, specifically by preserving spaces and the precise character positions within each record ? is there a way to prevent DSS from trimming spaces during import, or alternatively to ingest the file as raw text with no parsing applied?
ideally, for the initial load, i would like
- One input record = one row in DSS
- The entire record stored in a single column
- No trimming
- No parsing
- No type conversion
- No modification of spaces or character positions
- Original record length preserved exactly
i use a free trial DSS
DSS version | 13.3.2 |
|---|---|
OS | ubuntu (22.04) |
Java | Ubuntu (17.0.20) |
thanks for any help.
Dataiku version used: 13.3.2
Answers
-
Flat file with records displayed in Courier New font to clearly visualize spacing and exact character positions.
