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-981505: SNOW-766845 getColumns with table name doesn't return columns for dynamic tables #1574

Closed
qnkhuat opened this issue Nov 30, 2023 · 1 comment
Assignees
Labels
bug status-triage_done Initial triage done, will be further handled by the driver team

Comments

@qnkhuat
Copy link

qnkhuat commented Nov 30, 2023

Please answer these questions before submitting your issue.
In order to accurately debug the issue this information is required. Thanks!

  1. What version of JDBC driver are you using?
    3.14.3

  2. What operating system and processor architecture are you using?
    Locally? Mac M1 (ARM)

  3. What version of Java are you using?
    11

  4. What did you do?
    I'm using the getColumns method, and when I provide it with catalog, schemaPattern, tablenamePattern and nil for columnNamePattern, where tablenamePattern is the name of a dynamic table.

  5. What did you expect to see?

I expected the method to return me a list of columns for the dynamic table, but instead I got nothing.
Note that I tried calling without the tablenamePattern and the result contains the columns of dynamic table

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

snowlflake.txt

  1. What is your Snowflake account identifier, if any? (Optional)
@qnkhuat qnkhuat added the bug label Nov 30, 2023
@github-actions github-actions bot changed the title getColumns with table name doesn't return columns for dynamic tables SNOW-981505: getColumns with table name doesn't return columns for dynamic tables Nov 30, 2023
@sfc-gh-dszmolka sfc-gh-dszmolka added the status-triage_needed This is a new issue, and initial triage is needed label Apr 27, 2024
@sfc-gh-dszmolka sfc-gh-dszmolka self-assigned this Apr 30, 2024
@sfc-gh-dszmolka sfc-gh-dszmolka added status-triage Issue is under initial triage and removed status-triage_needed This is a new issue, and initial triage is needed labels Apr 30, 2024
@sfc-gh-dszmolka sfc-gh-dszmolka changed the title SNOW-981505: getColumns with table name doesn't return columns for dynamic tables SNOW-981505: SNOW-766845 getColumns with table name doesn't return columns for dynamic tables Apr 30, 2024
@sfc-gh-dszmolka
Copy link
Contributor

sfc-gh-dszmolka commented Apr 30, 2024

thanks for raising this issue and apologies for not getting back faster, we're trying to get better going forward.

So the API call to

getColumns(String catalog=<dbname>, String schemaPattern=<schemaname>, String tableNamePattern=<tablename>, String columnNamePattern=null, boolean extendedSet=false

translates to Snowflake SQL query in JDBC driver

2023-11-30 09:32:27.152 n.s.c.core.SFStatement FINE execute:767 - execute: show /* JDBC:DatabaseMetaData.getColumns() */ columns in table "<dbname>"."<schemaname>"."<tablename>"

and it turned out, we had a gap on the backend where the columns for dynamic tables really weren't properly showed when a SHOW COLUMNS was issued on them. This was fixed with Snowflake 8.1 a couple months back.

Marking this one as closed for now, but if it still doesn't work for you, do comment please and I can reopen.

@sfc-gh-dszmolka sfc-gh-dszmolka added status-triage_done Initial triage done, will be further handled by the driver team and removed status-triage Issue is under initial triage labels Apr 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 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