- Posts: 604
- Thank you received: 82
Query about Field Names and Positions
- bruce.gibbins
- Topic Author
- Offline
- Platinum Member
-
Less
More
3 months 2 weeks ago #22805
by bruce.gibbins
Query about Field Names and Positions was created by bruce.gibbins
Hi,
We come across this issue quite a lot as our inbound files do change their structure from time to time.
I have an existing transformation that has a field select quite close the beginning of transformation and there are a number of transformation steps that follow. We now have to include one of the fields that was excluded in the Field Select Action. This means that the field positions after this field will all increase by one which in turn means that the downstream steps will be using field positions offset by one. Then then means, lookups and conditions will also be working with the wrong fields.
Is there a convenient way to include this extra field but not have to rework all of the subsequent steps (which is quite involved).
thanks in advance.
We come across this issue quite a lot as our inbound files do change their structure from time to time.
I have an existing transformation that has a field select quite close the beginning of transformation and there are a number of transformation steps that follow. We now have to include one of the fields that was excluded in the Field Select Action. This means that the field positions after this field will all increase by one which in turn means that the downstream steps will be using field positions offset by one. Then then means, lookups and conditions will also be working with the wrong fields.
Is there a convenient way to include this extra field but not have to rework all of the subsequent steps (which is quite involved).
thanks in advance.
Please Log in or Create an account to join the conversation.
3 months 1 week ago #22807
by admin
Mike
ETL Architect
Replied by admin on topic Query about Field Names and Positions
Just place another transformation after the reader and use it for mapping only. (Eg no transformations)
If a new field is added make sure that is the last one. Tna way no "Field Shift" will ever happen
If a new field is added make sure that is the last one. Tna way no "Field Shift" will ever happen
Mike
ETL Architect
Please Log in or Create an account to join the conversation.
3 months 1 week ago #22808
by admin
Mike
ETL Architect
Replied by admin on topic Query about Field Names and Positions
Correction put transformer after field selector and use automap.
If a new field is needed use automap again
If a new field is needed use automap again
Mike
ETL Architect
Please Log in or Create an account to join the conversation.
- bruce.gibbins
- Topic Author
- Offline
- Platinum Member
-
Less
More
- Posts: 604
- Thank you received: 82
3 months 1 week ago - 3 months 1 week ago #22810
by bruce.gibbins
Replied by bruce.gibbins on topic Query about Field Names and Positions
Didn't initially work. After making a clone of the original transformation I did as suggested and could see that the straight through map with Automap made sense. But after enabling the missing field I went back into the straight Thru Map, saw the missing field and being lazy I dropped all of the output fields and regenerated them again and then did the second AutoMap. But I noticed that the downstream transformation had been affected by field positions.
I started again with a new clone and followed the following steps (for future reference). And this seems to have worked.
* Made a Clone of the Transformation
* Left missing field OUT of Field Selector
* Inserted a new Transformation immediately after the Field Selector called "StraightThru"
* Edited "StraighThru". Auto Generated the Output Fields
* Auto Mapped the fields based on name
* Connected the Output from the Field Selector to the new "StraightThru" transformer
* Connected the Output from the "StraightThru" to the Input of the next downstream transformer
* Checked that the downstream actions were dealing with the same fieldnames
* Enabled the missing field in the Field Selector
* Edited the "StraightThru" transformer. Found the missing field, created a new matching output field with the same name
* Manually Linked these two fields and saved the transformation
* This new field then appeared in the downstream transformations
thanks
I started again with a new clone and followed the following steps (for future reference). And this seems to have worked.
* Made a Clone of the Transformation
* Left missing field OUT of Field Selector
* Inserted a new Transformation immediately after the Field Selector called "StraightThru"
* Edited "StraighThru". Auto Generated the Output Fields
* Auto Mapped the fields based on name
* Connected the Output from the Field Selector to the new "StraightThru" transformer
* Connected the Output from the "StraightThru" to the Input of the next downstream transformer
* Checked that the downstream actions were dealing with the same fieldnames
* Enabled the missing field in the Field Selector
* Edited the "StraightThru" transformer. Found the missing field, created a new matching output field with the same name
* Manually Linked these two fields and saved the transformation
* This new field then appeared in the downstream transformations
thanks
Last edit: 3 months 1 week ago by bruce.gibbins.
Please Log in or Create an account to join the conversation.
3 months 1 week ago #22811
by admin
Mike
ETL Architect
Replied by admin on topic Query about Field Names and Positions
Thank you for detailed explanation
I am glad you got it working correctly
I am glad you got it working correctly
Mike
ETL Architect
Please Log in or Create an account to join the conversation.