只需使用 SSIS BIML 勾选模糊查找转换对象中的复选框 [英] Simply tick a checkbox in a Fuzzy Lookup Transformation object using SSIS BIML

查看:22
本文介绍了只需使用 SSIS BIML 勾选模糊查找转换对象中的复选框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何使用 BID 和 BIML 在 SQL Server 2008 中的模糊查找转换 (FLT) 对象中勾选复选框.我假设它向输出路径添加了一个输出列,我不知道?我希望我的输出是

How do i tick a checkbox in a Fuzzy Lookup Transformation (FLT) object in SQL Server 2008 using BIDs and BIML. I'm assuming it adds an output column to an output path, i don't know? I would like my output to be

查找列 = 属性
查找列 = AddThisColumn

Lookup column = Attribute
Lookup column = AddThisColumn

输出别名 = Attribute2
输出别名 = AddThisColumn

Output Alias = Attribute2
Output Alias = AddThisColumn

下面是 BIML 脚本以及 2x 屏幕截图,1)复选框 AddThisColumn 未勾选(当前状态)2)复选框 AddThisColumn 已勾选(我想要什么)

Below is the BIML script along with 2x screen shots, 1)checkbox AddThisColumn unticked (current status) 2)checkbox AddThisColumn ticked (what i would like)

            <Biml xmlns="http://schemas.varigence.com/biml.xsd">
                <Connections>
                 <OleDbConnection Name="SportsData" ConnectionString="Provider=SQLNCLI10;Server=myServer;Initial Catalog=myCatalog;Integrated Security=SSPI;" DelayValidation="true" />
                </Connections>
                <Packages>
                    <Package Name="_my Package" ConstraintMode="Linear">
                        <Tasks>    
                            <Dataflow Name="My Dataflow Task">
                                <Transformations>
                                    <OleDbSource Name="SurveyResponses" ConnectionName="SportsData">
                                        <DirectInput>select * from SurveyResponses</DirectInput>
                                    </OleDbSource>
                                    <!-- Performs a fuzzy lookup on the Attribute column against the JuniorSurveyResponse DB, and outputs the corresponding Response column to NewResponse. -->
                                    <FuzzyLookup Name="Fuzzy Lookup Transformation" ConnectionName="SportsData" Exhaustive="true" 
                                                 MatchIndexName="dbo.JuniorSurveyResponsesIndex" DropExistingIndex="false" 
                                                 CopyReferenceTable="true" WarmCaches="false" MatchIndexOptions="ReuseExistingIndex" ValidateExternalMetadata="false" > 
                                        <ExternalReferenceTableInput Table="dbo.JuniorSurveyResponses" />
                                        <Inputs> 
                                            <Column SourceColumn="Attribute" TargetColumn="Attribute"   />
                                        </Inputs>
                                        <Outputs> 
                                            <Column SourceColumn="Attribute" TargetColumn="Attribute2"  />

                                        </Outputs>
                                        <InputPath OutputPathName="SurveyResponses.Output" />
                                    </FuzzyLookup>

                                </Transformations>
                            </Dataflow>
                        </Tasks>
                    </Package>
                </Packages>
                </Biml>

        <#@ template language="C#" hostspecific="true"#>
        <#@ import namespace="System.Data" #>
        <#@ import namespace="Varigence.Hadron.CoreLowerer.SchemaManagement" #>

        <!--

        CREATE TABLE dbo.JuniorSurveyResponses
        (
            Attribute varchar(50)
        ,   Response varchar(50)
        ,   AddThisColum varchar(50)
        );

        CREATE TABLE dbo.SurveyResponses
        (
            Attribute varchar(50)
        ,   Response varchar(50)
        );

        -->

下面应该是未选中名为 AddThisColumn 的列的输出图像.

Below should be an image of the output where the column called AddThisColumn is unchecked.

下面应该是一个输出图像,其中检查了名为 AddThisColumn 的列.我如何编写这个脚本?

Below should be an image of a output where the column called AddThisColumn is check. How do i script this?

推荐答案

单击右侧的复选框表示您正在向输出添加一列,对吗?要在 biml 中表达这个想法,只需为给定的转换在 Outputs 集合中添加另一个 Column.

Clicking the checkbox on the righthand side signals you are adding a column to your output, right? To express this idea in biml, it'll simply be a matter of adding another Column in the Outputs collection for a given transformation.

<Outputs>
    <Column SourceColumn="Attribute" TargetColumn="Attribute2"  />
    <Column SourceColumn="AddThisColum" TargetColumn="AddThisColumn" />
</Outputs>

我使用了您之前问题中的 biml,这导致我的屏幕截图将 Response 添加到输出集合,而不是添加重命名为 Attribute2 的属性,这是在上面的代码片段中完成的.

I used the biml from your earlier question which results in my screenshot adding Response to the output collection instead of adding Attribute renamed as Attribute2, which is done in the above snippet.

这篇关于只需使用 SSIS BIML 勾选模糊查找转换对象中的复选框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆