自动生成脚本BIML SSIS包 [英] Automatically generate SSIS package from BIML script

查看:490
本文介绍了自动生成脚本BIML SSIS包的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

一旦你完成了你的BIML脚本(使用BIDS SQL Server 2008中)创建SSIS包只需右键单击该BIML文件,然后单击生成SSIS包。

Once you have finished your BIML script (using BIDS SQL Server 2008) to create the SSIS package you simply right click the BIML file and click Generate SSIS packages.

如何生成通过代码如SSIS packges C#或SQL?我能想象有些还挺shell脚本的BimlEngine.dll例如BimlEngine.dll - myFileServer\myBimlScript,生成SSIS包

How do i generate the SSIS packges via code e.g. C# or SQL? I can imagine some kinda of shell script to the BimlEngine.dll e.g. BimlEngine.dll -"myFileServer\myBimlScript", "generate SSIS packages"

我发现这个C#代码项目
https://github.com/jgsato/BimlGen

I have found this c# code project https://github.com/jgsato/BimlGen

和特别是该文件
https://github.com/jgsato/BimlGen/blob/master /BimlGenerator.cs

我只是不知道如何使用它。

i'm just not sure how to use it.

谢谢对您有所帮助。

推荐答案

您链接的代码生成BIML,XML,基于SMO的机制。

The code you linked is a mechanism for generating Biml, xml, based on SMO.

您的目的是重现右键/生成SSIS包,从而BIML XML转换成DTSX的XML。要做到这一点,你需要看看 BidsHelper 是怎么做的。在类 BimlExpandPlugin ,你会发现在<$ C $版本特定的调用C> BidsHelper.CompileBiml

Your intention is to reproduce the right click/generate SSIS package, thus converting the Biml XML into a DTSX's XML. To do this, you'll need to look at how BidsHelper does it. In the class BimlExpandPlugin, you'll find version specific calls to the BidsHelper.CompileBiml

ValidationReporter validationReporter = BidsHelper.CompileBiml(
    typeof(AstNode).Assembly, 
    "Varigence.Hadron.BidsHelperPhaseWorkflows.xml", 
    "Compile", bimlScriptPaths, 
    new List<string>(), 
    tempTargetDirectory, 
    projectDirectory, 
    SqlServerVersion.SqlServer2008, 
    SsisVersion.Ssis2012, 
    SsasVersion.Ssas2008, 
    DeployPackagesPlugin.IsLegacyDeploymentMode(project) ? 
        SsisDeploymentModel.Package : 
        SsisDeploymentModel.Project);



一些需要注意的是,在Varigence的人们提供了BidsHelper形式存在的一个子集的功能是什么他们的产品,,是可以胜任的。其中的一个事情是跳过XML糖化,只是使用本机.NET对象来创建并描述SSIS对象。如果你想用.NET对象的工作,那么你就需要购买一个许可证。

Something to note is that the folks at Varigence provide the functionality that exists for BidsHelper as a subset of what their product, Mist, is capable of. One of those things is skipping the XML mashing and just use native .NET objects to create and describe SSIS objects. If you want to work with the .NET objects, then you'll need to buy a license.

这篇关于自动生成脚本BIML SSIS包的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆