Class ScopeEmitter
Generate Scope (U-SQL) code for computing metrics.
Assembly: MetricSetEmitters.dll
Syntax
public class ScopeEmitter : IEmitter, IGenericMetricsPlanTransformer<IDictionary<string, MemoryStream>>
Constructors
View Source
ScopeEmitter(String, String, String, ILogger, String, IGenericExpressionVisitor<String>)
Create a Scope emitter for MetricsPlan with exactly one output table.
Declaration
public ScopeEmitter(string scriptName, string preamble, string outputPath, ILogger logger, string cSharpBlock = "", IGenericExpressionVisitor<string> expressionVisitor = null)
Parameters
Fields
View Source
MatchFlightDependentDllName
Declaration
public const string MatchFlightDependentDllName = "ForayCommonHelper.dll"
Field Value
View Source
Declaration
public const string NGPTagHeader = "\r\n#IF(EXISTS(\"/shares/PXSCosmos09.Prod/PXS.DeleteSignal.Prod/PrivacyAnnotation/PrivacyAnnotation.module\"))\r\n MODULE \"/shares/PXSCosmos09.Prod/PXS.DeleteSignal.Prod/PrivacyAnnotation/PrivacyAnnotation.module\";\r\n#ENDIF\r\n#IF(EXISTS(\"/shares/PXSCosmos08.Prod/PXS.DeleteSignal.Prod/PrivacyAnnotation/PrivacyAnnotation.module\"))\r\n MODULE \"/shares/PXSCosmos08.Prod/PXS.DeleteSignal.Prod/PrivacyAnnotation/PrivacyAnnotation.module\";\r\n#ENDIF\r\n#IF(EXISTS(\"/shares/PXSCosmos11.Prod/PXS.DeleteSignal.PROD/PrivacyAnnotation/PrivacyAnnotation.module\"))\r\n MODULE \"/shares/PXSCosmos11.Prod/PXS.DeleteSignal.PROD/PrivacyAnnotation/PrivacyAnnotation.module\";\r\n#ENDIF\r\n#IF(EXISTS(\"/shares/PXSCosmos14.Prod/PXS.DeleteSignal.PROD/PrivacyAnnotation/PrivacyAnnotation.module\"))\r\n MODULE \"/shares/PXSCosmos14.Prod/PXS.DeleteSignal.PROD/PrivacyAnnotation/PrivacyAnnotation.module\";\r\n#ENDIF\r\n#IF(EXISTS(\"/shares/PXSCosmos15.Prod/PXS.DeleteSignal.PROD/PrivacyAnnotation/PrivacyAnnotation.module\"))\r\n MODULE \"/shares/PXSCosmos15.Prod/PXS.DeleteSignal.PROD/PrivacyAnnotation/PrivacyAnnotation.module\";\r\n#ENDIF\r\nUSING Privacy;\r\n"
Field Value
View Source
ScopeSDK_DLLs
Reference blacklist when generate script in ScopeEmitter. The list
is composed of system DLLs and Scope DLLs.
Declaration
public static ISet<string> ScopeSDK_DLLs
Field Value
Properties
View Source
Assumption
Declaration
public IMetricsPlanValidator Assumption { get; }
Property Value
View Source
Extern
Declaration
public ExternKind Extern { get; }
Property Value
Methods
View Source
MapOutputTablesToPaths(MetricsPlan, IReadOnlyDictionary<Table, ISet<Expression>>)
Maps leaf Tables to output paths.
NOTE: currently only supports a unique output Table.
Declaration
public IDictionary<string, string> MapOutputTablesToPaths(MetricsPlan plan, IReadOnlyDictionary<Table, ISet<Expression>> tableToExpressions)
Parameters
Returns
View Source
ProcessStatement(String, String, IEnumerable<String>)
Declaration
public static string ProcessStatement(string source, string processor, IEnumerable<string> args = null)
Parameters
Returns
View Source
ReduceStatement(String, String, IEnumerable<String>, IEnumerable<String>, IEnumerable<String>)
Declaration
public static string ReduceStatement(string source, string reducer, IEnumerable<string> on = null, IEnumerable<string> presort = null, IEnumerable<string> args = null)
Parameters
Returns
View Source
ReferencePath(String)
Resolve a file path from a reference name.
Declaration
public static string ReferencePath(string name)
Parameters
Type |
Name |
Description |
String |
name |
|
Returns
View Source
References(MetricsPlan)
Reference
- all assemblies used by Externs present in the
plan
any Externs, in case there are deep dependencies,
- exclude assemblies listed in ScopeSDK_DLLs.
Declaration
public IEnumerable<string> References(MetricsPlan plan)
Parameters
Returns
View Source
Resources(MetricsPlan)
Resource every file referenced by plan
except the ones listed in ScopeSDK_DLLs.
Declaration
public IEnumerable<string> Resources(MetricsPlan plan)
Parameters
Returns
View Source
ScriptOnly(MetricsPlan)
Declaration
public string ScriptOnly(MetricsPlan plan)
Parameters
Returns
View Source
Declaration
public IDictionary<string, MemoryStream> Transform(MetricsPlan plan)
Parameters
Returns
Implements
Extension Methods