Discussion:
Override JDBC Connector Selection with SQL statement
(too old to reply)
monnewbie3
2018-09-14 12:22:55 UTC
Permalink
Hey Everyone,

I have a JDBC connector setup in iterator mode that feeds into a Delta.
This Connector connects to a table that has a very large dataset, and I would like to limit these results to a specific date range.

So with the above being said, I was wondering if there was a way to override the connectors initial select statement in the prolog so I could limit the results to a specific date range for iteration.

Thanks in advance,
Jason Williams
2018-09-14 17:25:38 UTC
Permalink
Post by monnewbie3
Hey Everyone,
I have a JDBC connector setup in iterator mode that feeds into a Delta.
This Connector connects to a table that has a very large dataset, and I would like to limit these results to a specific date range.
So with the above being said, I was wondering if there was a way to override the connectors initial select statement in the prolog so I could limit the results to a specific date range for iteration.
Thanks in advance,
Have you had a look at the 'SQL Select' field found in the Advanced section of the Connection tab of the Connector. -- https://www.ibm.com/support/knowledgecenter/SSCQGF_7.1.1/com.ibm.IBMDI.doc_7.1.1/referenceguide37.htm#jdbcconnectconf
Eddie Hartman
2018-09-14 19:28:40 UTC
Permalink
Following Jason's advice either use the Parameter Dialog to load a JavaScript snippet into the Select parameter (Advanced section of the Connection tab) which builds ur WHERE clause, or set the jdbdSelect parameter (it's internal name) as desired in the Before Initialization Hook of the Iterator:

ThisConnector.connector.setParam("jdbcSelect", ...)

Note that Delta returns entries missing from subsequent result sets as 'delete' entries.

work.getOperation == "delete"

/Eddie
m***@gmail.com
2018-09-17 13:27:02 UTC
Permalink
Post by Eddie Hartman
ThisConnector.connector.setParam("jdbcSelect", ...)
Note that Delta returns entries missing from subsequent result sets as 'delete' entries.
work.getOperation == "delete"
/Eddie
This is exactly what I needed, provides much flexibility. Thank you very much guys for taking the time to help me out.
Is there any reference documentation I should be aware of for these types of things? Might save me from some future posts.

Thanks again,
-M

Loading...