Table of Contents

  1. Preface
  2. Introduction to the Informatica Connector Toolkit
  3. Installing and Upgrading the Informatica Connector Toolkit
  4. Building an Adapter
  5. Connection Attributes
  6. Type System
  7. Metadata Objects
  8. Partitioning Capability
  9. Run-time Behavior
  10. Adapter Example: Instagram
  11. Adapter Example: MySQL
  12. Adapter Example: YouTube
  13. Metadata Models
  14. ASO Model
  15. Adapter Project Migration
  16. Frequently Asked Questions

Informatica Connector Toolkit Developer Guide

Informatica Connector Toolkit Developer Guide

Defining the Adapter Metadata for Record Pattern

Defining the Adapter Metadata for Record Pattern

For data sources in which data is stored as records, you can define the native metadata definition for the adapter by using the record pattern type.
  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 properties to enter:
    Property Description
    Name Name for the native metadata.
    Display Name Display name for the native metadata.
    Description Description of the native metadata.
  3. Specify the pattern type as record to create a native metadata object based on the record structure of the data source.
  4. To add additional metadata information for records, select Add Record Extension and add the following properties for the attribute:
    Attribute Property
    Description
    Name
    Name of the attribute.
    Display Name Display name for the connection attribute.
    Description
    Description of the connection attribute.
    Data Type Data type of the connection attribute.
    Default Value Default value for the attribute.
    Min Length
    Minimum length for the value of the attribute.
    Max Length
    Maximum length for the value of the attribute.
    The maximum length of any attribute cannot be greater than Integer.MAX_VALUE, which is 2,147,483,647.
    Encrypted Indicates whether you can encrypt the attribute.
    Mandatory
    Indicates whether a connection attribute requires a value.
    If you set the Mandatory property to True but you do not display the attribute on the connection management user interface, you must set a default value for the attribute.
    Hidden
    Indicates whether you can hide the attribute.
    Allowed Values
    List of values allowed for the attribute.
  5. Click Next.
    The Native Metadata Field page appears.
  6. To add additional metadata information for fields, select Add Field Extension and add the attribute properties.
  7. Click Next.
    The Native Metadata Read Capability page appears.
  8. To define read capability for the native metadata object, select Enable Read Capability.
  9. Select whether the adapter supports lookup of data when the adapter reads from the data source.
  10. Select whether the adapter supports join and filter operations when the adapter reads from the data source.
    • To specify operators and expression syntax recognized by the Informatica platform for the join or filter operation, select Platform Expression.
      If you plan to add key range partitioning capability for the adapter, you must select support for filter operation and platform expression.
    • To specify an expression for the join or filter operation that is specific to the data source for which you build the adapter, select Native Expression.
  11. Select whether the adapter supports sort filter to retrieve data from the data source in a specific order.
  12. Select whether the adapter supports select filters when the adapter reads from the data source.
  13. To add read capability attributes, click Add and add the attribute properties.
    You can also define the following parameterization and partitioning support for an attribute:
    • When you specify the read attribute properties, you can define whether you can parameterize the attribute. When you parameterize an attribute, you can assign values for the attribute at run time. For example, you can parameterize the user name and add user names to a configuration file and then run the same mapping to read data of different users.
      You can define the following parameterization support for an attribute:
      Full Parameterization
      The attribute supports parameterization. You can parameterize the value of an attribute completely.
      Partial Parameterization
      The attribute supports partial parameterization. You can parameterize a part of the attribute value.
      No
      The attribute does not support parameterization.
    • You can select Override Partitions to specify if the attribute can be overridden for each partition. Implement the <ConnectorID><NMOName>AutoPartitioningMetadataAdapter file to define the partition support.
    You can also define whether the attribute supports paramertization and if the attribute can be overridden for each partition.
  14. Click Next.
    The Native Metadata Write Capability page appears.
  15. To define write capability for the native metadata object, select Enable Write Capability and add the attribute properties.
    When you specify the write attribute properties, you can define whether you can parameterize the attribute.
    You can define the following parameterization support for an attribute:
    Full Parameterization
    The attribute supports parameterization. You can parameterize the value of an attribute completely.
    Partial Parameterization
    The attribute supports partial parameterization. You can parameterize a part of the attribute value.
    No
    The attribute does not support parameterization.
  16. Select whether the adapter supports upsert operation when the adapter writes to the target.
    When you select Enable Upsert Support, Informatica Connector Toolkit adds the UpdateMode attribute to the write capability attribute list.
    You can specify one of the following values for the UpdateMode attribute during runtime:
    • Update As Update. If you specify the Update As Update value, you must implement the upsert logic so that the adapter updates an existing row while writing to the target.
    • Update Else Insert. If you specify the Update Else Insert value, you must implement the upsert logic so that the adapter updates an existing row if the row exists in the target, else inserts a row while writing to the target.
  17. Click Next.
    The Native Metadata Partitioning Capability page appears.
  18. Select whether the adapter supports partitioning capability for the read operation.
  19. To configure the adapter to fetch partition information from the data source, select the Dynamic partitioning method and implement the partition logic. Extend the AutoPartitioningMetadataAdapter class to implement the partition logic.
  20. To configure the adapter to get partition information from the user, select the Static partitioning method. The user enters the partition information, such as number of partitions or key range.
    • If you want to implement a partition logic based on the partition information that the user specifies, select Fixed. Implement the partition logic in the DataAdapter class. The user can specify the required partition information before the adapter reads from the data source.
    • If the tables in the data source support key range partitioning, select Key Range. The user can specify the partition keys and key range type before the adapter reads from the data source. If you add support for key range partitioning, ensure that the adapter supports filter operation and platform expression. You need not implement the partition logic for key range partitioning because the Informatica Connector Toolkit implements key range partitioning as a filter query.
      Key range partitioning is supported only for Big Data Management.
  21. Select whether the adapter supports partitioning capability for the write operation. By default, the dynamic partitioning method is selected for partition-enabled write operations. Extend the AutoPartitioningMetadataAdapter class to implement the partition logic.
  22. Click Next.
    The Import Dialog Box Settings page appears.
  23. In the Metadata Import Dialog Box Settings section, select the metadata import options that appear in the client tool when an adapter consumer creates a data object and click Save.
  24. If you are developing a connector for the Informatica Cloud, specify whether the adapter supports DDL generation and select the supported modifications to the data source schema in the Metadata Write Settings section.
    You can configure the connector to support the following modifications in the data source schema:
    Create Object
    To add the capability to create objects in the target, select Create Object. To add the capability to drop the existing object and then create a new object, select Drop and Create.
    Alter Object
    To add the capability to alter objects in the target, select Alter Object. To add the capability to create a object if the object to alter does not exist, select Alter Else Create.
    Drop Object
    To add the capability to drop objects in the target, select Drop Object.
  25. Click Generate Code.
    After you define the adapter metadata, the Informatica Connector Toolkit generates the <NMOName>MetadataAdapter.java file in the Metadata folder. Implement the following methods in the <NMOName>MetadataAdapter.java file to import metadata.
    populateObjectCatalog()
    Populates metadata details in the import wizard for the adapter consumer.
    Data preview in the PowerCenter client or Informatica Cloud does not work if the values of the Record.setName and Record.setNativeName methods are different.
    populateObjectDetails()
    Gets metadata from the data source based on the import dialog options settings.
If you configured metadata write settings for the connector, implement the writeObjects method in the <NMOName>MetadataAdapter.java file.
If you regenerate code for the native metadata definition project, the Informatica Connector Toolkit does not regenerate code for the user-exposed source code visible in the Informatica perspective. You have to manually edit the source code and make changes if you add, remove, or change the native metadata attributes.

Updated May 15, 2019


Explore Informatica Network