I’m trying to write a unit test that has an array as an expected value.
unit_tests:
- name: my_unit_test
model: my_model
given:
- input: ref('my_source')
rows:
- {id: '1', data: '{"array": [{"prop1": "some value", "prop2": "another value"}, {"prop1": "value", "prop2": "value 2"}]}'}
expect:
rows:
- {id: '1', array: [{"prop1": "some value", "prop2": "another value"}, {"prop1": "value", "prop2": "value 2"}] }
This is giving me a syntax error because according to the documentation here Platform-specific data types | dbt Developer Hub, “Currently, the array is not supported.”
I tried enclosing the array with quotes but that also gave an error.
Is there any known workaround for this issue?