开发者

Using Multi Cast transformation for destinations with different columns

What is the use of Multicast Transformation Task ? With this task, is it possible to send to two destinations from a 开发者_如何学Pythonsingle source, while each destination has different columns ?


I assume that you are referring to Multicast Transformation inside the Data Flow task. If so, yes it is possible. The purpose of the transformation is to channel data from a single source to n number of Transformation tasks or Destinations.

If source has following columns

Source
Column 1
Column 2
Column 3

and destinations have these columns.

Destination 1   Destination 2
Column 1        Column 2
Column 3

Both destinations will be able to see Columns 1 - 3 that are available in Source. You have to map the columns accordingly in the respective destinations. Refer below example:

Example:

  1. Screenshot #1 shows that Source has two columns Header and Value.
  2. Screenshot #2 shows that Destination 1 has both columns Header and Value. They are mapped accordingly.
  3. Screenshot #3 shows that Destination 2 has only column Header. It is mapped accordingly.
  4. Screenshot #4 shows sample package execution.

Hope that helps.

Screenshot #1:

Using Multi Cast transformation for destinations with different columns

Screenshot #2:

Using Multi Cast transformation for destinations with different columns

Screenshot #3:

Using Multi Cast transformation for destinations with different columns

Screenshot #4:

Using Multi Cast transformation for destinations with different columns


@Siva did a good job of explaining the how. I'm going to tackle the "What is the use of Multicast Transformation Task?" question.

Let me give you examples of how I have used it or seen it used. First, we like to store the data in a staging table that contains just the raw unchanged data (this makes it easier for us to research data issues to see if the data problem came from a bug in our process or bad data sent by the client.) and at the same time I want to send the same data to another staging table that will be used to transform the data.

Sometimes we use Mulitcast to take denormalized files and send them to normalized data tables. So the names go to the person table, the addresses go to the address table and the phones go to the phone table.

Multicast can be used to do several different transformations on different data fields in the same source at the same time rather than one at a time and then bring all the revised data back together in a Merge join. So one path checks the States to make sure they are valid or converts the long names to the 2 character abbreviations and another checks the zip codes and adds the leading zeros that got lost because the data came from an Excel file. Then the cleaned address data is put back together with the correct values we want for insertion to our database. This can speed up cleaning as data is being scrubbed simultaneously not one step at a time.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜