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 Table | Returns table description information. |
|---|---|
| DbColumnMetadataList Columns | Returns the column list for this table. |
| DateTime LastFetchTime | Returns 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 Name | Display name of this item |
|---|---|
| string Description | Description of this item |
DbColumnMetadataList Members
**Namespace: DPL Studio.Connectors.ConnectorInterfaces**
Collection of column metadata objects.
Public Properties
| int Count | Returns 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 Name | Gets or sets the column name. |
|---|---|
| int ColumnOrdinal | Gets the ordinal for this column. |
| int Precision | Gets the precision for this column. |
| int Scale | Gets the scale for this column. |
| int ColumnSize | Gets the column size in bytes for this column |
| Type ColumnType | Gets the datatype for this column |
| string Description | Gets the description for this column |
| bool PrimaryKey | Returns true if this column is a primary key. |
| bool NonNullable | Returns true if this column cannot accept null values. |
ParamCollection Members
**Namespace: DPL Studio.Connectors.ConnectorInterfaces**
Represents the parameter collection.
Public Properities
| int Count | Return the number of the parameter collection. |
|---|---|
| bool IsFixedSize | Return true if the parameter collection is of fixed size. |
| bool IsReadOnly | Return true if the parameter collection is read-only type. |
| bool IsSynchronized | Return true if the access to the parameter collection is synchronized (thread-safe). |
| object SyncRoot | Get 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. |