Skip to content

Dialect methods implementation#9

Merged
sandan merged 5 commits intoTeradata:masterfrom
mrbungie:feature/complete_dialect_iml
Aug 4, 2016
Merged

Dialect methods implementation#9
sandan merged 5 commits intoTeradata:masterfrom
mrbungie:feature/complete_dialect_iml

Conversation

@mrbungie
Copy link
Copy Markdown

@mrbungie mrbungie commented Aug 3, 2016

Implements #2. With this the dialect has enough functionality to be used with Airbnb's Caravel.

# U for Unique
res = connection.execute(stmt, schema=schema, table=table_name, indextype='U').fetchall()

def grouper(fk_row):
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

grouper never gets used in get_unique_constraints

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Fixed

'name': fk_row.IndexName,
}

unique_constraints = list()
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Ideally we'd like to push as much of the SQL computation to the database so processing is kept simple. I presume that is what your TODO comments are referring to in get_foreign_keys and get_indexes.

This is a good implementation for now. Thanks!

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Yes that's the reason of those TODOs.

Glad you appreciated it! I will continue pushing PRs as long as I find something I can add/fix/improve.

@sandan sandan merged commit 261c41f into Teradata:master Aug 4, 2016
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