Query about Field Names and Positions

More
3 months 2 weeks ago #22805 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.
 

Please Log in or Create an account to join the conversation.

More
3 months 1 week ago #22807 by admin
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

Mike
ETL Architect

Please Log in or Create an account to join the conversation.

More
3 months 1 week ago #22808 by admin
Correction put transformer after field selector and use automap.

If a new field is needed use automap again

Mike
ETL Architect

Please Log in or Create an account to join the conversation.

More
3 months 1 week ago - 3 months 1 week ago #22810 by bruce.gibbins
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
Last edit: 3 months 1 week ago by bruce.gibbins.

Please Log in or Create an account to join the conversation.

More
3 months 1 week ago #22811 by admin
Thank you for detailed explanation

I am glad you got it working correctly

Mike
ETL Architect

Please Log in or Create an account to join the conversation.

Save
Cookies user preferences
We use cookies to ensure you to get the best experience on our website. If you decline the use of cookies, this website may not function as expected.
Accept all
Decline all
Read more
Marketing
Set of techniques which have for object the commercial strategy and in particular the market study.
Google
Accept
Decline
Analytics
Tools used to analyze the data to measure the effectiveness of a website and to understand how it works.
Google Analytics
Accept
Decline
Functional
Tools used to give you more features when navigating on the website, this can include social sharing.