Forum Discussion

Soumic_Mohanty's avatar
Soumic_Mohanty
New Contributor II
2 years ago

How to parse a ".txt" file?

Hi All,
I have a “.txt” file to parse & convert it into json structure with specified headers.
How to do?

1 Reply

  • bojanvelevski's avatar
    bojanvelevski
    Valued Contributor

    Hi @Soumic_Mohanty ,

    I believe you can read it with a plain File Reader snap, use Binary to Document to decode the contents and use mapper to spllit the content you want to process.

    Here’s a pipeline that is doing exactly what I’m saying.

    Process TXT Files_2023_07_18.slp (4.7 KB)

    Let me know if this helps,
    Bojan