BIML failed to generate CDC Source and CDC Splitter controls

52 Views Asked by At

I'm using BIML to generate loads of packages to update a data warehouse using CDC. I found it very difficult to get BIML to generate CDC Source and CDC Splitter controls.

I'm using SSIS Version 3.12 and Visual Studio Community 2019 Version 16.9.1

I have used a sample code from this link. The controls on the package look like the following.. The icon itself is wrong and nothing happens if I double click on the control.

enter image description here


Please can someone help. I'm stuck with this.
Also tried the following code with no success.
        <CdcControl  Name="CDC Mark Init Load Start" ConnectionName="ADO_Source" ControlOperation="GetProcessingRange" StateVariableName="User.CDC_State_<#=table.Name#>" 
            AutomaticStatePersistence="true" StateConnectionName="ADO_Source" StateName="CDC_State_<#=table.Name#>">
            <ExternalStateTable Table="dbo.CDC_States"></ExternalStateTable>        
        </CdcControl>
1

There are 1 best solutions below

1
billinkc On

I don't have any CDC to play with but 2 thoughts: The first is that the article is from 7 years ago. The ComponentClassId of 874F7595-FB5F-40FF-96AF-FBFF8250E3EF is likely specific to that version of SSIS.

I took a quick stab at setting up CDC, YMMV.

use CDCLol
GO
EXEC sys.sp_cdc_enable_db;

CREATE TABLE dbo.Demo
(
Col1 int NOT NULL PRIMARY KEY
,col2 int NOT NULL
,col3 varchar(50) NOT NULL
);

EXEC sys.sp_cdc_enable_table
    @source_schema = N'dbo'
,   @source_name = N'Demo'
,   @role_name = NULL
,   @supports_net_changes = 1;

If I drag a CDC source onto a DataFlow and ask BimlExpress to reverse engineer that package to Biml, I get the following definition

<Biml xmlns="http://schemas.varigence.com/biml.xsd">
  <Packages>
    <Package Name="SO_74621279" Language="None" ConstraintMode="LinearOnCompletion">
        <Variables>
            <Variable Name="CDCState" DataType="String"></Variable>
        </Variables>
      <Tasks>
        <Dataflow Name="Data Flow Task">
          <Transformations>
                    <CdcSource Name="CDC Source" ConnectionName=".\dev2017" CaptureInstance="dbo_Demo" StateVariableName="User.CDCState" IncludeReprocessingIndicatorColumn="false">
                        <DataflowOverrides>
                            <OutputPath OutputPathName="Output">
                                <Columns>
                                    <Column ErrorRowDisposition="FailComponent" TruncationRowDisposition="FailComponent" ColumnName="__$start_lsn" />
                                    <Column ErrorRowDisposition="FailComponent" TruncationRowDisposition="FailComponent" ColumnName="__$seqval" />
                                    <Column ErrorRowDisposition="FailComponent" TruncationRowDisposition="FailComponent" ColumnName="__$operation" />
                                    <Column ErrorRowDisposition="FailComponent" TruncationRowDisposition="FailComponent" ColumnName="__$update_mask" />
                                    <Column ErrorRowDisposition="FailComponent" TruncationRowDisposition="FailComponent" ColumnName="Col1" />
                                    <Column ErrorRowDisposition="FailComponent" TruncationRowDisposition="FailComponent" ColumnName="col2" />
                                    <Column ErrorRowDisposition="FailComponent" TruncationRowDisposition="FailComponent" ColumnName="col3" />
                                    <Column ErrorRowDisposition="FailComponent" TruncationRowDisposition="FailComponent" ColumnName="__$command_id" />
                                </Columns>
                            </OutputPath>
                        </DataflowOverrides>
                    </CdcSource>
          </Transformations>
        </Dataflow>
      </Tasks>
    </Package>
  </Packages>
</Biml>

So that's probably a minimal definition for the component

The other thing is that for a while, Varigence (makes of BimlExpress) had a stance that Enterprise features in SSIS required a paid for license or something. I'm super hazy on the details though and you can't buy a BE license so no idea if that's still in play. I do have BimlStudio installed though so I can't say whether my generated Package is special like me or the standard experience.