What are the differences between Merge Join and Lookup transformations in SSIS?

前端 未结 7 1490
孤城傲影
孤城傲影 2020-12-02 11:10

Hi I\'m new to SSIS packages and writing a package and reading up about them at the same time.

I need to convert a DTS into a SSIS package and I need to perform a j

相关标签:
7条回答
  • 2020-12-02 12:07

    A Merge Join is designed to produce results similar to how JOINs work in SQL. The Lookup component does not work like a SQL JOIN. Here's an example where the results would differ.

    If you have a one-to-many relationship between input 1 (e.g., Invoices) and input 2 (e.g., Invoice Line Items), you want the results of the combining of these two inputs to include one or more rows for a single invoice.

    With a Merge Join you will get the desired output. With a Lookup, where input 2 is the look up source, the output will be one row per invoice, no matter how many rows exist in input 2. I don't recall which row from input 2 the data would come, but I'm pretty sure you will get a duplicate-data warning, at least.

    So, each component has its own role in SSIS.

    0 讨论(0)
提交回复
热议问题