BimlScript Intellisense with BIDS Helper

gravatar

Paul S. Waters

The intellisense for creating Biml and BimlScript files using BIDS Helper is limited to Biml only. Currently, there is no intellisense for C# or VB code in a BimlScript document with Visual Studio. In most cases, when the VS editor detects non-XML in the document all intellisense is lost. This post gives a few workarounds for this.

published 10.22.13

last updated 10.22.13


Share

Tags

  • intelliprompt
  • intellisense

The intellisense for creating Biml and BimlScript files using BIDS Helper is limited to Biml only. Currently, there is no intellisense for C# or VB code in a BimlScript document with Visual Studio. In most cases, when the VS editor detects non-XML in the document all intellisense is lost. This post gives a few workarounds for this.

1. Use the Editor at BimlScript.com

The BimlScript.com editor does not have intelliprompt for C# or VB, but it will preserve intelliprompt for Biml. The code created on BimlScript.com can be copy and pasted to Visual Studio. Read the Overcoming BimlScript Copy and Paste Issues in Visual Studio article if you are having issues pasting code into Visual Studio.

2. Place directives after the closing Biml tag

Directives are declared in the <#@ … #>. The most common directive is the template directive; <#@ template tier="2"#>. Place it and others in the line under the closing Biml tag.

3. Comment code blocks with XML comment tags

The Biml compiler ignores the XML Comment tags while processing code blocks and directives. When the code blocks are placed inside , the code will function normally and the document will still look like XML to Visual Studio. You can place XML comments around include directives when writing BimlScript, but they might need to be removed before running the BimlScript.

Sample BimlScript

Below is a sample BimlScript using suggestions 2 and 3 above. For the script to execute correctly, the XML comments inside the tag need to be removed before creating the SSIS package.

<!--<#@ include file="i_BimlScript_Ods_L2_PivotTable_Variables.biml" #> -->
<Biml xmlns="http://schemas.varigence.com/biml.xsd">
    <Packages> 
        <Package Name="MERGE Test" ConstraintMode="Linear">
            <Tasks>
            <!--
        <# foreach(var table in RootNode.Tables.Where(item => item.SchemaName == "metaapmods" &&  item.Name == "APM_LoanStrucs" )) {#> 
        -->
        <ExecuteSQL Name="MERGE <#=table.Name #>" ConnectionName="<#=table.Connection#>" >
            <DirectInput>
                <!--
                <#@ include file="i_BimlScript_Ods_L1_Table_Annotations_SourceQuery_Merge2.biml" #>
            -->
            </DirectInput>
                </ExecuteSQL>
                <!-- <# } #> -->
            </Tasks>
        </Package>
    </Packages>
</Biml>
<#@ template tier="2"#>
<#@ include file="i-Tables-MERGE-SCDType-Functions.biml" #>
You are not authorized to comment. A verification email has been sent to your email address. Please verify your account.

Comments

There are no comments yet.