-
Notifications
You must be signed in to change notification settings - Fork 299
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
Add port number as a DBS_PORT parameter in Teradata JDBC Connection String #2452
base: master
Are you sure you want to change the base?
Conversation
4761d30
to
1979de0
Compare
1979de0
to
c3d9cb3
Compare
e3ddbfd
to
910f5c5
Compare
910f5c5
to
5d62c49
Compare
5d62c49
to
ebf8eb4
Compare
{ | ||
HashMap<String, String> environment = new HashMap<>(); | ||
// Default port for teradata is 1025 | ||
String port = connectionProperties.getOrDefault(PORT, "1025"); |
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.
Please move this to the Teradata constants; not here.
|
||
// Construct the JDBC connection string and include the port as a DBS_PORT parameter | ||
String connectionString = getConnectionStringPrefix(connectionProperties) + connectionProperties.get(HOST) | ||
+ getDatabase(connectionProperties) + ",DBS_PORT=" + port + getJdbcParameters(connectionProperties); |
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.
this is assuming a new change; will this break existing customers? what exactly promoted this change? I want to make sure this is backward compatible; i.e.; existing customers who are upgrading won't have their environments broken.
|
||
public class TeradataEnvironmentProperties extends JdbcEnvironmentProperties | ||
{ | ||
@Override | ||
public Map<String, String> connectionPropertiesToEnvironment(Map<String, String> connectionProperties) |
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.
let's add a unit test once questions below are answered.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #2452 +/- ##
============================================
+ Coverage 61.09% 61.15% +0.06%
- Complexity 3738 3751 +13
============================================
Files 576 577 +1
Lines 21348 21441 +93
Branches 2654 2661 +7
============================================
+ Hits 13043 13113 +70
- Misses 7037 7057 +20
- Partials 1268 1271 +3 ☔ View full report in Codecov by Sentry. |
Issue #, if available:
The Teradata JDBC connection string requires a specific format to include the port number.
Example URL:
jdbc:teradata://host/TMODE=ANSI,CHARSET=UTF8,DATABASE=TEST,DBS_PORT=1025,user=dummy,password=dummy
Previously, the port was included in the connection string as host:port, which was not compatible with the Teradata JDBC driver
Description of changes:
Overridden the connectionPropertiesToEnvironment method to include the port number as a DBS_PORT parameter.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.