Presentation is loading. Please wait.

Presentation is loading. Please wait.

BIML: Step by Step Julie Smith.

Similar presentations


Presentation on theme: "BIML: Step by Step Julie Smith."— Presentation transcript:

1 BIML: Step by Step Julie Smith

2

3 Julie Smith SQL Server MVP and Consultant at Innovative Architects in Atlanta, GA ½ of the DataChix at Datachix.com Contributing Author:

4 About Julie SSIS Lover Not a developer No, you hang up

5 BIML: Intro and History
Domain specific language. Specific to BIDS –Microsoft—codeplex. Once compiled, generates BI objects. Scott Currie. When he was at Msft. Started Varigence Began as Project VULCAN

6 Scott Currie and Varigence
Steve and Scott

7 What is it? XML like, domain specific language.
Emits Microsoft BI Objects Tables SSIS Packages Cubes

8 Quick Review of XML Other (child) elements
eXtensible Markup Language Hallmark of XML is tags: <tag>stuff</tag> The content between and including a start and end tag is an element. Elements can contain any of the following: Other (child) elements Text ~ non quoted contents of an element Attributes ~  the value of a single property for an element, using a name/value pair with quotes around the value. *Self closing element syntax: <tag stuff/>

9 Here is a package with a dataflow:
<Packages> <Package Name="MyPackage" ConstraintMode="Linear"> <Tasks> <Dataflow Name="My Data Flow"> </Dataflow> </Tasks> </Package> </Packages>

10 Here is what it emits:

11 How do I get it? Free version –comes with BIDS Helper from Codeplex
Buy MIST from Varigence--Enterprise

12 Why Do I Need It? BIML Scripting – not such a win. BIML+ BIMLScript + System Info from SQL Server about your schema = shortcuts! = BAM! = #SQLWINNING

13 Examples My last project—400 source tables or files.
Generally accepted best practice one package each. We used about four different patterns and same framework for each package. Guess how long it took and how many folks?

14 Estimating ETL My wiki wiki ways: estimating ETL development time Vincent McBurney Aug 7, 2006 Each source base 1 day. Then add for complexity Lookups, error handling, source complexity Multiply by experience level of your developers

15 Good Fits for BIML Already Whiz Bang SSIS Developer Helps to know C#
Have too much to do with resources available. Invest the time—it will pay off.

16 How to Make it work for you:
Identify. Your patterns BIML-ize. Write in BIML Meta-tate. Choose your metadata Script-a-loop. Script and loop

17 How to Make it work for you:
Identify your patterns in SSIS you need to automate For instance, you want to stage all tables from NW db to a staging db, with the addition of a date loaded column. Step One!

18 How to Make it work for you:
Step Two! BIML-ize. Write one copy of the package with BIML using resources such as Varigence documentation.

19 How to Make it work for you:
Identify what metadata to loop through. Choices : Native metadata (such as SQL System views, which have built in BIML Script methods) Custom metadata stores. Manual –in SQL, in Excel Koen Verbeeck  David Stein –Kimball spreadsheet Step Three!

20 How to Make it work for you:
Apply BIML Scripting to your Biml prototype. Loop through your metadata of choice using Bimlscript code Step Four!

21 How to Make it work for you:
Step Four! How to Make it work for you:

22 How to Make it work for you:
Step Four! How to Make it work for you: import namespace="Varigence.Hadron.CoreLowerer.SchemaManagement" #> <# foreach (var table in tables) { #> <#=table.SchemaQualifiedName#>  -- Directive --Scripting --literals

23 Common syntax concepts:
XML has elements and attributes An element is enclosed in a tag Let’s say we have element Packages <Packages> Content for packages </Packages> If it comes from a toolbox, or a toolbar it’s an element. If it’s a “property” of something from above, then it’s probably an attribute.

24 Draw or Type? If I can DRAW it (it’s a shape in SSIS) then it’s going to be an Element. An element is enclosed in a tag <tag>Stuff</tag> Stuff can be more elements and or it can be attributes. Case sensitive. Attributes in quotes. <tag>Stuff</tag> We have element Packages <Packages> Content for packages </Packages> If it comes from a toolbox, or a toolbar it’s an element. If it’s a property of something from above, then it’s probably an attribute.

25 In BIML <Biml xmlns="http://schemas.varigence.com/biml.xsd">
<Connections> <Connection Name="julieBiml" ConnectionString="Data Source=6wk9cs1-pc;Initial Catalog=julieBiml;Provider=SQLNCLI10.1;Integrated Security=SSPI;" /> <Connection Name="TheBimlMist" ConnectionString="Data Source=6wk9cs1-pc;Initial Catalog=TheBimlMist;Provider=SQLNCLI10.1;Integrated Security=SSPI;" /> </Connections> <Packages> <Package Name="TableCopy" ConstraintMode="Parallel" ProtectionLevel="DontSaveSensitive" > <Tasks> <Dataflow Name="DFT Table1"> <Transformations> <OleDbSource Name="table1" DefaultCodePage="1252" ConnectionName="TheBimlMist"> <ExternalTableInput Table="[dbo].[Name]" /> </OleDbSource> <OleDbDestination Name="Dest1" ConnectionName="julieBiml" > <InputPath OutputPathName="table1.Output" /> <ExternalTableOutput Table="[Dest1]" /> </OleDbDestination> </Transformations> </Dataflow> </Tasks> </Package> </Packages> </Biml> In BIML

26 Use the BimlScript Editor at BimlScript.com/develop

27 Patterns Out There Incremental Load. Uses Defined parts of schema. So FK is used bc it’s defined as BK Stairway to BIML Other option is define as Annotation in the table. Create and Load a staging environment. Scott Currie

28 References Video with Andy Leonard and Paul Waters Stairway to BIML BIMLScript.com This is the editor, so you can see your script without VS messing it up.

29


Download ppt "BIML: Step by Step Julie Smith."

Similar presentations


Ads by Google