-
Notifications
You must be signed in to change notification settings - Fork 8
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
Support postgresql kafka connector #23
base: master
Are you sure you want to change the base?
Support postgresql kafka connector #23
Conversation
Atiq, Atiq Sayyed seem not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account. You have signed the CLA already but the status is still pending? Let us recheck it. |
Codecov Report
@@ Coverage Diff @@
## master #23 +/- ##
==========================================
+ Coverage 96.15% 96.19% +0.04%
==========================================
Files 7 7
Lines 260 263 +3
Branches 29 32 +3
==========================================
+ Hits 250 253 +3
Misses 10 10
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
apart from the named argument, everything looks good to me.
@@ -12,7 +12,7 @@ import scala.util.{Failure, Success, Try} | |||
|
|||
class JdbcSourceConnector extends SourceConnector { | |||
private val logger = LoggerFactory.getLogger(classOf[JdbcSourceConnector]) | |||
|
|||
Class.forName("org.postgresql.Driver") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The driver should be loaded automatically, is it required to explicitly do this?
case MySQL => connection.prepareStatement(s"CALL $storedProcedureName (@$incrementingVariableName := ?, @$batchSizeVariableName := ?)") | ||
case MsSQL => connection.prepareStatement(s"EXECUTE $storedProcedureName @$incrementingVariableName = ?, @$batchSizeVariableName = ?") | ||
case MySQL => connection.prepareStatement(s"CALL $storedProcedureName (@$incrementingVariableName := ?, @$batchSizeVariableName := ?)") | ||
case PostgreSQL => connection.prepareStatement(s"SELECT * from $storedProcedureName (?, ?)") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we pass arguments by name?
Ref #4