Open
Description
Describe the bug
When I run generate_surrogate_key macro for a boolean column, it fails with below error.
cannot cast type boolean to character varying
Steps to reproduce
Run a model with the macro like below
SELECT col1, {{ dbt_utils.generate_surrogate_key(cols_to_hash) }} as sk
FROM foo;
Expected results
expecting hash value for the list of column values provided regardless of the data type of each column.
Actual results
Fails with below error
cannot cast type boolean to character varying
System information
The contents of your packages.yml
file:
Which database are you using dbt with?
- postgres
- [*] redshift
- bigquery
- snowflake
- other (specify: ____________)
The output of dbt --version
:
Core:
- installed: 1.10.0-b2
- latest: 1.9.4 - Ahead of latest version!
Plugins:
- redshift: 1.9.3 - Up to date!
- postgres: 1.9.0 - Up to date!