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

[Bug] Complex types are truncated during describe extended #1107

Open
2 tasks done
mikealfare opened this issue Sep 17, 2024 · 4 comments
Open
2 tasks done

[Bug] Complex types are truncated during describe extended #1107

mikealfare opened this issue Sep 17, 2024 · 4 comments
Labels
bug Something isn't working tech_debt

Comments

@mikealfare
Copy link
Contributor

Is this a new bug in dbt-spark?

  • I believe this is a new bug in dbt-spark
  • I have searched the existing issues, and I could not find an existing issue for this bug

Current Behavior

Complex types are truncated when running this macro:

{% macro spark__get_columns_in_relation_raw(relation) -%}
{% call statement('get_columns_in_relation_raw', fetch_result=True) %}
describe extended {{ relation }}
{% endcall %}
{% do return(load_result('get_columns_in_relation_raw').table) %}
{% endmacro %}

This happens due to DESCRIBE EXTENDED, which truncates the results before returning them.

Expected Behavior

The types should be complete.

Steps To Reproduce

  • create a model (e.g. my_model) with a sufficiently complex type
  • run DESCRIBE EXTENDED my_model
  • look at the resulting type for the complex column

Relevant log output

No response

Environment

- OS:
- Python:
- dbt-core:
- dbt-spark:

Additional Context

No response

@mikealfare mikealfare added bug Something isn't working triage labels Sep 17, 2024
@amychen1776
Copy link
Contributor

@benc-db This is the issue we were talking about yesterday about the issues with the Databricks Metadata API. Is this just a Databricks specific issue?

@benc-db
Copy link

benc-db commented Sep 19, 2024

It is Databricks specific, but may affect dbt-spark as well.

@benc-db
Copy link

benc-db commented Sep 19, 2024

lol, I didn't see where I was commenting. So, I do not know the extent to which describe extended is standard Spark vs Databricks, which is probably what you're asking here.

@amychen1776
Copy link
Contributor

@benc-db yup :)

@mikealfare did you find this bug running on Databricks then?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working tech_debt
Projects
None yet
Development

No branches or pull requests

3 participants