Joining a sequential file and a data set

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
pdntsap
Premium Member
Premium Member
Posts: 107
Joined: Mon Jul 04, 2011 5:38 pm

Joining a sequential file and a data set

Post by pdntsap »

Hello,

I used a Join Stage to join two sequential files based on a common column and it worked fine. One of the sequential files was replaced by a data set and loaded with the same data (same column names and data types, length) but now I get the following error when the job is run:

subArgs={asc}}}: Error when checking tsort: Sort key field not found: TRAVEL_ID
Data_Set_20: When checking operator: The modify operator has a binding for the non-existent output field "TRAVEL_ID".
Data_Set_20: When checking operator: The modify operator keeps field "TRAVEL_ID" which is not present in the output interface.


TRAVEL_ID is the common column.

Any help provided is appreciated.

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

Re: Joining a sequential file and a data set

Post by SURA »

Try to recreate the dataset again with the key column and try it again.

DS User
pdntsap
Premium Member
Premium Member
Posts: 107
Joined: Mon Jul 04, 2011 5:38 pm

Post by pdntsap »

I must also add this.

The column 'TRAVEL_ID' is stored under a different name when writing to the data set. When I again read the data set, I read the corresponding column to 'TRAVEL_ID'. I did the same renaming when reading the sequential file and the joiner worked fine. I also tried reading the data set without renaming the columns, added a Modify stage to rename the column and then use a Join Stage to join the data set and sequential file but it did not work either.

Sura, I tried it again and still the same problem.

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

Post by SURA »

1. Try to read the .ds file (view data) and ensure that you can read it properly. If so the problem is renaming the column name.

2.Just for testing purpose, use TFM stage and rename the output column and check it.

So that you can come to know. As the same let us know what you did in the modify stage.

DS User
pdntsap
Premium Member
Premium Member
Posts: 107
Joined: Mon Jul 04, 2011 5:38 pm

Post by pdntsap »

Sura,

[quote]Try to recreate the dataset again with the key column and try it again.

I misread your suggestion yesterday. So, when creating the dataset, I changed the key column name to the column name that would be used in the joiner. I read the dataset again and use it in the joiner and it works fine. But this solution will not work if the same column has to be used as a key in another joiner but with a different column name, right?

Thanks.
pdntsap
Premium Member
Premium Member
Posts: 107
Joined: Mon Jul 04, 2011 5:38 pm

Post by pdntsap »

On a related note, if the key columns from either input files to the Join Stage are nullable, is it best to have the corresponding input file as a sequential file rather than a data set?

Thanks.
Post Reply