[BUG] Unit Testing with bigquery adapter "expected" values for timestamp returns null #275
Open
2 tasks done
Labels
feature:unit-tests
Issues related to built-in dbt unit testing functionality
type:bug
Something isn't working as documented
Is this a new bug?
Current Behavior
Given
Bigquery adapter,
source with numeric value for timestamp (values are in timestamp_seconds eg. '1111930985') lets say, column "TS",
model to be generated has Timestamp as datatype for column "TS"
Then
While writing unit test in yaml format, the values for TS are converted as safe_cast('''1111930985''' as TIMESTAMP)
this results in null if quotes are added in Test data,
for int value error generated as cannot convert INT64 to TIMESTAMP
Expected Behavior
For time stamp values with Bigquery
TIMESTAMP_SECONDS should be used for converting numeric data
and use PARSE_TIMESTAMP("%S",'') for String data
Steps To Reproduce
Relevant log output
Environment
Additional Context
No response
The text was updated successfully, but these errors were encountered: