ibmdb / python-ibmdbsa

Automatically exported from code.google.com/p/ibm-db.ibm-db-sa
Apache License 2.0
40 stars 59 forks source link

Missing features in DB2 z/OS support #88

Closed shreyas-shankar closed 3 years ago

shreyas-shankar commented 3 years ago

Hello

I see from issue #86 that there is code in the branch dev_zos_support that supports SQLAlchemy connections to z/OS. Thank you for this feature.

I installed the package from this branch and was trying to run a few tests. When I try to list all the schemas on my z/OS instance, I get an empty array as response. I know for a fact there are multiple schemas on this instance.

from sqlalchemy import create_engine
from sqlalchemy.engine.url import URL
from sqlalchemy import inspect

# uri contains connection string to connect to db2 z/OS
engine = create_engine(uri, case_sensitive=False)
connection = engine.connect()

inspector = inspect(engine)
schemas = inspector.get_schema_names()
print(schemas)

However, when I am able to list tables within a schema without any issue.

from sqlalchemy import create_engine
from sqlalchemy.engine.url import URL
from sqlalchemy import inspect

# uri contains connection string to connect to db2 z/OS
engine = create_engine(uri, case_sensitive=False)
connection = engine.connect()

inspector = inspect(engine)
tables = inspector.get_table_names("my_test_schema")
print(tables)

Is there a reason one call would fail while the other succeeds? Please help with this.

Also, is there a timeline for the release supporting db2 z/OS?

Thanks

amukherjee28 commented 3 years ago

HI,

Thank you for pointing out the issue.

I did see this and will fix it along with the actual release.

We will be releasing the new version in this week itself.

Thanks.

shreyas-shankar commented 3 years ago

@amukherjee28 Has this been released yet?

amukherjee28 commented 3 years ago

Hi @shreyas-shankar

I have release the new version 0.3.6.

Please update to the latest version for ZOS support.

Thanks.

shreyas-shankar commented 3 years ago

Thank you. I will try the new release.