Lets say i have a job like dataset--->transformer--->flatfile. In Transformer, input contains all fields from dataset and output of transformer contains only one filed name COL1 for which the derivation is harcoded to 'H'. (this is a sample job. in this we are not using the data from dataset). Now when i run the job, if the data is available in dataset, then the transformer executes and creates H in COL1 field of flat file. But when the dataset is empty, transformer never creates H in COL1 of flat file. i cannot understand this. Because the output field is hardccoded(independent of input data) and when i run the job it should produce H irrespective on input data of dataset.
IF we have data in dataset, it is producing H. If we dont have data, outpu tin flatfile is empty. How can i make the transformer running and produce H in sequential file eventhough there is no data in dataset.
Trnasformer issue
Moderators: chulett, rschirm, roy
-
- Premium Member
- Posts: 236
- Joined: Sun Apr 01, 2007 7:41 am
- Location: Michigan
Re: Trnasformer issue
Ok..."i have a job like dataset--->transformer--->flatfile."
(sorry, had to get that out of the way)
(sorry, had to get that out of the way)
Why not? No data in equals no data out.just4u_sharath wrote:i cannot understand this.
Nothing is 'independent of input data', so the assertion made here is incorrect.just4u_sharath then wrote:Because the output field is hardccoded(independent of input data) and when i run the job it should produce H irrespective on input data of dataset.
You'd need to ensure that at least one record flows through your job even if your 'dataset' / source doesn't produce any records. Then join the two streams if you actually need the data from your source. If you don't, why not just use something like a Row Generator to trigger this?just4u_sharath lastly wrote:IF we have data in dataset, it is producing H. If we dont have data, output in flatfile is empty. How can i make the transformer running and produce H in sequential file even though there is no data in dataset.
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
-
- Premium Member
- Posts: 236
- Joined: Sun Apr 01, 2007 7:41 am
- Location: Michigan
Re: Trnasformer issue
Dataset takes either an input or output link. So its full. Transformer cannot accept more than 1 input link. Flat file is also the same. So where can i use rowgenerator to trigger this. Actually in the flat file COL1 field the derivation will be built using the stage variable of transformer and parameters of job. So eventhough there is no input data, transformer stagevariables should execute and produce the output in flat file. How this can be achieved?chulett wrote:Ok..."i have a job like dataset--->transformer--->flatfile."
(sorry, had to get that out of the way)
Why not? No data in equals no data out.just4u_sharath wrote:i cannot understand this.
Nothing is 'independent of input data', so the assertion made here is incorrect.just4u_sharath then wrote:Because the output field is hardccoded(independent of input data) and when i run the job it should produce H irrespective on input data of dataset.
You'd need to ensure that at least one record flows through your job even if your 'dataset' / source doesn't produce any records. Then join the two streams if you actually need the data from your source. If you don't, why not just use something like a Row Generator to trigger this?just4u_sharath lastly wrote:IF we have data in dataset, it is producing H. If we dont have data, output in flatfile is empty. How can i make the transformer running and produce H in sequential file even though there is no data in dataset.