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

SNOW-1491104: Inspector get_columns can return columns from other tables. #507

Open
suhas-dc opened this issue Jun 19, 2024 · 1 comment
Labels
bug Something isn't working status-triage_done Initial triage done, will be further handled by the driver team

Comments

@suhas-dc
Copy link

Please answer these questions before submitting your issue. Thanks!

  1. What version of Python are you using?

    Python 3.11.6

  2. What operating system and processor architecture are you using?

    Linux-6.6.31-linuxkit-x86_64-with-glibc2.36

  3. What are the component versions in the environment (pip freeze)?

asn1crypto==1.5.1
certifi==2024.6.2
cffi==1.16.0
charset-normalizer==3.3.2
cryptography==42.0.8
filelock==3.15.1
idna==3.7
packaging==24.1
platformdirs==4.2.2
pycparser==2.22
PyJWT==2.8.0
pyOpenSSL==24.1.0
pytz==2024.1
requests==2.32.3
snowflake-connector-python==3.11.0
snowflake-sqlalchemy==1.5.3
sortedcontainers==2.4.0
SQLAlchemy==1.4.52
tomlkit==0.12.5
typing_extensions==4.12.2
urllib3==2.2.2
  1. What did you do?

    With two tables whose names only differ in the casing, one all upper case and the other all lower case, for example - SAMPLE_TABLE and sample_table. get_columns('sample_table', ...) will return columns from both the tables.

import sqlalchemy as sa
connect_args={'validate_default_parameters': True}
url = '<snowflake connection string>'
table_name="sample_table"
schema="public"

engine = sa.create_engine(url, connect_args=connect_args)
inspector = inspect(engine)

print([c['name'] for c in inspector.get_columns(table_name, schema=schema)])
  1. What did you expect to see?

    get_columns should only have returned columns from "sample_table" without including columns from "SAMPLE_TABLE".

  2. Can you set logging to DEBUG and collect the logs?

    Unfortunately no, since it would not be easy to sanitize them for the public internet.

@suhas-dc suhas-dc added bug Something isn't working needs triage labels Jun 19, 2024
@github-actions github-actions bot changed the title Inspector get_columns can return columns from other tables. SNOW-1491104: Inspector get_columns can return columns from other tables. Jun 19, 2024
@sfc-gh-dszmolka sfc-gh-dszmolka added status-triage_done Initial triage done, will be further handled by the driver team and removed needs triage labels Jul 22, 2024
@sfc-gh-dszmolka
Copy link

hey - thanks for raising this with us ! i've been playing with this for a little while and indeed can't seem to make it work for now. Clarifying with the team if it should be expected to work today at all, or it's a functionality gap. I'll keep this thread posted should any new information become available.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working status-triage_done Initial triage done, will be further handled by the driver team
Projects
None yet
Development

No branches or pull requests

2 participants