Specify data types for Fixed Width files #17
Replies: 1 comment
-
There is a Fixed Width Format input module you can use, as follows: You can drag/drop these input modules from the module library on the left, or right click on the green dot of the file streamer input to find it. You can have as many of these as needed, order does matter. The inputs have the following structure:
You can also generate the column width inputs based on a table. This can be an easier approach if you have a ton of columns and don’t want to use individual input modules as shown above. Assuming you have a table with the required information (e.g., column name, width, format), read that into a Code module with the following code: (Note, this will need to be modified based on the input table) Using the Code module and C#, this can be implemented as follows. But you can use any of the other Code modules (e.g., Python Code, etc.).
|
Beta Was this translation helpful? Give feedback.
-
I have a need in a DataFlow to import a fixed-width TXT file. Can I enter the data type details using into the “FixedWidthColumns” attribute (and if so, what would the format be)?
Beta Was this translation helpful? Give feedback.
All reactions