snowplow / dbt-snowplow-unified

A fully incremental model, that transforms raw web & mobile event data generated by the Snowplow JavaScript & mobile trackers into a series of derived tables of varying levels of aggregation.
Other
12 stars 5 forks source link

Add snowflake lake loader support #59

Closed rlh1994 closed 5 months ago

rlh1994 commented 5 months ago

Description

This PR in theory adds the ability to run snowflake on a lake loader external (iceberg) table. Currently it does not work because you can't write structured columns to a regular table, and dbt-snowflake doesn't yet support writing to iceberg. In theory it would work, but short of casting every single field within a context and unstruct to a varchar and back again, I am currently not able to test it.

I've worked around this similar to how we do in web with redshift not having a "* except" feature, by getting all columns from the CTE and then casting them all individually. This feels non-ideal, but at least in my basic testing does seem to allow the models to run at least.

I would suggest:

What type of PR is this? (check all applicable)

Related Tickets & Documents

https://snplow.atlassian.net/browse/PE-6472

Checklist

Added tests?

Added to documentation?

[optional] Are there any post-deployment tasks we need to perform?

[optional] What gif best describes this PR or how it makes you feel?