Hello Everyone,
I added a new column in the target table in the data base, but this column is not showing in the list of columns in the Query Mapping.
I have a Data Flow that loads data from 6 different source tables into one target table. As for transformation there is only one Query Mapping object. The 6 tables feed into this Query Mapping and this in turn feeds into the target table. I need to add a column into the target table that fills in just a dummy VARCHAR value for every transaction. I added a new column into the database and using DI Designer I re-imported the metadata so that the new column shows up. Then I deleted the join between the Query Mapping object and the target table and recreated them. However the new column does not show up. Interestingly if I place a new Query Mapping between my old Query and the target table and make the appropriate joins, the new column shows up in the new Query though.
I would need this column to show up in my old Query Mapping. Is there anything I am not doing right?
Any suggestions, recommendations and any ideas greatly appreciated.
Thanks in advance.
**By saying joins, i mean the “Flow pointers” between the objects and transformations.
But just try this. In your old query mapping, eventhough the new column don’t show up, you create a new target column with the same exact name of that TARGET column (the newly added column in the table) and map the things and run it.
I actually tried that, but the funny thing is that when I ran the job it did not load any data. The target table does have an option - “Delete data from table before loading:” checked. It looks like it deleted the data but never loaded it from the source. I checked the source table in DI designer by clicking on those “little magnifying glasses” on the source table icons in the Data Flow and it does comeback with data - meaning that the DI has not lost connection or anything with the source tables. Any ideas as to why this might be happening. I do appreciate your insights.
Actually I tried going that route but then how do you just add a column from the target definition to the Query Transform. It is easy to add a column from the Source Definitions but was not able to do so from the target definition.
Firstly, Reimport your target Table defn into BODI. See if that helps. (This is regarding your Table now showing any records).
Regarding Copying Column from target Defn.
Open the data flow where you have the Target Defn.
Click open your tagret Defn ,
Right click on the Column name which you want in your Query Transformation and select Copy.
Open your Query Transformation and Right click on any column, you will get an option of Paste.
When you select Paste another POP Up will appear which will have Options “Insert above”,“Insert Below” and a couple of more.
Select Insert Above or Insert Below and your column will appear in the Query Transformation.
Implement the required Logic on that column to Populate it correctly.
it looks like its going to work. But before I got the suggestion I actually created a brand new Query Transform with the existing logic/mappings but with an additional column of course, that seems to be working. I will try Tarunvg’s suggestion next time when I need to do it again.