public OLEDBCommand( VulcanPackage vulcanPackage, MainPipe dataFlowTask, IDTSComponentMetaData90 parentComponent, string name, string description, Connection connection, string command ) : base(vulcanPackage, dataFlowTask, parentComponent, name, description) { _oledbCom = dataFlowTask.ComponentMetaDataCollection.New(); _oledbCom.ComponentClassID = "DTSTransform.OLEDBCommand"; //IMPORTANT! If you do not Instantiate() first, the component names do not get set... this is bad. _oledbComI = _oledbCom.Instantiate(); _oledbComI.ProvideComponentProperties(); _oledbCom.Name = name; _oledbCom.Description = description; _oledbCom.RuntimeConnectionCollection[0].ConnectionManagerID = connection.ConnectionManager.ID; _oledbCom.RuntimeConnectionCollection[0].ConnectionManager = DTS.DtsConvert.ToConnectionManager90(connection.ConnectionManager); _oledbComI.SetComponentProperty("SqlCommand", command); dataFlowTask.PathCollection.New().AttachPathAndPropagateNotifications( parentComponent.OutputCollection[0], _oledbCom.InputCollection[0] ); try { _oledbComI.AcquireConnections(null); _oledbComI.ReinitializeMetaData(); _oledbComI.ReleaseConnections(); } catch (System.Runtime.InteropServices.COMException ce) { Message.Trace(Severity.Error,ce,"OLEDBCommand: {3}: {2}: Source {0}: Command {1}", connection.ConnectionManager.Name, command, ce.Message, _oledbCom.GetErrorDescription(ce.ErrorCode)); } catch (Exception e) { Message.Trace(Severity.Error,e,"OLEDBCommand: {2}: Source {0}: Command {1}", connection.ConnectionManager.Name, command, e.Message); } AutoMap(); }
protected Transformation( Packages.VulcanPackage vulcanPackage, MainPipe dataFlowTask, IDTSComponentMetaData90 parentComponent, string name, string description ) { this._vulcanPackage = vulcanPackage; this._dataFlowTask = dataFlowTask; this._parentComponent = parentComponent; this._name = name; this._description = description; }
public TermLookup( VulcanPackage vulcanPackage, MainPipe dataFlowTask, IDTSComponentMetaData90 parentComponent, string name, string description, Connection connection, bool isCaseSensitive, string refTermColumn, string refTermTable ) : base(vulcanPackage, dataFlowTask, parentComponent, name, description) { TermLookupCom = dataFlowTask.ComponentMetaDataCollection.New(); TermLookupCom.ComponentClassID = "DTSTransform.TermLookup"; TermLookupComI = TermLookupCom.Instantiate(); TermLookupComI.ProvideComponentProperties(); TermLookupCom.Name = name; TermLookupCom.RuntimeConnectionCollection[0].ConnectionManagerID = connection.ConnectionManager.ID; TermLookupCom.RuntimeConnectionCollection[0].ConnectionManager = DTS.DtsConvert.ToConnectionManager90(connection.ConnectionManager); TermLookupComI.SetComponentProperty("IsCaseSensitive", isCaseSensitive); TermLookupComI.SetComponentProperty("RefTermColumn", refTermColumn); TermLookupComI.SetComponentProperty("RefTermTable", refTermTable); TermLookupCom.OutputCollection[0].ErrorRowDisposition = DTSRowDisposition.RD_IgnoreFailure; dataFlowTask.PathCollection.New().AttachPathAndPropagateNotifications( parentComponent.OutputCollection[0], TermLookupCom.InputCollection[0] ); TermLookupComI.AcquireConnections(null); TermLookupComI.ReinitializeMetaData(); TermLookupComI.ReleaseConnections(); }
public Lookup( VulcanPackage vulcanPackage, MainPipe dataFlowTask, IDTSComponentMetaData90 parentComponent, string name, string description, Connection connection, string query ) : base(vulcanPackage, dataFlowTask, parentComponent, name, description) { lookupCom = dataFlowTask.ComponentMetaDataCollection.New(); lookupCom.ComponentClassID = "DTSTransform.Lookup"; lookupComI = lookupCom.Instantiate(); lookupComI.ProvideComponentProperties(); lookupCom.Name = name; lookupCom.RuntimeConnectionCollection[0].ConnectionManagerID = connection.ConnectionManager.ID; lookupCom.RuntimeConnectionCollection[0].ConnectionManager = DTS.DtsConvert.ToConnectionManager90(connection.ConnectionManager); lookupComI.SetComponentProperty("SqlCommand", query); lookupCom.OutputCollection[0].ErrorRowDisposition = DTSRowDisposition.RD_IgnoreFailure; dataFlowTask.PathCollection.New().AttachPathAndPropagateNotifications( parentComponent.OutputCollection[0], lookupCom.InputCollection[0] ); lookupComI.AcquireConnections(null); lookupComI.ReinitializeMetaData(); lookupComI.ReleaseConnections(); }
public MessageEngine Compile(string vulcanFile) { if (File.Exists(vulcanFile)) { Message.PushMessageEngine(vulcanFile); VulcanConfig vulcanConfig = _templateManager.XmlTemplateReplacement(new VulcanConfig(vulcanFile)); foreach (XPathNavigator nav in vulcanConfig.Navigator.Select("//rc:VulcanConfig/rc:Package", vulcanConfig.NamespaceManager)) { string name = nav.SelectSingleNode("@Name").Value; string packageType = nav.SelectSingleNode("@PackageType").Value; VulcanPackage vulcanPackage = vulcanPackage = new VulcanPackage(name, packageType, vulcanConfig, _templateManager, nav); try { vulcanPackage.ProcessPackage(); } catch (Exception) { if (vulcanPackage != null) { if (Settings.Default.CleanupFilesOnError) { vulcanPackage.UnSave(); } else { vulcanPackage.Save(); vulcanPackage.Validate(); } } } } } else { Message.Trace(Severity.Error, new FileNotFoundException("Vulcan File Not Found", vulcanFile), "VulcanFile {0} not found", vulcanFile); } return Message.PopMessageEngine(); }
public Sort( VulcanPackage vulcanPackage, MainPipe dataFlowTask, IDTSComponentMetaData90 parentComponent, string name, string description, bool eliminateDuplicates, int maximumThreads ) : base(vulcanPackage, dataFlowTask, parentComponent, name, description) { _sortOrder = 1; _sortCom = dataFlowTask.ComponentMetaDataCollection.New(); _sortCom.ComponentClassID = "DTSTransform.sort"; _sortComI = _sortCom.Instantiate(); _sortComI.ProvideComponentProperties(); _sortCom.Name = name; _sortComI.SetComponentProperty("EliminateDuplicates", eliminateDuplicates); _sortComI.SetComponentProperty("MaximumThreads", maximumThreads); _sortCom.OutputCollection[0].ErrorRowDisposition = DTSRowDisposition.RD_NotUsed; dataFlowTask.PathCollection.New().AttachPathAndPropagateNotifications( parentComponent.OutputCollection[0], _sortCom.InputCollection[0] ); _sortComI.AcquireConnections(null); _sortComI.ReinitializeMetaData(); _sortComI.ReleaseConnections(); }
public UnionAll( VulcanPackage vulcanPackage, MainPipe dataFlowTask, IDTSComponentMetaData90 parentComponent, string name, string description ) : base(vulcanPackage, dataFlowTask, parentComponent, name, description) { unionAllCom = dataFlowTask.ComponentMetaDataCollection.New(); unionAllCom.ComponentClassID = "DTSTransform.UnionAll"; unionAllComI = unionAllCom.Instantiate(); unionAllComI.ProvideComponentProperties(); unionAllCom.Name = name; unionAllCom.OutputCollection[0].ErrorRowDisposition = DTSRowDisposition.RD_NotUsed; }
public ExpressionPathBuilder(VulcanPackage vulcanPackage) { this._vulcanPackage = vulcanPackage; }