public static void LowerPackage(AstNode astNode, LoweringContext context) { var astPackage = astNode as AstTask.AstPackageNode; if (astPackage != null) { if (astPackage.Emit) { var p = new Package(astPackage); context.ParentObject.Children.Add(p); context = new TaskLoweringContext(p); LowerConnection(astPackage.LogConnection, context); LowerChildren(astPackage, context); LowerEventHandlers(astPackage, p, context); } else { MessageEngine.Trace( astPackage, Severity.Debug, "D_S008", "Skipped Lowering of Package {0} because Emit was {1}", astPackage.Name, astPackage.Emit); } } }
public static void CreateAndRegister(AstNode astNode, LoweringContext context) { var astQuerySourceNode = astNode as AstQuerySourceNode; if (astQuerySourceNode != null) { var oleDBSource = new OleDBSource(context, astNode) { _oleDBConnection = new OleDBConnection(astQuerySourceNode.Connection) }; // Note: vsabella: workaround for different behavior regarding expressions for OLEDB sources // versus how it works in Lookups. if (astQuerySourceNode.Query.QueryType == QueryType.Expression) { // Variable name has to be only alphanumeric, more restrictive than astQuerySource Name string varName = "__" + System.Guid.NewGuid().ToString("N"); var variable = new Variable(varName); oleDBSource.SqlCommandVarName = "User::" + varName; variable.TypeCode = System.TypeCode.String; variable.EvaluateAsExpression = true; variable.ValueString = astQuerySourceNode.Query.Body; context.ParentObject.Children.Add(variable); } else { foreach (AstVariableParameterMappingNode paramNode in astQuerySourceNode.Query.Parameters) { var variable = new Variable(paramNode.Variable); oleDBSource._paramDictionary[paramNode.Name] = variable; context.ParentObject.Children.Add(variable); } } context.ParentObject.Children.Add(oleDBSource._oleDBConnection); context.ParentObject.Children.Add(oleDBSource); } }
public SSISEmitterException(AstNode node, Exception e) : base(string.Empty, e) { _node = node; if (node == null) { _errorMessage = base.Message; } else if (node is AstNamedNode) { SetMessages(((AstNamedNode)node).Name, GetTagName(node.BoundXElement)); } else if (node.ReferenceableName != null) { SetMessages(node.ReferenceableName, GetTagName(node.BoundXElement)); Source = node.ReferenceableName; } else if (node.ParentASTNode != null && node.ParentASTNode.ReferenceableName != null) { SetMessages(node.ParentASTNode.ReferenceableName, GetTagName(node.ParentASTNode.BoundXElement)); } else { _errorMessage = base.Message; } }
public ValidationItem(Severity severity, string recommendation, AstNode astNode, string message, params object[] formatParmeters) { _severity = severity; _recommendation = recommendation; _astNode = astNode; this._message = String.Format("{0}: {1}: {2}", severity, String.Format(message, formatParmeters)); }
public void Push(AstNode astNode) { if (IsScopeBoundary(astNode)) { this._ScopeTracker.Push(astNode); } this._PathTracker.Push(astNode); }
public static void CreateAndRegister(AstNode astNode, LoweringContext context) { var astDestination = astNode as AstDestinationNode; if (astDestination != null) { var oleDBDestination = new OleDBDestination(context, astNode) { _oleDBConnection = new OleDBConnection(astDestination.Table.Connection) }; context.ParentObject.Children.Add(oleDBDestination._oleDBConnection); context.ParentObject.Children.Add(oleDBDestination); } }
public static void CreateAndRegister(AstNode astNode, LoweringContext context) { var astTermLookupNode = astNode as AstTermLookupNode; if (astTermLookupNode != null) { var termLookup = new TermLookup(context, astNode) { _oleDBConnection = new OleDBConnection(astTermLookupNode.Connection) }; context.ParentObject.Children.Add(termLookup._oleDBConnection); context.ParentObject.Children.Add(termLookup); } }
public static void CreateAndRegister(AstNode astNode, LoweringContext context) { var astSlowlyChangingDimensionNode = astNode as AstSlowlyChangingDimensionNode; if (astSlowlyChangingDimensionNode != null) { var slowlyChangingDimension = new SlowlyChangingDimension(context, astNode) { _oleDBConnection = new OleDBConnection(astSlowlyChangingDimensionNode.Connection) }; context.ParentObject.Children.Add(slowlyChangingDimension._oleDBConnection); context.ParentObject.Children.Add(slowlyChangingDimension); } }
public static void LowerExecutePackage(AstNode astNode, LoweringContext context) { var astTask = astNode as AstExecutePackageTaskNode; if (astTask != null) { var ep = new ExecutePackageTask(astTask); context.ParentObject.Children.Add(ep); ContainerLoweringEngine.LowerEventHandlers(astTask, ep, context); } }
public static void CreateAndRegister(AstNode astNode, LoweringContext context) { var astOleDBCommandNode = astNode as AstOleDBCommandNode; if (astOleDBCommandNode != null) { var oleDBCommand = new OleDBCommand(context, astNode) { _oleDBConnection = new OleDBConnection(astOleDBCommandNode.Connection) }; context.ParentObject.Children.Add(oleDBCommand._oleDBConnection); context.ParentObject.Children.Add(oleDBCommand); } }
public static void Lower(AstNode node, LoweringContext context) { Type nodeType = node.GetType(); if (LoweringDictionary.ContainsKey(nodeType)) { foreach (AstLoweringHandler handler in LoweringDictionary[nodeType]) { handler(node, context); } } }
public static void LowerSqlTask(AstNode astNode, LoweringContext context) { var astTask = astNode as AstExecuteSqlTaskNode; if (astTask != null) { var s = new SqlTask(astTask); ContainerLoweringEngine.LowerConnection(astTask.Connection, context); context.ParentObject.Children.Add(s); ContainerLoweringEngine.LowerEventHandlers(astTask, s, context); } }
public static void LowerDataflow(AstNode astNode, LoweringContext context) { var astDataflow = astNode as AstEtlRootNode; if (astDataflow != null) { var dft = new DataflowTask(astDataflow); context.ParentObject.Children.Add(dft); var dflc = new DataflowLoweringContext(dft); LowerTransformations(astDataflow, dflc); ContainerLoweringEngine.LowerEventHandlers(astDataflow, dft, context); } }
public static void LowerForLoop(AstNode astNode, LoweringContext context) { var astContainer = astNode as AstTask.AstForLoopContainerTaskNode; if (astContainer != null) { var forLoop = new PhysicalTask.ForLoop(astContainer); context.ParentObject.Children.Add(forLoop); LowerConnection(astContainer.LogConnection, context); context = new TaskLoweringContext(forLoop); LowerChildren(astContainer, context); LowerEventHandlers(astContainer, forLoop, context); } }
public static void LowerContainer(AstNode astNode, LoweringContext context) { var astContainer = astNode as AstTask.AstContainerTaskNode; if (astContainer != null) { var seq = new PhysicalTask.Sequence(astContainer); context.ParentObject.Children.Add(seq); LowerConnection(astContainer.LogConnection, context); context = new TaskLoweringContext(seq); LowerChildren(astContainer, context); LowerEventHandlers(astContainer, seq, context); } }
public static void Trace(AstNode astNode, Severity severity, string errorCode, string message, params object[] formatParameters) { if (astNode != null && astNode.BimlFile != null && astNode.BoundXObject != null && astNode.BoundXObject.XObject != null) { string filename = astNode.BimlFile.Name; int line = ((System.Xml.IXmlLineInfo)astNode.BoundXObject.XObject).LineNumber; int offset = ((System.Xml.IXmlLineInfo)astNode.BoundXObject.XObject).LinePosition; Trace(filename, line, offset, severity, errorCode, null, message, formatParameters); } else { Trace(null, -1, -1, severity, errorCode, null, message, formatParameters); } }
public Union(LoweringContext context, AstNode astNode) : base(context, astNode as AstTransformationNode) { _astUnionAllNode = astNode as AstUnionAllNode; if (_astUnionAllNode != null) { int i = 0; foreach (AstDataflowMappedInputPathNode ip in _astUnionAllNode.InputPaths) { BindingList.Add(new MappedBinding(_astUnionAllNode.Name, ip.OutputPath.Transformation.Name, ip.OutputPath.SsisName, i, ip.Mappings)); i++; } } }
public OleDBDestination(LoweringContext context, AstNode astNode) : base(context, astNode as AstTransformationNode) { _astDestination = astNode as AstDestinationNode; RegisterInputBinding(_astDestination); }
public SlowlyChangingDimension(LoweringContext context, AstNode astNode) : base(context, astNode as AstTransformationNode) { _astSlowlyChangingDimensionNode = astNode as AstSlowlyChangingDimensionNode; RegisterInputBinding(_astSlowlyChangingDimensionNode); }
public static void LowerRowCount(AstNode astNode, LoweringContext context) { RowCount.CreateAndRegister(astNode, context); }
public static void LowerOleDBCommand(AstNode astNode, LoweringContext context) { OleDBCommand.CreateAndRegister(astNode, context); }
public static void LowerOleDBSource(AstNode astNode, LoweringContext context) { OleDBSource.CreateAndRegister(astNode, context); }
public static void CreateAndRegister(AstNode astNode, LoweringContext context) { context.ParentObject.Children.Add(new Union(context, astNode)); }
public DerivedColumns(LoweringContext context, AstNode astNode) : base(context, astNode as AstTransformationNode) { _astDerivedColumnListNode = astNode as AstDerivedColumnListNode; RegisterInputBinding(_astDerivedColumnListNode); }
public RowCount(LoweringContext context, AstNode astNode) : base(context, astNode as AstTransformationNode) { _astRowCountNode = astNode as AstRowCountNode; RegisterInputBinding(_astRowCountNode); }
public static void CreateAndRegister(AstNode astNode, LoweringContext context) { context.ParentObject.Children.Add((new DerivedColumns(context, astNode))); }
public ConditionalSplit(LoweringContext context, AstNode astNode) : base(context, astNode as AstTransformationNode) { _astConditionalSplitNode = astNode as AstConditionalSplitNode; RegisterInputBinding(_astConditionalSplitNode); }
public static void CreateAndRegister(AstNode astNode, LoweringContext context) { context.ParentObject.Children.Add((new ConditionalSplit(context, astNode))); }
public OleDBSource(LoweringContext context, AstNode astNode) : base(context, astNode as AstTransformationNode) { _paramDictionary = new Dictionary<string, Variable>(); _astQuerySourceNode = astNode as AstQuerySourceNode; }
public TermLookup(LoweringContext context, AstNode astNode) : base(context, astNode as AstTransformationNode) { _astTermLookupNode = astNode as AstTermLookupNode; RegisterInputBinding(_astTermLookupNode); }