// TODO: Could we lose the constraint information in Container from doing this as ContainerBase? public SsisContainer(SequenceTask container, SSISEmitterContext context) : base(container, context) { this._logicalContainer = container; if (this.Name != null && this.ParentContainer != null) { if (this.ParentContainer.Executables.Contains(Name)) { if (this.ParentContainer.Executables[Name] is DTS.IDTSSequence) { _SSISContainer = (DTS.Sequence) this.ParentContainer.Executables[Name]; } } else { DTS.Sequence sequence = (DTS.Sequence)context.SSISSequence.AppendExecutable("STOCK:Sequence"); sequence.Name = this.Name; _SSISContainer = sequence; } } else if (container is Package) { // Do Nothing } else { MessageEngine.Global.Trace(Severity.Error, new ArgumentException("parentContainer cannot be null"), "parentContainer cannot be null"); } }
// TODO: Could we lose the constraint information in Container from doing this as ContainerBase? public SsisContainer(SequenceTask container, SSISEmitterContext context) : base(container, context) { this._logicalContainer = container; if (this.Name != null && this.ParentContainer != null) { if (this.ParentContainer.Executables.Contains(Name)) { if (this.ParentContainer.Executables[Name] is DTS.IDTSSequence) { _SSISContainer = (DTS.Sequence)this.ParentContainer.Executables[Name]; } } else { DTS.Sequence sequence = (DTS.Sequence)context.SSISSequence.AppendExecutable("STOCK:Sequence"); sequence.Name = this.Name; _SSISContainer = sequence; } } else if (container is Package) { // Do Nothing } else { MessageEngine.Global.Trace(Severity.Error, new ArgumentException("parentContainer cannot be null"), "parentContainer cannot be null"); } }
public SsisOleDbDestination(Transformation t, SSISEmitterContext context) : base(t, context) { Destination destination = (Destination)_transformation; _component.Name = t.Name; SetupComponentProperties(); InitializeConnection(destination.Connection); }
public void EmitPatterns(SSISEmitterContext context) { foreach (IR.Task.Task task in this._logicalContainer.Tasks) { // TODO: No need to preserve context? context.InstantiateEmitter(task, context).Emit(); } }
public SsisPackage(Package logicalPackage, SSISEmitterContext context) : base(logicalPackage, context) { _DTSApplication = new DTS.Application(); _DTSPackage = new DTS.Package(); _DTSPackage.Name = Name.Replace(".", "_").Replace("[", " ").Replace("]", " "); _projectManager = new SsisProject(this); CurrentPackage = this; }
public SsisPipelineTask(PipelineTask objETL, SSISEmitterContext context) : base(objETL, context) { _logicalETL = objETL; _guid = Guid.NewGuid(); // TODO: Do this for everything _message = MessageEngine.Create(String.Format(System.Globalization.CultureInfo.InvariantCulture, "__SSIS2008Emitter:SSISDataFlow {0}", _guid.ToString())); _componentList = new List <SsisComponent>(); }
public SsisPipelineTask(PipelineTask objETL, SSISEmitterContext context) : base(objETL, context) { _logicalETL = objETL; _guid = Guid.NewGuid(); // TODO: Do this for everything _message = MessageEngine.Create(String.Format(System.Globalization.CultureInfo.InvariantCulture, "__SSIS2008Emitter:SSISDataFlow {0}", _guid.ToString())); _componentList = new List<SsisComponent>(); }
public SsisSourceComponent(Transformation t, SSISEmitterContext context) : base(t, context) { OLEDBSource source = (OLEDBSource)t; InitializeConnection(source.Connection); SetOutputName(source.OutputPath); SetComponentProperties(source); SetParameterMapping(source.ParameterMappings, SsisPackage.CurrentPackage.DTSPackage.Variables); Validate(); }
public SSISEmitterContext Emit(LogicalObject obj, SSISEmitterContext context) { Type ssisEmitterType; if (_pluginLoader.PluginTypesByAttribute.TryGetValue(new PhysicalIRMappingAttribute(obj.GetType()), out ssisEmitterType)) { ConstructorInfo constructor = ssisEmitterType.GetConstructor(new Type[] { obj.GetType(), context.GetType() }); ISSISEmitter objEmitter = (ISSISEmitter)constructor.Invoke(new object[] { obj, context }); return(objEmitter.Emit()); } else { _message.Trace(Severity.Warning, Resources.SSISObjectEmitterNotFound, obj.GetType()); return(context); } }
public override SSISEmitterContext Emit() { this.UnSave(); this.Save(); SSISEmitterContext newContext = null; try { Package logicalPackage = (Package)_logicalContainer; this.DTSPackage.Variables.Add("_vulcanPackageRepositoryDirectory", false, "User", OutputBaseDirectory); foreach (ConnectionConfiguration connection in logicalPackage.ConnectionConfigurationList) { this.AddConfiguration(connection.Name); SsisConnection s = new SsisConnection(connection); } foreach (PackageConfiguration config in logicalPackage.PackageConfigurationList) { this.AddConfiguration(config.Name); } foreach (Variable variable in logicalPackage.VariableList) { SsisVariable s = new SsisVariable(variable); } this.Reload(); newContext = new SSISEmitterContext(this, new SsisSequence(this.DTSPackage, _logicalContainer), _context.PluginLoader); this.DTSPackage.TransactionOption = (Microsoft.SqlServer.Dts.Runtime.DTSTransactionOption) Enum.Parse(typeof(Microsoft.SqlServer.Dts.Runtime.DTSTransactionOption), this.LogicalPackage.TransactionMode); EmitPatterns(newContext); this.Save(); } catch (Exception e) { this.Save(); MessageEngine.Global.Trace(Severity.Error, e, e.Message); } return(newContext); }
public virtual SSISEmitterContext Emit() { SSISEmitterContext newContext = _context.NewParentSequence(new SsisSequence(this.SequenceContainer, this._logicalContainer)); this.DTSSequenceContainer.TransactionOption = (Microsoft.SqlServer.Dts.Runtime.DTSTransactionOption) Enum.Parse(typeof(Microsoft.SqlServer.Dts.Runtime.DTSTransactionOption), this._logicalContainer.TransactionMode); //TODO: Hardcode the IsolationLevel to ReadCommitted. This will be changed to be customizable. this.DTSSequenceContainer.IsolationLevel = System.Data.IsolationLevel.ReadCommitted; foreach (Variable variable in _logicalContainer.VariableList) { SsisVariable s = new SsisVariable(variable, newContext); } EmitPatterns(newContext); return(newContext); }
public SSISEmitterContext Emit() { MessageEngine.Global.Trace(Severity.Notification, Resources.EmittingETL, _logicalETL.Name); _dataFlowTask = (DTS.TaskHost)Context.SSISSequence.AppendExecutable("STOCK:PipelineTask"); _dataFlowTask.Properties["DelayValidation"].SetValue(_dataFlowTask, _logicalETL.DelayValidation); _dataFlowTask.Properties["IsolationLevel"].SetValue(_dataFlowTask, _logicalETL.IsolationLevel); _dataFlowTask.Name = _logicalETL.Name; this.NewDataFlow(); SSISEmitterContext dataFlowContext = _context.AddDataFlow(this); foreach (Transformation t in _logicalETL.Transformations) { dataFlowContext.InstantiateEmitter(t, dataFlowContext).Emit(); } return(_context); }
public SsisComponent(Transformation transformation, SSISEmitterContext context) { if (!context.HasSSISDataFlowTask) { // TODO: Message.Trace(Severity.Error) } _transformation = transformation; _dataFlowTask = context.SSISDataFlowTask; _context = context; _component = _dataFlowTask.NewComponentMetaData(); _component.ComponentClassID = ClassID; _instance = _component.Instantiate(); _instance.ProvideComponentProperties(); _component.Name = _transformation.Name; _component.ValidateExternalMetadata = transformation.ValidateExternalMetadata; }
public SsisSqlTask(SqlTask obj, SSISEmitterContext context) : base(obj, context) { _logicalExecuteSQL = obj; _sqlTask = (DTS.TaskHost)Context.SSISSequence.AppendExecutable("STOCK:SQLTask"); if (!string.IsNullOrEmpty(_logicalExecuteSQL.Name)) { _name = _logicalExecuteSQL.Name; } _sqlTask.Name = Name + Guid.NewGuid().ToString(); _sqlTask.Description = Description; SetProperty("Connection", _logicalExecuteSQL.Connection); SetProperty("IsolationLevel", _logicalExecuteSQL.IsolationLevel); switch (_logicalExecuteSQL.Type.ToUpper(System.Globalization.CultureInfo.InvariantCulture)) { case "EXPRESSION": SSISTask.SqlStatementSourceType = DTSTasks.ExecuteSQLTask.SqlStatementSourceType.DirectInput; break; default: //case "FILE": SSISTask.SqlStatementSourceType = DTSTasks.ExecuteSQLTask.SqlStatementSourceType.FileConnection; break; } }
public SsisVariable(string name, object value, SSISEmitterContext context) : this(name, value, (DTS.DtsContainer)context.ParentContainer) { }
public SsisOleDbCommandComponent(Transformation t, SSISEmitterContext context) : base(t, context) { InitializeConnection(((OLEDBCommand)_transformation).Connection); SetOutputName(_transformation.OutputPath); SetupComponentProperties(); }
protected SsisTaskEmitter(LogicalObject obj, SSISEmitterContext context) { _name = obj.Name; _description = obj.Name; _context = context; }
public SsisTermLookupComponent(Transformation t, SSISEmitterContext context) : base(t, context) { InitializeConnection(((TermLookup)_transformation).Connection); SetOutputName(_transformation.OutputPath); SetComponentProperties(); }
public override SSISEmitterContext Emit() { this.UnSave(); this.Save(); SSISEmitterContext newContext = null; try { Package logicalPackage = (Package)_logicalContainer; this.DTSPackage.Variables.Add("_vulcanPackageRepositoryDirectory", false, "User", OutputBaseDirectory); foreach (ConnectionConfiguration connection in logicalPackage.ConnectionConfigurationList) { this.AddConfiguration(connection.Name); SsisConnection s = new SsisConnection(connection); } foreach (PackageConfiguration config in logicalPackage.PackageConfigurationList) { this.AddConfiguration(config.Name); } foreach (Variable variable in logicalPackage.VariableList) { SsisVariable s = new SsisVariable(variable); } this.Reload(); newContext = new SSISEmitterContext(this, new SsisSequence(this.DTSPackage, _logicalContainer), _context.PluginLoader); this.DTSPackage.TransactionOption = (Microsoft.SqlServer.Dts.Runtime.DTSTransactionOption) Enum.Parse(typeof(Microsoft.SqlServer.Dts.Runtime.DTSTransactionOption), this.LogicalPackage.TransactionMode); EmitPatterns(newContext); this.Save(); } catch (Exception e) { this.Save(); MessageEngine.Global.Trace(Severity.Error, e, e.Message); } return newContext; }
public SsisExecutePackage(ExecutePackageTask execPackage, SSISEmitterContext context) : base(execPackage, context) { _execPackageTaskHost = (DTS.TaskHost)Context.SSISSequence.AppendExecutable("STOCK:ExecutePackageTask"); Initialize(execPackage); }
public SsisVariable(Variable variable, SSISEmitterContext context) : this(variable.Name, variable.Value, (DTS.DtsContainer)context.ParentContainer) { }
public SsisDerivedColumnsComponent(Transformation t, SSISEmitterContext context) : base(t, context) { SetOutputName(_transformation.OutputPath); }
public SsisConnectionConfiguration(ConnectionConfiguration connection, SSISEmitterContext context) { this._name = connection.Name; this._connectionString = connection.ConnectionString; this._context = context; }
public SsisConditionalSplitComponent(Transformation t, SSISEmitterContext context) : base(t, context) { }
public SsisPackage(Package logicalPackage, SSISEmitterContext context) : base (logicalPackage, context) { _DTSApplication = new DTS.Application(); _DTSPackage = new DTS.Package(); _DTSPackage.Name = Name.Replace(".", "_").Replace("[", " ").Replace("]", " "); _projectManager = new SsisProject(this); CurrentPackage = this; }
public SsisUnionAllComponent(Transformation transformation, SSISEmitterContext context) : base(transformation, context) { SetOutputName(_transformation.OutputPath); }