Hi all,
I am trying to automate a data flow with BIML. I am using an expression to build my SQL dynamically based on input parameter. Sparing
details of the use case, I need this flexibility in my project. I am having 1 master table which consists of file name and source query.
I want to use SQL Command from Variable Data access mode in OLEDB Source.
On the basis of input file source query need to change automatically .However; my query is not being evaluated when the package
is generated. The query will populate after package generation, when I open the source and set access mode SQL Command, but I cannot seem to get this configured automatically as desired. This is preventing me from doing transformations in the script.
Please help me to achieve the above scenario
Below is my BIML Script(C#).
<Bimlxmlns="http://schemas.varigence.com/biml.xsd">
<!-- Database Connection manager-->
<Connections>
<ConnectionName="Archive"ConnectionString="Data Source=RLDEVOLP03.DEVELOPMENT.LOCAL;Initial Catalog=Archive;Provider=SQLNCLI11.1;Integrated Security=SSPI;Auto Translate=False;"
/>
<ConnectionName="DataStaging"ConnectionString="Data Source=RLDEVOLP03.DEVELOPMENT.LOCAL;Initial Catalog=DataStaging;Provider=SQLNCLI11.1;Integrated Security=SSPI;Auto Translate=False;"
/>
</Connections>
<!-- Name Of the the Package-->
<Packages>
<PackageName="LoadArchive Using BIML"ConstraintMode="Linear"ProtectionLevel="EncryptSensitiveWithUserKey">
<Variables>
<VariableName="V_Archive_tablename"DataType="String"></Variable>
<VariableName="V_Archivequery"DataType="String"EvaluateAsExpression="true">SELECT a.*, b.BBxKey as Archive_BBxKey, b.RowChecksum as Archive_RowChecksum
FROM dbo.ImportBBxFbapp a LEFT OUTER JOIN Archive.dbo.ArchiveBBxFbapp b ON a.Col001 = b.BBxKey Where (b.LatestVersion = 1 OR b.LatestVersion IS NULL)
</Variable>
<VariableName="v_Src_FileName"DataType="String">FBAPP</Variable>
<!-- Load Data Truncate Staging Sequence Container-->
<ContainerName="Load Data Truncate Staging"ConstraintMode="Parallel">
<Tasks>
<DataflowName="Archive Data"DelayValidation="true">
<Transformations>
<OleDbSourceName="Source"ConnectionName="DataStaging"ValidateExternalMetadata="false">
<TableFromVariableInputVariableName="User.V_Archivequery"/>
</OleDbSource>
</Transformations>
</Dataflow>
</Tasks>
</Container>
</Tasks>
</Package>
</Packages>
</Biml>
Regards,
Vipin jha
Thankx & regards, Vipin jha MCP