Table of Contents

Search

  1. Preface
  2. Introduction to Informatica Data Engineering Integration
  3. Mappings
  4. Mapping Optimization
  5. Sources
  6. Targets
  7. Transformations
  8. Python Transformation
  9. Data Preview
  10. Cluster Workflows
  11. Profiles
  12. Monitoring
  13. Hierarchical Data Processing
  14. Hierarchical Data Processing Configuration
  15. Hierarchical Data Processing with Schema Changes
  16. Intelligent Structure Models
  17. Blockchain
  18. Stateful Computing
  19. Appendix A: Connections Reference
  20. Appendix B: Data Type Reference
  21. Appendix C: Function Reference

PreSQL and PostSQL Queries for JDBC Sources

PreSQL and PostSQL Queries for JDBC Sources

When you create a mapping to access JDBC storage resources, you can use SQL statements to execute SQL commands such as insert, update, and delete on JDBC source tables.
JDBC sources include Hadoop and Databricks sources that use the JDBC connection.
You can create a PreSQL or PostSQL statement that contains one command or a series of commands. To create an SQL statement with more than one command, write the SQL statement with the following delimiter between each command:
{INFA_SQL_SPLITTER}

PreSQL Queries for JDBC Sources

PreSQL is an SQL command that runs against the JDBC source before the mapping reads from the source. You can input the SQL statement in the Read transformation advanced properties.
For example, the following PreSQL statement contains three commands separated by the
{INFA_SQL_SPLITTER}
delimiter:
INSERT INTO 'default'.employee_csv_us_src VALUES ( 201, 'PRE_SQL_AA-INSERT', 1000.021, 'SWE-1', 11,111111.132412341,'2019-11-12','2019-12-01 01:01:01.111')
{INFA_SQL_SPLITTER}
INSERT INTO 'default'.employee_csv_us_src VALUES ( 202, 'PRE_SQL_BB-INSERT', 1000.021, 'SWE-2', 11,111111.132412341,'2019-11-12','2019-12-01 01:01:01.111')
{INFA_SQL_SPLITTER}
INSERT INTO 'default'.employee_csv_us_src VALUES ( 203, 'PRE_SQL_CC-INSERT', 1000.021, 'SWE-3', 11,111111.132412341,'2019-11-12','2019-12-01 01:01:01.111')
{INFA_SQL_SPLITTER}

PostSQL Queries for JDBC Targets

PostSQL is an SQL command that runs against the JDBC target after the mapping writes to the target. You can input the SQL statement in the Write transformation advanced properties.
For example, the following PostSQL statement contains three commands separated by the
{INFA_SQL_SPLITTER}
delimiter:
INSERT INTO 'default'.employee_csv_us_src VALUES ( 204, 'POST_SQL_AA-INSERT', 1000.021, 'SWE-1', 11,111111.132412341,'2019-11-12','2019-12-01 01:01:01.111')
{INFA_SQL_SPLITTER}
INSERT INTO 'default'.employee_csv_us_src VALUES ( 205, 'POST_SQL_BB-INSERT', 1000.021, 'SWE-2', 11,111111.132412341,'2019-11-12','2019-12-01 01:01:01.111')
{INFA_SQL_SPLITTER}
INSERT INTO 'default'.employee_csv_us_src VALUES ( 206, 'POST_SQL_CC-INSERT', 1000.021, 'SWE-3', 11,111111.132412341,'2019-11-12','2019-12-01 01:01:01.111')
{INFA_SQL_SPLITTER}


Updated September 28, 2020