We're updating the issue view to help you get more done. 

Unify Database source and Teradata source

Description

Currently, we have a dedicated TeradataSource that is used because some databases don't support the LIMIT clause (which is not SQL Standard anyway) that the default DBInputFormat uses. The TeradataSource is not restricted to Teradata and can be used for all DBs including both - those that support the LIMIT clause that those that don't.

We should either:

  1. Keep both DatabaseSource and TeradataSource, but rename TeradataSource to DataDrivenDatabaseSource; or

  2. Do away completely with DatabaseSource, and just use the current TeradataSource as the DatabaseSource.

We may prefer 1. either for backward compatibility or because the existing DatabaseSource may be simpler to configure. But in either case, we should make sure that there's no code duplication.

Release Notes

None

Activity

Show:
NitinM
March 21, 2016, 6:41 AM
Edited

We still need to merge changes from PR into DBSource : https://github.com/caskdata/hydrator-plugins/pull/172. How do you think we should go about with this.

Shankar Selvam
March 21, 2016, 8:12 PM

DBSource should support Teradata source and it shouldn't be like teradata source replaces dbsource. have commented on the PR#174 as well. we can merge #172 after review, after the current issue () is resolved, if there is a change in "query" format, i can send an update for the plugin endpoints. however i don't think #172 should be blocked due to this change.

Andreas Neumann
March 22, 2016, 12:28 AM

Shouldn't a single plugin support both types of queries? Limit and bound?

NitinM
March 22, 2016, 6:06 AM

We don't need both as it makes no sense. So, we should go with most generic implementation which is TeradataSource.

...DBSource should support Teradata source and it shouldn't be like teradata source replaces dbsource...

Doesn't make sense to me at all. If we have a better implementation why shouldn't it be used for all. Determining if DB supports LIMIT is not possible, so implementing a generic version is the right approach.

NitinM
March 24, 2016, 1:28 AM

PR merged!

Assignee

NitinM

Reporter

Bhooshan Mogal

Labels

None

Docs Impact

None

UX Impact

None

Components

Fix versions

Affects versions

Priority

Major
Configure