Skip to main content

Integrations Function

Integration Functions Overview

Integration functions provide a way to custom tailor DPL Studio to any data integration task. This section will describe some scenarios where you may wish to use integration functions in addition to providing more detailed specifications and examples.

Integration functions allow you to execute arbitrary code within the Digital Process Logic environment. Integration functions are different from user defined functions in two ways: their result can not be used in any other transformation process or export, and they consume queries and connections directly. This is useful when you wish to combine DPL data with an external process.

This section defines the programmatic objects that are available within integration functions.

IDataConnection GetConnection(string paramName)Returns the connection object corresponding to the parameter paramName.
IDataCachedTable GetQuery(string paramName, IDataParameterCollection queryParameters)Returns the query object corresponding to the parameter paramName
string GetString(string paramName)Returns the string corresponding to the parameter paramName
string Export(string templateName, IDataParameterCollection paramCollection,IDataQueryStatus status Handler)Returns the string containing export status messages

 

**IDataConnection Members ** ```Namespace: DPL Studio.Connectors.ConnectorInterfaces``

The data connection object must be cast to the specific connection type used. Refer to the documentation for the connector in question for the API.

**IDataCachedTable Members ** Namespace: DPL Studio.Connectors.ConnectorInterfaces

Represents a collection of vectors. IDataCachedTable is commonly used to store tabular data, however it isn't required that all columns have the same length.

int GetRowCount()Returns the length of the longest vector within the table.
object GetValue(int rowIndex, int colIndex)Returns the value at the given row and column index.
DbTableMetadata GetMetadata()Returns the table metadata, which describes the type and any display information for the fields contained within the table. Refer to the Integration Function API Specification for details on the DbTableMetadata object.

 

DBTableMetadata Members
**Namespace: DPL Studio.Connectors.ConnectorInterfaces**

Represents the table metadata and display information that describes the fields within the table.

DbMetadataNamedItem TableReturns table description information.
DbColumnMetadataList ColumnsReturns the column list for this table.
DateTime LastFetchTimeReturns the time stamp when this metadata was last updated.

 

Public Methods

int FindColumnIndex(string columnName)Returns the column index from the columnName.

 

DbMetadataNamedItem Members
**Namespace: DPL Studio.Connectors.ConnectorInterfaces**

string NameDisplay name of this item
string DescriptionDescription of this item

DbColumnMetadataList Members
**Namespace: DPL Studio.Connectors.ConnectorInterfaces**

Collection of column metadata objects.

Public Properties

int CountReturns the number of items in the list.

Public Properties

string[] GetColumnList()Returns all the column names in the list.
Type[] GetColumnTypes()Returns the types for each column in the list.
------
DbColumnMetadata GetColumn(int index)Returns the column metadata at the specified index.
------
DbColumnMetadata FindColumn(string colName)Returns the column metadata by column name. Returns null if the column is not found.
------
int FindColumnOrdinal(string colName)Returns the column ordinal from the column name. Returns -1 if the column is not found.
------

 

DbColumnMetadata Members
**Namespace: DPL Studio.Connectors.ConnectorInterfaces**

Represents the metadata for a column.

string NameGets or sets the column name.
int ColumnOrdinalGets the ordinal for this column.
int PrecisionGets the precision for this column.
int ScaleGets the scale for this column.
int ColumnSizeGets the column size in bytes for this column
Type ColumnTypeGets the datatype for this column
string DescriptionGets the description for this column
bool PrimaryKeyReturns true if this column is a primary key.
bool NonNullableReturns true if this column cannot accept null values.

 

ParamCollection Members
**Namespace: DPL Studio.Connectors.ConnectorInterfaces**

Represents the parameter collection.

Public Properities

int CountReturn the number of the parameter collection.
bool IsFixedSizeReturn true if the parameter collection is of fixed size.
bool IsReadOnlyReturn true if the parameter collection is read-only type.
bool IsSynchronizedReturn true if the access to the parameter collection is synchronized (thread-safe).
object SyncRootGet the object that can be used to synchronize access to parameter collection.
Parameter ParamCollection[int index]Get the parameter in the parameter collection at the specified index.
Parameter ParamCollection[string parameterName]Get the parameter in the parameter collection with the specified name.

 

Public Methods

int Add(object value)Add parameter.
void Clear()Clear all parameters in the collection.
bool Contains(string parameterName)Check if the parameter collection contains the specified parameter's name
void CopyTo(Array array, int index)Copy the range of array to the parameter collection starting at the specified index.
System.Collections.IEnumerator GetEnumerator()Return an enumerator for a section of a parameter collection.
int IndexOf(string parameterName)Return the index of the parameter in the parameter collection.
void Insert(int index, object value)Insert a parameter into the parameter collection at the specified index
Parameter Item[int index]Return parameter of the specified index.
void Remove(object value)Remove the first occurrence of a specified object from the parameter collection.
void RemoveAt(string parameterName)Remove the specified parameter
int TypeSafeAdd(IDataParameter prm)Add parameter to the end of a parameter collection.
void TypeSafeInsert(int index, IDataParameter prm)Insert a parameter into a parameter collection at the specified index.