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

[CT-3267] [Feature] Debug log when type_code fails to convert to a data_type #38

Closed
3 tasks done
dbeatty10 opened this issue Oct 25, 2023 · 0 comments · Fixed by #39
Closed
3 tasks done

[CT-3267] [Feature] Debug log when type_code fails to convert to a data_type #38

dbeatty10 opened this issue Oct 25, 2023 · 0 comments · Fixed by #39
Labels
enhancement New feature or request

Comments

@dbeatty10
Copy link
Contributor

dbeatty10 commented Oct 25, 2023

Is this your first time submitting a feature request?

  • I have read the expectations for open source contributors
  • I have searched the existing issues, and I could not find an existing issue for this feature
  • I am requesting a straightforward extension of existing dbt functionality, rather than a Big Idea better suited to a discussion

Describe the feature

Originally posted by @rlh1994

Would it be useful to add a debug level warning when it fails to find a type? In particular if someone is using the column.Data_type from a get_column_schema_from_query call it might not be obvious why something is failing without directly outputting all the column data types?

Originally posted by @dbeatty10

@MichelleArk how would you feel about adding this ☝️ debug output when the type_code isn't found?

Originally posted by @MichelleArk

It may be a little redundant given unknown type_code will appear in the error message either way. So I'd either omit it or write a more informative message like"type_code not found in adapter-provided lookup, defaulting to 'unknown type_code'"

And we may actually need to use fire_event to fire a debuglevel event as opposed not logger.debug

The log level could be a warning rather than debug if we choose.

Describe alternatives you've considered

A couple alternatives to fire_event:

  1. logger.debug
  2. No logging at all

Who will this benefit?

The beneficiaries are similar to dbt-labs/dbt-core#8900. The primary intended audience is folks directly using get_column_schema_from_query (like described in dbt-labs/dbt-core#8877) that might not realize a translation wasn't possible.

Are you interested in contributing this feature?

PR for consideration: dbt-labs/dbt-core#8957

Anything else?

No response

@github-actions github-actions bot changed the title Debug log when type_code fails to convert to a data_type [CT-3267] Debug log when type_code fails to convert to a data_type Oct 25, 2023
@dbeatty10 dbeatty10 added the enhancement New feature or request label Oct 25, 2023
@dbeatty10 dbeatty10 changed the title [CT-3267] Debug log when type_code fails to convert to a data_type [CT-3267] [Feature] Debug log when type_code fails to convert to a data_type Oct 25, 2023
@dbeatty10 dbeatty10 added triage and removed triage labels Oct 25, 2023
@dbeatty10 dbeatty10 transferred this issue from dbt-labs/dbt-core Mar 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
1 participant