concatenate all the output rows in a variable
Moderators: chulett, rschirm, roy
concatenate all the output rows in a variable
hi all,
i have requirement to concatenate all the input records and then only pass it as a single record in to the sequential file.How can i do this?
i have requirement to concatenate all the input records and then only pass it as a single record in to the sequential file.How can i do this?
Define a stage varialbe say "stgVar" with derivation "stgVar:in.Col". Your output link will have one column defined with the above stage variable as its derivation. The last row will be what you want. You can get that by, either passing it through the aggregator, or doing a tail -1 on the file.
While reading the records, read it as a single value by specifying 000 as delimiter and specifying only one column.
What do you intent to do? The record is going to be one HUGE record.
While reading the records, read it as a single value by specifying 000 as delimiter and specifying only one column.
What do you intent to do? The record is going to be one HUGE record.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
-
- Premium Member
- Posts: 1255
- Joined: Wed Feb 02, 2005 11:54 am
- Location: United States of America
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Do you really mean all the records, or all the columns? Or one column from all the records? Do you want them delimited, or simply concatenated?
There are many possible solutions, depending upon exact requirements. Most, if not all, will involve one or more stage variables.
There are many possible solutions, depending upon exact requirements. Most, if not all, will involve one or more stage variables.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
I have three columns in one row which are concatenated and there are 5 records which are concatenated with or. Iwas able to concatenate.
the soure is an an OCI stage
The problem is when i don't have any input any records A NULL STRING IS BEING PROCESSED instead OF THE NULL STRING i want to pass a value of 1=2
the soure is an an OCI stage
The problem is when i don't have any input any records A NULL STRING IS BEING PROCESSED instead OF THE NULL STRING i want to pass a value of 1=2
yes what you said was exactly right.kumar_s wrote:Is it like you are processing some kind of where class to another database or a script file or something?
After concatenation, check for IsNull(), and assign the required default value.
I have used IsNull() condition but i observed is that once there are records in the input oracle source the transformer stage is not processed at all .Is it reaaly happens like that
When there are no records in the OCI stage the stage varible in the transformer should have a different value .I have tried all the means . BUt the value which i want is never written
hi Parvathi,
Sorry, I couldn't get what you exactly mean here.
Do you mean to say, the records are getting reject at transformer or not passing after this stage?
If so check the constraints and metadata options for nullable. If you see the statistics in the input link of the tranformer, and if there is not constraints and and with compatable input/output metadata, rows should be passed to output.
You can explain, more on what are you doing in tranformer, with the condition mentioned.
Sorry, I couldn't get what you exactly mean here.
Do you mean to say, the records are getting reject at transformer or not passing after this stage?
If so check the constraints and metadata options for nullable. If you see the statistics in the input link of the tranformer, and if there is not constraints and and with compatable input/output metadata, rows should be passed to output.
You can explain, more on what are you doing in tranformer, with the condition mentioned.
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'