Page 1 of 1

Job with no "Primary Input" stage

Posted: Thu Jul 07, 2005 12:44 pm
by tomengers
This is probably quite simple ... I want to create a little hash file with some literal values. And I can build these values in the transformer stage, so I have a 2 stage job: xfm => hsh. But the compiler doesn't like it, telling me there is "no primary input stage". Is there a short-cut here or must I build a source file somewhere and then read it in ... ???

thanks ...

... tom

Posted: Thu Jul 07, 2005 12:49 pm
by tonystark622
Tom,

I think you can do what you want to do with Stage Variables... Having said that, I usually just build a little text file and read it in to a hash file for stuff like this... That way if the data ever changes, I just change the file and don't have to recompile the job.

Tony

Posted: Thu Jul 07, 2005 12:55 pm
by kduke
I did not think it is possible but it will allow you to have a transform without primary input. You need stage variables. Like x=1 initial value then x=x+1. Next you need a constrait like x<100. Try it. I have seen people do this to create time and day dimensions. Saves coding the whole thing in a batch job. I still prefer batch jobs. Reading and writing to hash files is too easy in BASIC.

Posted: Thu Jul 07, 2005 1:03 pm
by Sainath.Srinivasan
If you want literal values, you are better-off putting it in a sequential file and load it via a datastage job.

Posted: Thu Jul 07, 2005 1:17 pm
by chulett
They are right, all you need to do is define a stage variable - even if you don't use it - it needs to be there so the job will compile.

Posted: Thu Jul 07, 2005 3:29 pm
by ray.wurlod
I agree with Kim, it can be done and is useful for the kind of thing envisaged.