Informatica Connector Toolkit Getting Started Guide

Informatica Connector Toolkit Getting Started Guide

Step 4. Define Adapter Metadata

Step 4. Define Adapter Metadata

Define the MySQL adapter metadata. Create a native metadata definition for the MySQL adapter to read from and write to MySQL data source.
  1. In the Connector Navigator view, right-click the project and select Add Native Metadata Definition.
    The Add Native Metadata Definition dialog box appears.
  2. Enter the native metadata details.
    The following table describes the values to enter:
    Property Value
    Name table
    Display Name Table
    Description Represents a MySQL table.
    Pattern Type Record
  3. Select Add Record Extension.
  4. Click Add to configure each attribute.
    The Add Attribute dialog box appears.
    1. Enter the following values for the queryHint attribute:
      Property Value
      Name tableType
      Display Name Table Type
      Description Represents the type of record.
      Data Type String
      Min Length 0
      Max Length 255
    2. Click OK.
      The Add Native Metadata Definition dialog box appears.
  5. Click Next.
    The Native Metadata Field Definition page displays.
  6. Select Add Field Extension.
  7. Click Add to configure each attribute.
    1. Enter the following values for the isNullable attribute:
      Property Value
      Name isNullable
      Display Name Is Nullable
      Description Indicates whether the column can contain null values.
      Data Type Boolean
      Default Value True
    2. Enter the following values for the ColumnDefaultValue attribute:
      Property Value
      Name ColumnDefaultValue
      Display Name ColumnDefaultValue
      Description Indicates the default values that the column can contain.
      Data Type String
      Min Length 0
      Max Length 255
    3. Click OK.
      The Native Metadata Field Definition dialog box appears.
  8. Click Next.
    The Native Metadata Read Capability page appears.
  9. Select Enable Read Capability.
  10. Select the following options:
    • Required in the Lookup section.
    • Filter in the Join and Filter section.
    • Platform as the type of Filter.
    • Sort in the Sort and Select section.
    Implement the initDataAdapter API in the MysqlDataAdapter.java file to add the lookup, filter, and sort logic.
  11. Click Add to configure each attribute.
    The Add Attribute dialog box appears.
    1. Enter the following values for the preSQL attribute:
      Property Value
      Name preSQL
      Display Name Pre-SQL
      Description SQL queries to run before the adapter reads data from the source.
      Data Type String
      Min Length 0
      Max Length 255
      Supports Parameter Partial Parameterization
    2. Enter the following values for the rowLimit attribute:
      Property Value
      Name rowLimit
      Display Name Row Limit
      Data Type Integer
      Min Length 0
      Max Length 10
      Supports Parameter No
      Options Override Partition
    3. Enter the following values for the rowLimit attribute:
      Property Value
      Name postSQL
      Display Name post SQL
      Data Type String
      Min Length 0
      Max Length 255
      Supports Parameter Partial Parameterization
    4. Enter the following values for the rowLimit attribute:
      Property Value
      Name rowOffset
      Display Name Row Offset
      Data Type Integer
      Min Length 0
      Max Length 0
      Supports Parameter Full Parameterization
      Options Override Partition
    5. Click OK.
      The Native Metadata Read Capability dialog box appears.
  12. Click Next.
    The Native Metadata Write Capability page displays.
  13. Select Enable Write Capability.
  14. Click Add.
    The Add Attribute dialog box appears.
    1. Enter the following values for the truncateTargetTable attribute:
      Property Value
      Name truncateTargetTable
      Display Name Truncate Target Table
      Description Indicates whether to truncate the target table before starting the write operation.
      Data Type Boolean
      Default Value False
    2. Enter the following values for the partitionID attribute
      Property Value
      Name partitionID
      Display Name Partition ID
      Data Type String
      Min Length 0
      Max Length 50
      Supports Parameter No
      Override Partition -Override Partition
  15. Click Next.
    The Native Metadata Partitioning Capability page appears.
  16. To specify partitioning capability for the native metadata object, select the following options:
    1. Select Supports Partitioning Capability for Read to enable the partition capability for the read operation.
    2. Select Dynamic to specify the partitioning method for the read operation.
    3. Select Supports Partitioning Capability for Write to enable the partition capability for the write operation.
    4. Select Dynamic to specify the partitioning method for the write operation.
    Extend the AutoPartitioningMetadataAdapter class to implement the partition logic.
  17. Click Next.
    The Import Dialog Box Settings page appears.
  18. To define the import options that appear in the Developer tool when an adapter consumer creates a data object, select the following options:
    • Select the Allow Multi Select option to allow the adapter user to select multiple importable objects.
    • Select the Display Filter By Name option to display the filter by name option.
    • Select the Show Entity option to show the entity details.
  19. Click Generate Code.
    The Informatica Connector generates source code in the Metadata and Runtime folders of the adapter project.
  20. In the Metadata folder of the adapter project, double-click the MySQLMetadataAdapter.java file to review the source code and update it as required. MySQLMetadataAdapter.java contains methods for importing metadata.
    Provide code for the following methods:
    • populateObjectCatalog()
    • populateObjectDetails()
    For more information about these methods, see the Informatica Connector Toolkit API Reference.


Updated May 15, 2019


Explore Informatica Network