SSIS - Do I need to do a metadata refresh when adding new columns to source

Problem:

I need to change a stored procedure that feeds an SSIS package. Comparing the old & new with sp_describe_first_result_set, the only change is one field's "is_updateable". So, does that changing mean I need to do a metadata refresh against the SSIS project? TIA

Solution

TL DR:

If you need to use the newly added column in the Data integration process then you have to open the package and refresh the OLE DB Source metadata, else the package will still work as excepted.

Details:

I created a Table Table_1 with the following columns:
CREATE TABLE [dbo].[Table_1](
    [ID] [int] NOT NULL,
    [Col1] [nchar](10) NULL,
    [Col2] [nchar](10) NULL,
    [Col3] [nchar](10) NULL,
 CONSTRAINT [PK_Table_1] PRIMARY KEY CLUSTERED 
(
    [ID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
Then I create a stored procedure sp_Test with the following definition:
CREATE PROCEDURE [dbo].[sp_Test]

AS
BEGIN

    SET NOCOUNT ON;

    SELECT * FROM Table_1
END
I created a package with one Data Flow Task reading from the stored procedure into a flat file:
enter image description here
enter image description here
If I execute the package everything is going OK.
Now, I added a new column Col4 nchar(10) to Table_1 and re-executed the package. The package is executed successfully but without reading the newly added column.
enter image description here

Comments

Popular posts from this blog

SSIS - Script Task error: Exception has been thrown by the target of an invocation.

Don’t install Hadoop on Windows!

SSIS - script component DateTime Formats Implicit Conversion