Skip to content
This repository has been archived by the owner on Feb 21, 2020. It is now read-only.

Provide columns from get_columns() in same order as defined in table #37

Closed

Conversation

vinceatbluelabs
Copy link

Hi!

I hit this issue while exporting a CREATE TABLE statement using SqlAlchemy's CreateTable class to create a landing space for table whose data I was moving from database to database. CreateTable uses the get_columns() method in the dialect class.

Because the columns weren't returned in the same order as they're defined in the table, the generated CREATE TABLE statement didn't generate a compatible table.

This updates the get_columns() method to use Vertica's ordinal_position column to output in the same order.

(sorry about the unrelated whitespace cleanups; my editor has strong opinions, it appears)

@lemeryfertitta
Copy link
Collaborator

Hi @vinceatbluelabs ! This change looks good, but I am no longer able to do releases for this repository (explanation in this issue).

Feel free to start a fork and a new PyPI upload. I'll be happy to update the README to point to a maintained fork.

@vinceatbluelabs
Copy link
Author

Is that offer still valid, @lemeryfertitta? I'll let you know once we have our fork in place. Would you be up for us publishing to PyPI under the same package name? Our PyPI account is bluelabs if you can give us write access.

@vinceatbluelabs
Copy link
Author

@lemeryfertitta
Copy link
Collaborator

@vinceatbluelabs I don't have access to the PyPI anymore, unfortunately, as I no longer work for Locus Energy. As far as I know, there are no maintainers remaining with the company, so it may be tricky to organize an ownership transfer.

I'd be happy to replace the README with a message directing to the fork once the fork is available on PyPI in some capacity - whether that is through an ownership transfer, or under a new package name.

@vinceatbluelabs
Copy link
Author

@lemeryfertitta Thankfully some helpful folks were answering their email there - we were able to get our account access there and get a new version published: https://pypi.org/project/sqlalchemy-vertica-python/0.5.4/

I have a PR here on our fork to add contact information about the current maintainer to PyPI and give credit to you as author - please do pass along any feedback you might have and I'd be very happy to incorporate it: bluelabsio#6

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants