Read and process fixed width file

srinivas_anand
srinivas_anand Registered Posts: 5 ✭✭✭✭
I'm looking to import a fixed-width file into DSS. The basic import is working fine, but my additional need is that the first line of each file has a date field. I need to extract that field and append as a new column to the dataset.

For example,

F317AF0205008:02:07 19/07/22 0960 1

01234567890 ABCDE ABC DEF 98765ABC432109DEFG 15.245



I have column widths to split line 2 and the rest of the file. What would you suggest I try to get the date? Also, we expect to get a file everyday.



Srini

Best Answer

  • Mattsco
    Mattsco Dataiker, Registered Posts: 125 Dataiker
    Answer ✓
    Hi Srinivas,

    I don't see any built-in solution for that in DSS
    I would suggest using python to parse these files, you store them in a folder, then extract the date of the first line and add it to a new column.

    Matt

Answers

Setup Info
    Tags
      Help me…