Table of Contents

Search

  1. Preface
  2. Working with Transformations
  3. Aggregator Transformation
  4. Custom Transformation
  5. Custom Transformation Functions
  6. Data Masking Transformation
  7. Data Masking Examples
  8. Expression Transformation
  9. External Procedure Transformation
  10. Filter Transformation
  11. HTTP Transformation
  12. Identity Resolution Transformation
  13. Java Transformation
  14. Java Transformation API Reference
  15. Java Expressions
  16. Java Transformation Example
  17. Joiner Transformation
  18. Lookup Transformation
  19. Lookup Caches
  20. Dynamic Lookup Cache
  21. Normalizer Transformation
  22. Rank Transformation
  23. Router Transformation
  24. Sequence Generator Transformation
  25. Sorter Transformation
  26. Source Qualifier Transformation
  27. SQL Transformation
  28. Using the SQL Transformation in a Mapping
  29. Stored Procedure Transformation
  30. Transaction Control Transformation
  31. Union Transformation
  32. Unstructured Data Transformation
  33. Update Strategy Transformation
  34. XML Transformations

Transformation Guide

Transformation Guide

Signature

Signature

A parameter passed to an external procedure is a pointer to an object of the TINFParam class. This fixed-signature function is a method of that class and returns the parameter datatype as an enum value.
The valid datatypes are:
  • INF_DATATYPE_LONG
  • INF_DATATYPE_STRING
  • INF_DATATYPE_DOUBLE
  • INF_DATATYPE_RAW
  • INF_DATATYPE_TIME
The following table describes some parameter access functions:
Parameter Access Function
Description
INF_DATATYPE GetDataType(void);
Gets the datatype of a parameter. Use the parameter datatype to determine which datatype-specific function to use when accessing parameter values.
INF_BOOLEAN IsValid(void);
Verifies that input data is valid. Returns FALSE if the parameter contains truncated data for the string or raw datatypes. Also returns FALSE when the input data exceeds the precision or the input data is a null value.
INF_BOOLEAN IsNULL(void);
Verifies that input data is NULL.
INF_BOOLEAN IsInputMapped (void);
Verifies that input port passing data to this parameter is connected to a transformation.
INF_BOOLEAN IsOutput Mapped (void);
Verifies that output port receiving data from this parameter is connected to a transformation.
INF_BOOLEAN IsInput(void);
Verifies that parameter corresponds to an input port.
INF_BOOLEAN IsOutput(void);
Verifies that parameter corresponds to an output port.
INF_BOOLEAN GetName(void);
Gets the name of the parameter.
SQLIndicator GetIndicator(void);
Gets the value of a parameter indicator. The IsValid and ISNULL functions are special cases of this function. This function can also return INF_SQL_DATA_TRUNCATED.
void SetIndicator(SQLIndicator Indicator);
Sets an output parameter indicator, such as invalid or truncated.
long GetLong(void);
Gets the value of a parameter having a Long or Integer datatype. Call this function only if you know the parameter datatype is Integer or Long. This function does not convert data to Long from another datatype.
double GetDouble(void);
Gets the value of a parameter having a Float or Double datatype. Call this function only if you know the parameter datatype is Float or Double. This function does not convert data to Double from another datatype.
char* GetString(void);
Gets the value of a parameter as a null-terminated string. Call this function only if you know the parameter datatype is String. This function does not convert data to String from another datatype.
The value in the pointer changes when the next row of data is read. If you want to store the value from a row for later use, explicitly copy this string into its own allocated buffer.
char* GetRaw(void);
Gets the value of a parameter as a non-null terminated byte array. Call this function only if you know the parameter datatype is Raw. This function does not convert data to Raw from another datatype.
unsigned long GetActualDataLen(void);
Gets the current length of the array returned by GetRaw.
TINFTime GetTime(void);
Gets the value of a parameter having a Date/Time datatype. Call this function only if you know the parameter datatype is Date/Time. This function does not convert data to Date/Time from another datatype.
void SetLong(long lVal);
Sets the value of an output parameter having a Long datatype.
void SetDouble(double dblVal);
Sets the value of an output parameter having a Double datatype.
void SetString(char* sVal);
Sets the value of an output parameter having a String datatype.
void SetRaw(char* rVal, size_t ActualDataLen);
Sets a non-null terminated byte array.
void SetTime(TINFTime timeVal);
Sets the value of an output parameter having a Date/Time datatype.
Only use the SetInt32 or GetInt32 function when you run the external procedure on a 64-bit Integration Service. Do not use any of the following functions:
  • GetLong
  • SetLong
  • GetpLong
  • GetpDouble
  • GetpTime
Pass the parameters using two parameter lists.
The following table lists the member variables of the external procedure base class:
Variable
Description
m_nInParamCount
Number of input parameters.
m_pInParamVector
Actual input parameter array.
m_nOutParamCount
Number of output parameters.
m_pOutParamVector
Actual output parameter array.
Ports defined as input/output show up in both parameter lists.

0 COMMENTS

We’d like to hear from you!