Diesen Artikel finden Sie hier auch in deutscher Sprache.
Another awesome new feature in BimlExpress 2017 is the preview pane! This means, you can now see the Biml code without going through detours like writing the RootNode to a Textfile!
For reasons of readability, I just added the code samples at the very end of this post – they don’t really matter here!
Once you’ve installed BimlExpress 2017 and open your first Biml file, you will probably notice immediately, that the screen is split horizontally – that is exactly for the preview pane.
If you need more real estate for your actual code, just click the „Hide“ button at the lower left corner.
To actually get a preview, click the „Update“ button on the lower right:
As you can see, you get a preview which matches your Biml code exactly, as we did not add any BimlScript to it so the Biml engine did not have to modify or expand anything:
Pretty boring and useless? Hold on!
Let’s see what happens if we add some BimlScript to our code:
Pretty awesome, right?
But it doesn’t end there. You can also make use of „extra“ files (e.g. Environment.biml).
Any by the way, have you ever used Biml to generate T-SQL for example and found it a bit complicated, that you had to write the result to a textfile manually? No need for that anymore – the preview window can display any kind of code that you send to it:
Don’t you just have to love that feature?
Any questions or comments? We’d love to hear from you at email@example.com!
Further Information on Biml in English can be found on our English Biml Page.
PS: As promised, the code samples:
<Biml xmlns="http://schemas.varigence.com/biml.xsd"> <Packages> <Package Name="I can do a preview!"></Package> </Packages> </Biml>
<#@template Language="VB"#> <Biml xmlns="http://schemas.varigence.com/biml.xsd"> <Packages> <# for n as integer = 1 to 15 #> <Package Name="MyAutomatedBiml<#= n #>"/> <# next#> </Packages> </Biml>
<Biml xmlns="http://schemas.varigence.com/biml.xsd"> <Connections> <Connection Name="Source" ConnectionString="provider=SQLNCLI11;data source=.;integrated security=SSPI;initial catalog=AWDW2014" /> </Connections> </Biml>
<#@ template language="VB" #> <# Dim SRC as AstDbConnectionNode = Rootnode.Connections("Source") Dim ImportResult as ImportResults = SRC.ImportDB(nothing,"DimAccount",nothing) for each tbl in ImportResult.TableNodes #> <#= tbl.GetDropAndCreateDDL() #> <# next#>