Skip to content
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

Option to ignore tables #37

Closed
agronholm opened this issue Oct 6, 2016 · 9 comments
Closed

Option to ignore tables #37

agronholm opened this issue Oct 6, 2016 · 9 comments

Comments

@agronholm
Copy link
Owner

Originally reported by: Ishan Khare (Bitbucket: ishan_khare, GitHub: Unknown)


just like the --tables option which specifies the tables to be processed, there should be a --skip-tables option. This will be particularly helpful if i have only a few tables to skip among lots of tables.


@agronholm
Copy link
Owner Author

Couldn't you just remove the unwanted tables from the output?

@emattiza
Copy link

Agreed!

@gmonkman
Copy link

gmonkman commented May 13, 2019

Couldn't you just remove the unwanted tables from the output?

Also posted against #39.

Unsupported data types cause sqlacodegen to fail without producing any output. My example is spatial datatypes (geography and geometry) in MSSQL.

I still want to use SQLAlchemy for almost all my CRUD. I can hand roll my own CRUD for tables with spatial data, but it would be nice to be able to dump the model for most of my DB using sqlacodegen.

@agronholm
Copy link
Owner Author

It would seem that the right solution then is for sqlacodegen to automatically skip tables it cannot handle. Agreed?

@agronholm
Copy link
Owner Author

Also, if you can point me to a library which adds those geography/geometry types to MSSQL, I'd be happy to add a conditional import for that.

@gmonkman
Copy link

gmonkman commented May 15, 2019

It would seem that the right solution then is for sqlacodegen to automatically skip tables it cannot handle. Agreed?

Ta, perfectly great for me. Would need some sort of feedback to user letting them know why the table was skipped.

Also, if you can point me to a library which adds those geography/geometry types to MSSQL, I'd be happy to add a conditional import for that.

The geoalchemy project would appear to add sqlalchemy support for MSSQL spatial datatypes but is not supported for Python >2.6.

The geoalchemy2 project, unfortunately does not support MSSQL, only PostGIS/Postgresql

Not found anyother liibraries to support MSSQL spatial types in SQLAlchemy.

@agronholm
Copy link
Owner Author

Ta, perfectly great for me. Would need some sort of feedback to user letting them know why the table was skipped.

That's what I'll do then, assuming there are no problems with this approach coming from the sqlalchemy reflection process itself (which I do not control).

Not found anyother liibraries to support MSSQL spatial types in SQLAlchemy.

Are those types native to MSSQL? If they are, then it would be best to file a PR against SQLAlchemy itself.

@gmonkman
Copy link

gmonkman commented May 15, 2019

Are those types native to MSSQL? If they are, then it would be best to file a PR against SQLAlchemy itself.
Yes, native types since sql server 2008. Will do. Thanks.

@gmonkman
Copy link

So are they native to MSSQL or not?

Yup, since MSSQL 2008.

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

No branches or pull requests

3 participants