Is delimiter can be parameterized at job level

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
NL
Participant
Posts: 8
Joined: Mon Mar 05, 2012 1:25 am

Is delimiter can be parameterized at job level

Post by NL »

Hi,

I have a requirement that the sequential file can come with data of any delimiter.I can see delimiter can be selected from list of options in properties of sequential stage but this is not promoting to have parameter to be included in the list. Can any one help me on whether the delimiter can be parameterized at job level, if Yes can you tell me how?

Thanks
LK
priyadarshikunal
Premium Member
Premium Member
Posts: 1735
Joined: Thu Mar 01, 2007 5:44 am
Location: Troy, MI

Post by priyadarshikunal »

Welcome aboard!!

Did you try delimiter string property? don't remember what it is actually called but should be similar.
Priyadarshi Kunal

Genius may have its limitations, but stupidity is not thus handicapped. :wink:
NL
Participant
Posts: 8
Joined: Mon Mar 05, 2012 1:25 am

Post by NL »

Once we choose the type of delimeter can not be changed.I want to send delimeter during runtime.Help me if you have any idea on this.

Thanks & regards,
NL
pandeesh
Premium Member
Premium Member
Posts: 1399
Joined: Sun Oct 24, 2010 5:15 am
Location: CHENNAI, TAMIL NADU

Post by pandeesh »

Are you NL or LK?
Your first and recent post differs in signature.
Are two people using the same account? :D
pandeeswaran
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

I don't believe that it can be parameterized but perhaps you could use schema files to control that?
-craig

"You can never have too many knives" -- Logan Nine Fingers
SURA
Premium Member
Premium Member
Posts: 1229
Joined: Sat Jul 14, 2007 5:16 am
Location: Sydney

Re: Is delimiter can be parameterized at job level

Post by SURA »

You Can:

If you create a USER DEFINE STAGE.

DS User
SURA
Premium Member
Premium Member
Posts: 1229
Joined: Sat Jul 14, 2007 5:16 am
Location: Sydney

Re: Is delimiter can be parameterized at job level

Post by SURA »

Is it not as simple as i thought. But i am trying now.

DS User
NL
Participant
Posts: 8
Joined: Mon Mar 05, 2012 1:25 am

Post by NL »

chulett wrote:I don't believe that it can be parameterized but perhaps you could use schema files to control that?
Craig can you elaborate me more on controlling using schema files.
Thanks
kandyshandy
Participant
Posts: 597
Joined: Fri Apr 29, 2005 6:19 am
Location: Singapore

Post by kandyshandy »

Schema file will not be an easy option... Do you know the possible delimiters (in this world) that would come in your file? Is it like 2 or 3 or less than 5?
Kandy
_________________
Try and Try again…You will succeed atlast!!
qt_ky
Premium Member
Premium Member
Posts: 2895
Joined: Wed Aug 03, 2011 6:16 am
Location: USA

Post by qt_ky »

That sounds like an unusual requirement. I have not tried it, but I think you should be able to read your delimited file in with no delimiter or quote character using a single VarChar column. Then in a Transformer stage put in logic to columnize each record based on your delimiter parameter.
Choose a job you love, and you will never have to work a day in your life. - Confucius
eph
Premium Member
Premium Member
Posts: 110
Joined: Mon Oct 18, 2010 10:25 am

Post by eph »

Hi,

I've already done this using a logic as following:
- In sequence job, detect your delimiter and other properties
- Optionally call either a command line, script or job to modify a template schema file properties (delim_string='#Your Char#')
- Then run you job using the correct schema file passed as a job parameter

Schema file properties overwrite all stage properties, so it should work like this.

Regards,
Eric
qt_ky
Premium Member
Premium Member
Posts: 2895
Joined: Wed Aug 03, 2011 6:16 am
Location: USA

Post by qt_ky »

I think Eric has identified a good solution. :idea:
Choose a job you love, and you will never have to work a day in your life. - Confucius
NL
Participant
Posts: 8
Joined: Mon Mar 05, 2012 1:25 am

Post by NL »

Hi Eric,

It is a very good design approach.The current design which we have is the same.Execution time taking is more as we have so many sequential files with windows batch scripts.So I am looking for the option something in data stage.Can you please help me on this if you have any other?

Thanks,
NL
qt_ky
Premium Member
Premium Member
Posts: 2895
Joined: Wed Aug 03, 2011 6:16 am
Location: USA

Post by qt_ky »

Two Erics have suggested two options, both in DataStage. Which ones have you tried? Columnization that I mentioned (Column Import stage does the same thing) will take the task of dividing rows into columns in parallel across your nodes. When you do it the default way in the Sequential File stage, it happens sequentially. I think if you can get this approach to work, it will be faster, unless your server is overloaded to begin with.
Choose a job you love, and you will never have to work a day in your life. - Confucius
Post Reply