[英]Simply tick a checkbox in a Fuzzy Lookup Transformation object using SSIS BIML
如何使用BID和BIML在SQL Server 2008中的模糊查找转换(FLT)对象中选中一个复选框。 我假设它将输出列添加到输出路径,我不知道? 我想要我的输出
查找列=属性
查找列= AddThisColumn
输出Alias = Attribute2
输出Alias = AddThisColumn
下面是BIML脚本以及2x屏幕截图,1)复选框AddThisColumn未标记(当前状态)2)复选框AddThisColumn勾选(我想要的)
<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的列。
下面应该是输出的图像,其中检查名为AddThisColumn的列。 我该如何编写脚本?
单击右侧的复选框表示您正在为输出添加一列,对吗? 要在biml中表达这个想法,它只需要在Outputs
集合中为给定的转换添加另一个Column
。
<Outputs>
<Column SourceColumn="Attribute" TargetColumn="Attribute2" />
<Column SourceColumn="AddThisColum" TargetColumn="AddThisColumn" />
</Outputs>
我使用了之前问题中的biml,这导致我的屏幕截图将Response添加到输出集合,而不是添加重命名为Attribute2的属性,这在上面的代码片段中完成。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.