822
Part V: Enterprise Data Management
Clear Data task: Click anywhere on this green arrow, and drag it to the fi rst
data fl ow task. Doing so creates a connection from the Clear Data task to the
fi rst data fl ow task, signifying the fl ow of execution. When the Clear Data task has
completed executing, the fi rst data fl ow task then executes.
- Now you need to add logic to the fi rst data fl ow task. Double-click the linked data
fl ow task. (Or right-click and select Edit.) Doing so takes you to the Data Flow tab. - From the Toolbox, drag a Source Assistant task onto the designer. This will open
the Add New Source dialog, which asks you to defi ne a new data source. This is
where the actions of pulling data from the source database (the local DB) and
copying it to the destination database (SQL Database) take place. You have several
options for data sources to choose from, such as Excel and SQL Server. Select SQL
Server and then double-click New from the list of connection managers. - Selecting a New connection manager on the Add New Source dialog opens the OLE
DB Source Editor, where you defi ne a connection to your local database, such as the
connection shown in Figure 31-12. You already have a connection to the SQL Azure
database instance, but you need to create a connection to your local database that
your tasks use to copy the data. - In the Connection Manager dialog, enter the information to connect to your local
copy of the AWMini database. - Test the connection, and then in the Connection Manager dialog, click OK. This will
also close the Source Assistant dialog. - Next, right mouse click on the Source task and select Edit from the context menu. In
the Name of the table or view, select the Contact table from the list of tables. Click OK. - Now from the Toolbox, drag a Destination Task onto the Designer. The Add New
Destination dialog will appear, and from this dialog select the SQL Server destina-
tion type. You will notice the connection to SQL Database in the list of connec-
tions, so select that connection and click OK. - Drag the green arrow from the OLE DB Source task to the OLE DB Destination task,
as you did for the control fl ow task. - Double-click the OLE DB Source task to edit the task properties, which is where
the data is going: the SQL Azure database instance. In the OLE DB Destination
Editor, select the Contact table from the drop-down list of tables and click the Keep
Identity option. - In the Destination Editor, select the Mapping page and ensure that all the columns
are appropriately mapped from the source Contact table to the destination Contact
table, shown in Figure 31-14. Click OK.
If you’re new to SSIS, congratulations: You’ve just confi gured your fi rst SSIS data fl ow. Your
data fl ow should look like Figure 31-15 — not that exciting but useful nonetheless. If you
aren’t new to SSIS, you still deserve congratulations, because you’ve successfully confi gured
a data fl ow to migrate data to the cloud.
c31.indd 822c31.indd 822 7/31/2012 10:00:29 AM7/31/2012 10:00:29 AM
http://www.it-ebooks.info