One great way to introduce default values in Biml would be variables in include files or code files for example. But depending on what you’re trying to achieve or at what point you realize it, it may already be causing some extra work.

For example: You have a couple of diffent ways to create a dataflow task but in the end, they should all share a property like DefaultBufferMaxRows.

In BimlStudio, you could make use of a transformer, but these are not available in BimlExpress.

In BimlExpress, you can make use of AllDefinedSuccessors :

Ein einfacher Weg, um in Biml Standardwerte zu setzen wäre die Nutzung von Variablen in include files oder code files. Je nach Design und Zeitpunkt kann auch dies aber schon etwas Mühe und Aufwand bedeuten.

Beispiel: Sie erstellen an einigen verschiedenen Stellen Datenfluss Tasks, welche am Ende alle eine Eigenschaft wie DefaultBufferMaxRows gemeinsam haben sollen.

For example: You have a couple of diffent ways to create a dataflow task but in the end, they should all share a property like DefaultBufferMaxRows.

Hier kann man sich jedoch recht einfach der Methode AllDefinedSuccessors behelfen:

 <#@ template tier="999" language="VB" optionexplicit="False" #>
<# for each df in RootNode.Packages.SelectMany(Function(c) c.AllDefinedSuccessors().OfType(of AstDataflowTaskNode)()) df.DefaultBufferMaxRows = 20000 next#>
 

C#:

<#@ template tier="999" #>
<# foreach (var df in RootNode.Packages.SelectMany(c => c.AllDefinedSuccessors().OfType<AstDataflowTaskNode>())) { 
    df.DefaultBufferMaxRows = 20000;
}#>

Just make sure, that you use a tier that is high enough to cover all packages you’ve defined so far!

Any questions or comments? We’d love to hear from you at !

Further Information on Biml in English can be found on our English Biml Page.

Happy Biml’ing!

Sie müssen lediglich sicherstellen, dass Sie ein tier-Level wählen, welches hoch genug ist, dass alle vorangegangenen Pakete auch enthalten sind.

Haben Sie hierzu Fragen oder Anmerkungen? Wir freuen uns auf Ihren Input unter !

Weitere Informationen zu Biml, einschließlich Terminen und Blog Beiträgen finden Sie auch auf unserer Biml Seite.

Viel Spaß beim Biml’n!