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

Avoid show table extended command. #231

Merged
merged 4 commits into from Dec 5, 2022

Conversation

ueshin
Copy link
Collaborator

@ueshin ueshin commented Nov 29, 2022

Description

Avoids show table extended command.

This is based on dbt-labs/dbt-spark#433.

  1. Create a table/view list with show tables in {{ relation }} and show views in {{ relation }} commands, or get_tables API when catalog is provided.
  2. Retrieve additional information by describe extended {{ relation }} command.
    1. get_relation with needs_information=True
    2. get_columns_in_relation

Copy link
Collaborator

@andrefurlan-db andrefurlan-db left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good to me. Only thing is later we may want to use the information schema if that makes sense.

@ueshin
Copy link
Collaborator Author

ueshin commented Dec 5, 2022

Thanks! merging.

@ueshin ueshin merged commit 2af2f4f into databricks:main Dec 5, 2022
@ueshin ueshin deleted the avoid_show_table_extended branch December 5, 2022 21:42
ueshin added a commit that referenced this pull request Dec 6, 2022
### Description

Avoids show table extended command.

This is based on dbt-labs/dbt-spark#433.

1. Create a table/view list with `show tables in {{ relation }}` and `show views in {{ relation }}` commands, or `get_tables` API when `catalog` is provided.
2. Retrieve additional information by `describe extended {{ relation }}` command.
    1. `get_relation` with `needs_information=True`
    2. `get_columns_in_relation`
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

Successfully merging this pull request may close these issues.

None yet

2 participants