Thursday, March 8, 2012

Adding new Guid to destination

Source table has two fields, int and string. Destination has three fields, int, string and Uniqueidentifier (Guid). For each source row added to the destination, I need to add a new Guid. I know how to make a new Guid in VB.NET script, but how do I inject it into the transformation for each row. I see the “foreach loop container” component and I suspect I need to use it, but I am stumped. Any help would be most appreciated

Paul SullivanUse script component in the DataFlow (added between source and destination). When you edit it, mark your guid column as read/write input column and in the script template write something like

Row.MyGuid = ...|||

Hi,

I have the same task as you have.

Did you make the script component for adding Guid to each source row?

Could you please help me to understand it?

If you could share some source code and some settings for it - would be great!

Thanks.

|||

Vita wrote:

Hi,

I have the same task as you have.

Did you make the script component for adding Guid to each source row?

Could you please help me to understand it?

If you could share some source code and some settings for it - would be great!

Thanks.

Imports System

.

.

.

.

Row.MyGuid = System.Guid.NewGuid()

Regards

Jamie

|||

I did not think that configuration for it would be so easy.

Thanks a lot.

No comments:

Post a Comment