Business Intelligence Markup Language

Last updated
Biml
Business Intelligence Markup Language (Biml) Logo.png
Designed by Scott Currie [1]
Developer Varigence [1]
First appeared2008 [1]
Stable release
3.0 / November 1, 2012 (2012-11-01)
OS Microsoft Windows
Filename extensions .biml
Website www.bimlscript.com
Major implementations
Mist IDE, BIDS Helper [2]

Business Intelligence Markup Language (BIML) is a domain-specific XML dialect for defining business intelligence (BI) assets. Biml-authored BI assets can currently be used by the BIDS Helper add-on for Microsoft SQL Server Business Intelligence Development Studio (BIDS) and the Varigence Mist (now called BimlStudio) integrated development environment; both tools translate Biml metadata into SQL Server Integration Services (SSIS) and SQL Server Analysis Services (SSAS) assets for the Microsoft SQL Server platform; however, emitters can be created to compile Biml for any desired BI platform.

Contents

While Biml’s declarative design is sufficient to author BI assets, BimlScript extends the language by enabling authors to embed C# or VB.NET code within Biml, similar to how ASP.NET includes .NET code within static HTML markup. [3] BimlScript is used to merge changes into existing Biml assets, automatically generate Biml code, and apply changes across multiple Biml files during compilation.

History

Mist

Mist is an IDE for authoring Biml code and building BI assets. Mist leverages visual design capabilities and debugging features to simultaneously edit entire business intelligence models, including relational tables, SSIS packages, and cubes. [1] Mist also incorporates modern programming IDE features, including text editors with syntax highlighting, Intelliprompt and quick-info displays, source control integration, and multi-monitor support.

BIDS Helper

As Biml’s popularity has grown, key portions of the Biml engine, including dynamic package generation, have been contributed to the BIDS Helper open source project hosted on CodePlex. [2] [4]

BimlScript community

BimlScript.com is a community website for developing and sharing Biml solutions to BI problems, and contributing Biml content to share with others. Along with tutorials, walkthroughs, and videos, the site provides an online Biml editor. [5]

Syntax

Biml has a syntax that’s common to all XML languages. Tags begin and end with < and >, respectively. Furthermore, tags can have attributes and nested elements.

Biml

Declaration

Biml documents begin with a common declaration

<Bimlxmlns="http://schemas.varigence.com/biml.xsd">

Root types

Biml has a well-defined set of root types, indicating the various kinds of BI assets that can be created:

  • Connections
  • Databases
  • Schemas
  • Tables
  • Dimensions
  • Facts
  • Packages
  • File Formats
  • Script Projects
  • Cubes
  • Principals

Example

This is an example of the AdventureWorks DimCurrency table, authored in Biml:

<Bimlxmlns="http://schemas.varigence.com/biml.xsd"><Dimensions><DimensionName="DimCurrency"SchemaName="Target.dbo"AttributeAllMemberName="All Source Currencies"DimensionType="Currency"FriendlyName="Currency"><Columns><ColumnName="CurrencyKey"/><ColumnName="CurrencyAlternateKey"DataType="StringFixedLength"Length="3"/><ColumnName="CurrencyName"DataType="String"Length="50"/></Columns><Keys><IdentityName="IK_DimCurrency"><Columns><ColumnColumnName="CurrencyKey"/></Columns></Identity><UniqueKeyName="AK_DimCurrency_CurrencyAlternateKey"><Columns><ColumnColumnName="CurrencyAlternateKey"/></Columns></UniqueKey></Keys><Indexes></Indexes><Attributes><AttributeName="Source Currency"EstimatedCount="101"OrderBy="Name"AttributeType="CurrencySource"GroupingBehavior="DiscourageGrouping"><InstanceSelection>DropDown</InstanceSelection><KeyColumns><KeyColumnColumnName="CurrencyName"NullProcessing="Error"/></KeyColumns></Attribute><AttributeName="Source Currency Code"EstimatedCount="105"OrderBy="Name"AttributeType="CurrencyIsoCode"Usage="Key"GroupingBehavior="DiscourageGrouping"><InstanceSelection>DropDown</InstanceSelection><KeyColumns><KeyColumnColumnName="CurrencyKey"NullProcessing="Error"/></KeyColumns><NameColumnColumnName="CurrencyAlternateKey"/></Attribute></Attributes><Relationships><RelationshipName="Source Currency"ParentAttributeName="Source Currency Code"ChildAttributeName="Source Currency"Type="Rigid"/></Relationships></Dimension></Dimensions></Biml>

BimlScript

All BimlScript tags begin and end with <# and #> delimiters, respectively. Special types of BimlScript tags use augmented versions of these delimiters, to indicate specific usages.

Directives

A Biml file, with BimlScript, begins with at least one directive. Directives provide instructions to the Biml engine, regarding how to process the BimlScript and generate its Biml. Directives are single tags that begin with <#@. Each directive begins with a single term, followed by attributes that supply required values.

The two most common directives are template and import.

Template

This directive indicates that the file's BimlScript uses the C# programming language.

<#@templatelanguage="C#"#> 
Import

This directive specifies .NET namespaces that should be imported for the file. It is functionally equivalent to the C# using statement or VB.NET Imports statement.

<#@importnamespace="Varigence.Languages.Biml.Connection"#> 

Delimiters

When authoring BimlScript, additional delimiters may be used. These delimiters match the behavior of T4 template delimiters.

DelimiterDescription
<#Defines statements, in .NET code, that provide control flow in a Biml file.
<#=Evaluates .NET code, converts it to a string, and then embeds it in the Biml file.
<#+Defines properties, methods, and files that are excluded from the Biml file but may be accessed by other BimlScript code nuggets.

Example

This BimlScript example imports a database's assets via a connection, declared in a separate file, named "AdventureWorksLT". Each schema and table from the imported database is then embedded directly within the Schemas and Tables collections, respectively.

<#@templatelanguage="C#"hostspecific="True"tier="2"#> <#@importnamespace="Varigence.Languages.Biml.Connection"#> <#@importnamespace="Varigence.Hadron.Extensions"#> <#@importnamespace="Varigence.Hadron.Extensions.SchemaManagement"#> <#@importnamespace="Varigence.Hadron.CoreLowerer.SchemaManagement"#>  <#+publicImportResultsResults {get{return((AstOleDbConnectionNode)RootNode.Connections["AdventureWorksLT"]).ImportDB(); } } #>  <Bimlxmlns="http://schemas.varigence.com/biml.xsd"><Databases><DatabaseName="MyDatabase"ConnectionName="AdventureWorksLT"/></Databases><Schemas><#=Results.SchemaNodes.GetBiml()#> </Schemas><Tables><#=Results.TableNodes.GetBiml()#> </Tables></Biml>

This example shows how developers can use Biml and BimlScript to:

  1. Import schemas and tables directly from a database, and use them without needing to manually copy their structure.
  2. Have any changes to the assets be automatically reflected the next time this code is run.
  3. Import the assets and convert them to Biml using only two simple lines of code.

Related Research Articles

Active Directory (AD) is a directory service developed by Microsoft for Windows domain networks. Windows Server operating systems include it as a set of processes and services. Originally, only centralized domain management used Active Directory. However, it ultimately became an umbrella title for various directory-based identity-related services.

<span class="mw-page-title-main">PostgreSQL</span> Free and open-source object relational database management system

PostgreSQL, also known as Postgres, is a free and open-source relational database management system (RDBMS) emphasizing extensibility and SQL compliance. PostgreSQL features transactions with atomicity, consistency, isolation, durability (ACID) properties, automatically updatable views, materialized views, triggers, foreign keys, and stored procedures. It is supported on all major operating systems, including Linux, FreeBSD, OpenBSD, macOS, and Windows, and handles a range of workloads from single machines to data warehouses or web services with many concurrent users.

<span class="mw-page-title-main">XML</span> Markup language by the W3C for encoding of data

Extensible Markup Language (XML) is a markup language and file format for storing, transmitting, and reconstructing arbitrary data. It defines a set of rules for encoding documents in a format that is both human-readable and machine-readable. The World Wide Web Consortium's XML 1.0 Specification of 1998 and several other related specifications—all of them free open standards—define XML.

XSD, a recommendation of the World Wide Web Consortium (W3C), specifies how to formally describe the elements in an Extensible Markup Language (XML) document. It can be used by programmers to verify each piece of item content in a document, to assure it adheres to the description of the element it is placed in.

Vector Markup Language (VML) is an obsolete XML-based file format for two-dimensional vector graphics. It was specified in Part 4 of the Office Open XML standards ISO/IEC 29500 and ECMA-376. According to the specification, VML is a deprecated format included in Office Open XML for legacy reasons only.

Extensible Application Markup Language is a declarative XML-based language developed by Microsoft for initializing structured values and objects. It is available under Microsoft's Open Specification Promise.

<span class="mw-page-title-main">XBRL</span> Exchange format for business information

XBRL is a freely available and global framework for exchanging business information. XBRL allows the expression of semantics commonly required in business reporting. The standard was originally based on XML, but now additionally supports reports in JSON and CSV formats, as well as the original XML-based syntax. XBRL is also increasingly used in its Inline XBRL variant, which embeds XBRL tags into an HTML document. One common use of XBRL is the exchange of financial information, such as in a company's annual financial report. The XBRL standard is developed and published by XBRL International, Inc. (XII).

The following tables compare general and technical information for a number of relational database management systems. Please see the individual products' articles for further information. Unless otherwise specified in footnotes, comparisons are based on the stable versions without any add-ons, extensions or external programs.

<span class="mw-page-title-main">JSON</span> Open standard file format and data interchange

JSON is an open standard file format and data interchange format that uses human-readable text to store and transmit data objects consisting of attribute–value pairs and arrays. It is a commonly used data format with diverse uses in electronic data interchange, including that of web applications with servers.

Microsoft SQL Server Integration Services (SSIS) is a component of the Microsoft SQL Server database software that can be used to perform a broad range of data migration tasks.

Catalogue Service for the Web (CSW), sometimes seen as Catalogue Service - Web, is a standard for exposing a catalogue of geospatial records in XML on the Internet. The catalogue is made up of records that describe geospatial data, geospatial services, and related resources.

An entity–attribute–value model (EAV) is a data model optimized for the space-efficient storage of sparse—or ad-hoc—property or data values, intended for situations where runtime usage patterns are arbitrary, subject to user variation, or otherwise unforeseeable using a fixed design. The use-case targets applications which offer a large or rich system of defined property types, which are in turn appropriate to a wide set of entities, but where typically only a small, specific selection of these are instantiated for a given entity. Therefore, this type of data model relates to the mathematical notion of a sparse matrix. EAV is also known as object–attribute–value model, vertical database model, and open schema.

This comparison of programming languages compares the features of language syntax (format) for over 50 computer programming languages.

Entity Framework (EF) is an open source object–relational mapping (ORM) framework for ADO.NET. It was originally shipped as an integral part of .NET Framework, however starting with Entity Framework version 6.0 it has been delivered separately from the .NET Framework.

Liquibase is an open-source database-independent library for tracking, managing and applying database schema changes. It was started in 2006 to allow easier tracking of database changes, especially in an agile software development environment.

Language Integrated Query is a Microsoft .NET Framework component that adds native data querying capabilities to .NET languages, originally released as a major part of .NET Framework 3.5 in 2007.

Microsoft SQL Server is a proprietary relational database management system developed by Microsoft. As a database server, it is a software product with the primary function of storing and retrieving data as requested by other software applications—which may run either on the same computer or on another computer across a network. Microsoft markets at least a dozen different editions of Microsoft SQL Server, aimed at different audiences and for workloads ranging from small single-machine applications to large Internet-facing applications with many concurrent users.

XPath is an expression language designed to support the query or transformation of XML documents. It was defined by the World Wide Web Consortium (W3C) in 1999, and can be used to compute values from the content of an XML document. Support for XPath exists in applications that support XML, such as web browsers, and many programming languages.

<span class="mw-page-title-main">BIDS Helper</span>

BIDS Helper is a Visual Studio open source extension with multiple features that extend and enhance business intelligence development functionality in all editions of Microsoft's SQL Server 2005, 2008, 2008 R2 and 2012. BIDS Helper improves the development environment for integration, analysis and reporting services. BIDS Helper is hosted on GitHub.

gSOAP is a C and C++ software development toolkit for SOAP/XML web services and generic XML data bindings. Given a set of C/C++ type declarations, the compiler-based gSOAP tools generate serialization routines in source code for efficient XML serialization of the specified C and C++ data structures. Serialization takes zero-copy overhead.

References

  1. 1 2 3 4 Leonard, Andy; Masson, Matt; Mitchell, Tim; Moss, Jessica; Ufford, Michelle (2012). "Chapter 17: Business Intelligence Markup Language". SQL Server 2012 Integration Services Design Patterns. APress. p. 456. ISBN   978-1430237716.
  2. 1 2 Tok, Wee-Hyong; Parida, Rakesh; Masson, Matt; Ding, Xiaoning; Sivashanmugam, Kaarthik (2012). Microsoft SQL Server 2012 Integration Services. O'Reilly Media, Inc. p. 511. ISBN   978-0735665859.
  3. Chenn, Ronen (May 16, 2011). "BIDS helper new features ( April 2011 )". Business Intelligence, Technology, Thoughts, Thinking. Retrieved October 1, 2012.
  4. Welch, John (June 7, 2011). "Biml Package Generator". BIDS Helper. Retrieved September 30, 2011.
  5. "Welcome to BimlScript.com". BimlScript.com. Retrieved October 4, 2012.