https://linen.dev logo
#singer-tap-development
Title
# singer-tap-development
j

jazzy

09/29/2021, 12:03 PM
Hi all, I have an issue where a value returned from a stream can either be an array or a string. Can't work out the correct syntax. I thought it would be a union. Has anyone else come across this?
Copy code
th.Property(
            "meta_data",
                th.ArrayType(th.ObjectType(
                    th.Property("id", th.NumberType),
                    th.Property("key", th.StringType),
                    th.Property("value", Union[th.StringType, th.ArrayType])
                ))
        ),