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

Lowercased include_tables in SQLDatabase.from_uri #2542

Closed
huineng opened this issue Apr 7, 2023 · 1 comment
Closed

Lowercased include_tables in SQLDatabase.from_uri #2542

huineng opened this issue Apr 7, 2023 · 1 comment

Comments

@huineng
Copy link

huineng commented Apr 7, 2023

spent an hour to figure this out (great work by the way)

connection to db2 via alchemy

db = SQLDatabase.from_uri(
    db2_connection_string,
    schema='MYSCHEMA',
    include_tables=['MY_TABLE_NAME'], # including only one table for illustration
	sample_rows_in_table_info=3
)

this did not work .. until i lowercased it and then it worked

db = SQLDatabase.from_uri(
    db2_connection_string,
    schema='myschema',
    include_tables=['my_table_name], # including only one table for illustration
	sample_rows_in_table_info=3
)

tables (at least in db2) can be selected either uppercase or lowercase

by the way .. All fields are lowercased .. is this on purpose ?

thanks

@huineng
Copy link
Author

huineng commented Apr 7, 2023

i'm going to close this as it might be related to ibm_db_sa and alchemy
ibmdb/python-ibmdbsa#122

@huineng huineng closed this as completed Apr 7, 2023
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

No branches or pull requests

1 participant