Type: EtlPlainLinkFieldMappingType;
Type: Prognoz.Platform.Interop.Etl.EtlPlainLinkFieldMappingType;
The Type property determines link type of data source field of ETL task.
To determine a data source field, use the IEtlPlainLinkFieldMapping.Field property.
Executing the example requires an ETL task with the ETL identifier.
Add links to the Etl and Metabase system assemblies.
Sub UserProc;
Var
MB: IMetabase;
EtlTask: IEtlTask;
Links: IEtlPlainLinks;
Link: IEtlPlainLink;
Output: IEtlPlainOutput;
FileMapp: IEtlPlainLinkFieldMapping;
Type: Integer;
Field: IEtlPlainField;
Begin
MB := MetabaseClass.Active;
EtlTask := MB.ItemById("ETL").Bind As IEtlTask;
// Get link between data source and data consumer
Links := EtlTask.Links;
Link := Links.Item(0);
// Get output field
Output := Link.SourceObjectOutput;
Field := Output.Fields.Item(0);
FileMapp := Link.Link(Field);
// Get link type of data source field
Type := FileMapp.Type;
Debug.WriteLine("Link type: " + Type.ToString);
End Sub UserProc;
After executing the example the console window displays a message about link type of data source field of ETL task.
The requirements and result of the Fore.NET example execution match with those in the Fore example.
Imports Prognoz.Platform.Interop.Metabase;
Imports Prognoz.Platform.Interop.Etl;
…
Public Shared Sub Main(Params: StartParams);
Var
MB: IMetabase;
EtlTask: IEtlTask;
Links: IEtlPlainLinks;
Link: IEtlPlainLink;
Output: IEtlPlainOutput;
FileMapp: IEtlPlainLinkFieldMapping;
Type: Integer;
Field: IEtlPlainField;
Begin
MB := Params.Metabase;
EtlTask := MB.ItemById["ETL"].Bind() As IEtlTask;
// Get link between data source and data consumer
Links := EtlTask.Links;
Link := Links.Item[0];
// Get output field
Output := Link.SourceObjectOutput;
Field := Output.Fields.Item[0];
FileMapp := Link.Link[Field];
// Get link type of data source field
Type := FileMapp.Type As Int32;
System.Diagnostics.Debug.WriteLine("Link type: " + Type.ToString());
End Sub;
See also: