How can use mapping in SSIS using Script in SSIS

  • This example i have in my DTS package..

    Function Main()

     DTSDestination("DATA")=YEAR(DATE) & "-" & RIGHT("0" & TRIM(CSTR(MONTH(DATE))), 2) & "-" & RIGHT("0" & TRIM(CSTR(DAY(DATE))), 2)

     DTSDestination("BDNCAR") = DTSSource("BDNCAR")

     DTSDestination("BDSITU") = DTSSource("BDSITU")

     DTSDestination("BDMSIT") = DTSSource("BDMSIT")

     DTSDestination("BDDTEM") = DTSSource("BDDTEM")

     DTSDestination("BDDTEX") = DTSSource("BDDTEX")

     DTSDestination("BDDTUU") = DTSSource("BDDTUU")

     DTSDestination("BDDSIT") = DTSSource("BDDSIT")

     DTSDestination("BDNVUS") = DTSSource("BDNVUS")

     DTSDestination("BDNOM1") = DTSSource("BDNOM1")

     DTSDestination("BDRCLI") = DTSSource("BDRCLI")

     DTSDestination("BDNCLI") = DTSSource("BDNCLI")

     DTSDestination("BDNATR") = DTSSource("BDNATR")

     DTSDestination("BDNSEQ") = DTSSource("BDNSEQ")

     DTSDestination("BDRCAR") = DTSSource("BDRCAR")

     DTSDestination("BDMOED") = DTSSource("BDMOED")

     DTSDestination("BDTANU") = DTSSource("BDTANU")

     DTSDestination("BDANUI") = DTSSource("BDANUI")

     DTSDestination("BDTEMI") = DTSSource("BDTEMI")

     DTSDestination("BDCCAS") = DTSSource("BDCCAS")

     DTSDestination("CMBDCLCP") = DTSSource("CMBDCLCP")

     DTSDestination("BDCPRD") = DTSSource("BDCPRD")

     DTSDestination("BDCCPR") = DTSSource("BDCCPR")

     Main = DTSTransformStat_OK

    End Function

    I have to change and remake this package(dts) using SSIS package..pLease can any one tel me how can i solve this problem.

    how can i create this kind of mapping in my SSIS project??

    thank you dilsa

  • Dilsa,

    It looks like this is a fairly simple mapping, with only the first value requiring any manipulation before going to the destination.  I would use a Derived Column task to send the new value you call "DATA" to the destination.  You don't need to script this kind of task in SSIS.

    hth

    Tim

    Tim Mitchell, Microsoft Data Platform MVP
    Data Warehouse and ETL Consultant
    TimMitchell.net | @Tim_Mitchell | Tyleris.com
    ETL Best Practices

  • Yes very true......

    This seems to be a like a very simple mapping. Just create a DataFlow task. Define a source and a destination and have a derived col transform in between. On the dest connection, map based on the specs you have in the old DTS package.

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

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