fullstorydev / dbt_fullstory

The official FullStory dbt package
Apache License 2.0
2 stars 3 forks source link

add redshift support #21

Closed huttotw closed 8 months ago

huttotw commented 8 months ago

This adds support for Redshift. The main complications were around JSON parsing, casting and array element accessing in tests.

I set the bind mode to false in the integration tests so that we don't drop views by accident. See more about binding here. To my knowledge this only affects Redshift.

I added two new macros: cast - abstracts the casting logic to simplify some other macros, makes it easy to cast booleans in Redshift since Redshift cannot natively cast a string like "true" to a boolean like the other warehouses. get_array_element - we are required to use a function to access elements in a Redshift array, because of this we needed to create a macro that can switch between the two indexing methods based on the target type.

I also modified the json_value macro to be use Redshift JSON functions with the target is redshift.

I have testing this locally against a running Redshift cluster, but will need to setup the integration tests for Redshift once our testing infrastructure is available.

wiz-inc-e194d921e3-fullstorydev[bot] commented 8 months ago

Wiz Scan Summary

IaC Misconfigurations 0C 0H 0M 0L 0I
Vulnerabilities 0C 0H 0M 0L 0I
Sensitive Data 0C 0H 0M 0L 0I
Total 0C 0H 0M 0L 0I
Secrets 0🔑