Table of Contents

Search

  1. Preface
  2. Introduction to Informatica Connector Toolkit
  3. Before you begin
  4. Develop a connector for Cloud Data Integration
  5. Import a connector
  6. Connection attributes
  7. Type system
  8. Connector metadata
  9. Partitioning capability
  10. Manual changes to Informatica Connector Toolkit source code
  11. Runtime behavior
  12. Connector example: MySQL_Cloud
  13. Version control integration
  14. Appendix A: Metadata models
  15. Appendix B: ASO model
  16. Appendix C: Connector project migration
  17. Appendix D: Frequently used generic APIs in Informatica Connector Toolkit
  18. Appendix E: Frequently asked questions

Cloud Data Integration Connector Toolkit Developer Guide

Cloud Data Integration Connector Toolkit Developer Guide

Code changes for object path override

Code changes for object path override

When you enable the object path override capability for the connector, you must manually modify the Informatica Connector Toolkit classes and methods to implement the object path override logic.
Add the following code changes to implement the object path override capability for the connector:
  1. Declare the following variable in the RuntimePlugin, RuntimeOperationAdapter, and RuntimeDataAdapter classes:
    private InfaUtils infaUtils;
  2. Initialize the
    infaUtils
    variable in the initPlugin() method of the runtime plugin class.
    The following code snippet shows an example of how to initialize the
    infaUtils
    variable for MySQL_Cloud Connector:
    @Override public int initPlugin(PluginInfo pluginInfo, InfaUtils infaUtils){ this.logger = infaUtils.getLogger(); this.infaUtils=infaUtils; pluginInfo.setPluginDescription(""); pluginInfo.setPluginName("com.infa.adapter.mysql_cloud.libraryInfo.TABLEMYSQL_CLOUDLIBRARYINFO"); pluginInfo.setPluginVersion("1.0.0"); return EStatus.SUCCESS; }
  3. Add the
    infaUtils
    variable as a constructor argument in the RuntimeOperationAdapter and RuntimeDataAdapter classes.
    The following code snippet shows how to add the
    infaUtils
    variable as a constructor argument for MySQL_Cloud Connector:
    public MySQL_CloudTableOperationAdapter(Logger infaLogger,InfaUtils infaUtils ){ this.logger = infaLogger; this.infaUtils=infaUtils; } MySQL_CloudTableDataAdapter(InfaUtils infaUtils){ this.infaUtils=infaUtils; }
  4. Update the constructors for the operation adapter and data adapter objects in the getDataAdapter() and getDataSourceOperationAdapter methods in the RuntimePlugin class.
    The following code snippet shows an example for MySQL_Cloud Connector:
    @Override public DataAdapter getDataAdapter(){ return new MySQL_CloudTableDataAdapter(infaUtils); } @Override public DataSourceOperationAdapter getDataSourceOperationAdapter(){ return new MySQL_CloudTableOperationAdapter(logger,infaUtils); }
  5. Add an import statement in the RuntimeOperationAdapter class to access the
    infaUtils
    variable:
    import com.informatica.sdk.adapter.javasdk.common.InfaUtils;
  6. Access the value of the object path overridden parameters in the initDataSourceOperation() method of the RuntimeOperationAdapter class:
    objectPathWrite =this.infaUtils.getObjectParameters(); //objectPathWrite is a Map with Native name of the object as key and overriden parameter value as the value. //Check if the overriden value is valid.

Back to Top

0 COMMENTS

We’d like to hear from you!