Single Line Text File

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
btmorris3
Participant
Posts: 4
Joined: Fri Jul 30, 2004 7:47 am

Single Line Text File

Post by btmorris3 »

I need to load a file into an Oracle table. This file can have hundreds of records but they are all on the same line in the text file. In other words, there are no line breaks in this file. The record length is 2024 spaces and somehow I just need to tell DS to start back at the beginning of the record every 2024 spaces. DS doesn't seem to have any concept of this type file from what I can see. What do I need to do?

Right now I'm pushing a sequential file stage into an Oracle Plugin table stage through a transformer stage.

Thanks
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

You marked this as Server but posted it where PX questions are normally posted, so I'll answer from a Server standpoint. No clue if the answer changes for PX. :?

Simply mark the file as "Fixed Width" in the Sequential File stage and tell it that "Line Termination" style is "none". It will then use your metadata to read X bytes from the file at a time, so you just need to make sure your column definitions are correct and that the display sizes add up to 2024. Suggest you define everything as a char to keep it simple. You can convert things to the "proper" types in the Transformer.

Then you should be fine!
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply