Create or modify a mapping in a DFT depending on the column value

  • Hi friends,

    I already asked this question some weeks ago, but how would you add a column to a DFT depending on its value?

    I'm using the Data Flow Tas Plus component from CozyRoc. As long as I've understood, this component dynamically manages the metadata. The example in the CozyRoc Website shows how to insert data in a table from Flat Files with different column names.

    In my case, all of the columns have the same names and are always present, I just want drop a column from the data flow depending on its value. For instance, if the field emailaddress is null or empty, don't map the column to the destination.

    Is this possible?

    I`m thinking in a script component that add rows to the dataflow using the correspondent API, but I'm no able to see the light at the end of the tunnel.

    Could someone please suggest something?

    Kind Regards,

    Paul Hernández
  • So do you mean that somehow you will check all of the data values in all of the columns, looking for those columns which do not contain any values at all, and then unmap those columns?

    That would require reading the file twice and (I would guess) would take longer than just leaving the blanks in there.

    The absence of evidence is not evidence of absence
    - Martin Rees
    The absence of consumable DDL, sample data and desired results is, however, evidence of the absence of my response
    - Phil Parkin

  • Hi Phil,

    Thanks for your quick answers.

    In my case the source is a OLE DB component, and the reason to do such a things is the final destination is a Dynamics CRM.

    I think the problem is, I´m trying to implement some logic in the ETL side that should be implemented by the CRM developers, but at the end we should determine the simple way for everyone.

    Paul Hernández
  • Paul Hernández (4/15/2013)


    Hi Phil,

    Thanks for your quick answers.

    In my case the source is a OLE DB component, and the reason to do such a things is the final destination is a Dynamics CRM.

    I think the problem is, I´m trying to implement some logic in the ETL side that should be implemented by the CRM developers, but at the end we should determine the simple way for everyone.

    So if a column contains 999 nulls and one actual value, that is fine. But 1,000 nulls and you want to lose the column mapping?

    Sounds somewhat strange, tbh.

    This dynamic (not 'Dynamics'!) mapping will take up a chunk of valuable development time to create a complex solution that ultimately will perform slower (from a SQL Server standpoint anyway) than the simple version. Have you no other choices?

    The absence of evidence is not evidence of absence
    - Martin Rees
    The absence of consumable DDL, sample data and desired results is, however, evidence of the absence of my response
    - Phil Parkin

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply