Hey we’re running into an issue where we have a st...
# singer-tap-development
h
Hey we’re running into an issue where we have a stream with a field that returns a
list
if the platform (Prestashop) is being used in multi-language mode, but a
string
if used in one language. What is recommended way to setup the schema to handle this? cc: @aaronsteers
v
"type": ["array", "string"] ?
h
@visch Thanks, will try it
@visch Do you happen to know how to write this using the Singer SDK typing helper? Or is it better to just write the schemas as JSON and use that instead
v
https://gitlab.com/meltano/sdk/-/blob/main/singer_sdk/typing.py#L298 looks like it'd work if you want. I just write straight json normally but I get wanting* to use that class
h
I got it:
Copy code
th.CustomType({"type": ["array", "string"]})
a
Just seeing this, but yep - CustomType is the way to go!