-
Notifications
You must be signed in to change notification settings - Fork 5.4k
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
Teradata connector #12078
Teradata connector #12078
Conversation
Just curious, What's the difference between this connector and the official "Teradata-To-Presto QueryGrid connector", especially the performance side? |
Hi,
Teradata querygrid is a licensed product and it only works with their
supported presto (from starburst). My solution is free and it works with
all flavors of presto out there (open source, aws, starburst or others)
The only challenge is that T2P (teradata to presto) or P2T (presto to
teradata) have access to AMP level processing on Teradata side and so
certain queries may run faster. In my experience, if you rewrite the query,
it runs as fast as p2t.
Hope it helps
On Tue, Dec 18, 2018 at 2:30 AM lai-aa ***@***.***> wrote:
Just curious, What's the difference between this connector and the
official "Teradata-To-Presto QueryGrid connector", especially the
performance side?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#12078 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AQhEuDD5p_2nTr_1JImrCuK3Yo3ZcpA9ks5u6JmsgaJpZM4ZUKr2>
.
--
|
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.
Unit tests are needed.
@@ -0,0 +1,42 @@ | |||
# Presto Teradata Plugin | |||
|
|||
This is a plugin for Presto that allow you to use Teradata Jdbc connection to connect to Teradata database. |
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.
... allows you ...
<parent> | ||
<groupId>com.facebook.presto</groupId> | ||
<artifactId>presto-root</artifactId> | ||
<version>0.215-SNAPSHOT</version> |
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.
Update the snapshot
@@ -0,0 +1,83 @@ | |||
<?xml version="1.0"?> |
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 indentation of this file doesn't look right; please 4 instead of 8.
extends BaseJdbcClient | ||
{ | ||
static final String TERADATA_DRIVER_NAME = "com.teradata.jdbc.TeraDriver"; | ||
private boolean usePreparedStatement; |
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.
space after this statement.
public TeradataClient(JdbcConnectorId connectorId, BaseJdbcConfig config, TeradataConfig teradataConfig) | ||
throws SQLException | ||
{ | ||
/* |
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.
Use //
instead of /*
with indentation.
protected SchemaTableName getSchemaTableName(ResultSet resultSet) | ||
throws SQLException | ||
{ | ||
String tableSchema = resultSet.getString("TABLE_SCHEM"); |
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.
What are these TABLE_SCHEM
, TABLE_NAME
, etc?
static final String TERADATA_DRIVER_NAME = "com.teradata.jdbc.TeraDriver"; | ||
private boolean usePreparedStatement; | ||
@Inject | ||
public TeradataClient(JdbcConnectorId connectorId, BaseJdbcConfig config, TeradataConfig teradataConfig) |
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.
If TeradataConfig
is a BaseJdbcConfig
, why we need pass both of them in?
this.defaultRowPreFetch = defaultRowPreFetch; | ||
} | ||
|
||
private String defaultRowPreFetch = DEFAULT_ROW_PRE_FETCH; |
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.
Move this together with other vars.
return defaultRowPreFetch; | ||
} | ||
|
||
@Config("teradata.defaultRowPrefetch") |
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.
we use dashes: default-row-prefetch
return usePreparedStatement; | ||
} | ||
|
||
@Config("teradata.use-preparedstatement") |
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.
prepared-statement
This pull request has been automatically marked as stale because it has not had recent activity. If you'd still like this PR merged, please comment on the task, make sure you've addressed reviewer comments, and rebase on the latest master. Thank you for your contributions! |
Presto Teradata connector
Implements Teradata connector using Teradata JDBC driver. Tested against Teradata 16.20 even though it should work with older versions (16.10, 15.10, 15.0, 14.10) as well.