nor*_*orm 3 sql sql-server ssis biml
如何使用BID和BIML在SQL Server 2008中的模糊查找转换(FLT)对象中选中一个复选框.我假设它将输出列添加到输出路径,我不知道?我想要我的输出
Lookup column = Attribute
Lookup column = 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)
);
-->
Run Code Online (Sandbox Code Playgroud)
下面应该是输出的图像,其中取消选中名为AddThisColumn的列.

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

单击右侧的复选框表示您正在为输出添加一列,对吗?为了在biml中表达这个想法,它只是Column在Outputs集合中为给定的转换添加另一个问题.
<Outputs>
<Column SourceColumn="Attribute" TargetColumn="Attribute2" />
<Column SourceColumn="AddThisColum" TargetColumn="AddThisColumn" />
</Outputs>
Run Code Online (Sandbox Code Playgroud)
我用你早先的问题BIML导致我的截图将响应输出集合而不是增加属性更名为Attribute2,这是在上面的代码片段来完成.

| 归档时间: |
|
| 查看次数: |
351 次 |
| 最近记录: |