Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CUP-1584 Stored Procedure support #1410

Draft
wants to merge 1 commit into
base: 10.7.x
Choose a base branch
from

Conversation

pablodc00
Copy link

Problem

The connector does not support reading from Stored Procedures

Solution

Added support for reading from Stored Procedure

Does this solution apply anywhere else?
  • yes
  • no
If yes, where?

Test Strategy

Testing done:
  • Unit tests
  • Integration tests
  • System tests
  • Manual tests

Release Plan

Copy link

cla-assistant bot commented Apr 15, 2024

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

1 similar comment
Copy link

cla-assistant bot commented Apr 15, 2024

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

case STORED_PROCEDURE:
log.trace("Starting in STORED PROCEDURE mode");
partitions.add(Collections.singletonMap(JdbcSourceConnectorConstants.STORED_PROCEDURE,
JdbcSourceConnectorConstants.STORED_PROCEDURE));

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

break; is missed here, maybe that could be the reason of the error "message": "Invalid value storedprocedure for configuration mode: String must be one of: , bulk, timestamp, incrementing, timestamp+incrementing"

@@ -179,6 +186,10 @@ public void start(Map<String, String> properties) {
partitions.add(Collections.singletonMap(JdbcSourceConnectorConstants.QUERY_NAME_KEY,
JdbcSourceConnectorConstants.QUERY_NAME_VALUE));
break;
case STORED_PROCEDURE:

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The upper condition is
if (mode.equals(JdbcSourceTaskConfig.MODE_INCREMENTING) || mode.equals(JdbcSourceTaskConfig.MODE_TIMESTAMP) || mode.equals(JdbcSourceTaskConfig.MODE_TIMESTAMP_INCREMENTING)) {

does it mean that we will not get here in any case?

@anastasiya-yakushina
Copy link

anastasiya-yakushina commented Apr 16, 2024

I guess there is a little confusion in terms of modes. My suggestion is to leave the existing display modes, which are "bulk, timestamp, incrementing and timestamp+incrementing" and add a new querier mode to have "query, table and storedprocedure". In our case bulk with storedprocedure should work fine

@pablodc00 pablodc00 force-pushed the CUP-1584-stored-procedure branch 2 times, most recently from d56f18f to 6f1b8ae Compare April 16, 2024 22:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants