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. Develop a connector for Data Loader
  6. Import a connector
  7. Connection attributes
  8. Type system
  9. Connector metadata
  10. Partitioning capability
  11. Pushdown capability
  12. Mappings in advanced mode
  13. Manual changes to Informatica Connector Toolkit source code
  14. Runtime behavior
  15. Connector example: MySQL_Cloud
  16. Version control integration
  17. Appendix A: Metadata models
  18. Appendix B: ASO model
  19. Appendix C: Connector project migration
  20. Appendix D: Frequently used generic APIs in Informatica Connector Toolkit
  21. 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.

0 COMMENTS

We’d like to hear from you!