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

Implement safe_cast macro #1

Open
adamtwo opened this issue Feb 24, 2022 · 0 comments
Open

Implement safe_cast macro #1

adamtwo opened this issue Feb 24, 2022 · 0 comments
Labels
enhancement New feature or request

Comments

@adamtwo
Copy link

adamtwo commented Feb 24, 2022

Describe the feature

Currently,dbt-teradata-utils doesn't implement safe_cast macro. As a result, dbt-utils defaults to the standard cast(var as type) syntax. Teradata supports trycast which doesn't error out when the cast cannot be done. dbt-teradata-utils should have an implementation of safe_cast that uses trycast.

Describe alternatives you've considered

Continue with the current non-safe implementation.

Additional context

See https://github.com/dbt-labs/dbt-utils/blob/main/macros/cross_db_utils/safe_cast.sql

Who will this benefit?

safe_cast is useful when we can't be certain about data types and formats.

Are you interested in contributing this feature?

@adamtwo adamtwo added the enhancement New feature or request label Feb 24, 2022
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
Development

No branches or pull requests

1 participant