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

Support casting primary keys #494

Closed
nehanene15 opened this issue Jun 1, 2022 · 3 comments · Fixed by #521
Closed

Support casting primary keys #494

nehanene15 opened this issue Jun 1, 2022 · 3 comments · Fixed by #521
Assignees
Labels
priority: p0 Highest priority. Critical issue. Will be fixed prior to next release. Release Next release candidate type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.

Comments

@nehanene15
Copy link
Collaborator

There should be support to cast a primary key block in the YAML like so:

primary_keys:
  - cast: date
    field_alias: start_time
    source_column: start_time
    target_column: start_time

This issue is particularly focusing on a Teradata to BQ validaton

@nehanene15 nehanene15 added type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. priority: p0 Highest priority. Critical issue. Will be fixed prior to next release. Release Next release candidate labels Jun 1, 2022
@srikanthgaddam2
Copy link

@nehanene15 We need support for casting as Datetime

@nehanene15
Copy link
Collaborator Author

@nehanene15 We need support for casting as Datetime

What is the original data type of the field you want to cast to DATETIME? What is the query you are expecting on the TD side and on the BQ side?

For example, is it something like this?
Teradata: CAST(timestamp_col AS DATE) compared to
BigQuery: CAST(timestamp_col AS DATETIME)

@srikanthgaddam2
Copy link

The original datatype on teradata and big query is Timestamp with timezone on teradata and Timestamp on Big query

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: p0 Highest priority. Critical issue. Will be fixed prior to next release. Release Next release candidate type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants