Are the properties for a schema supposed to look l...
# singer-target-development
f
Are the properties for a schema supposed to look like this:
Copy code
"tags": {
                                "items": {
                                    "type": ["string"]
                                },
                                "description": "Tags",
                                "type": "array"
                            },
                            "hits": {
                                "description": "Number of hits",
                                "type": ["number"]
                            },
That seems very odd. If the type is a normal type, and not an object or an array, the name of the type is inside of a list?
a
The array notations in JSON Schema means that the type can be any of the included types. It's a shorthand for
anyOf
, as I understand it.
Being inside a list of only one type is the same as having type equal to the string, but is more ammenable to code which might want to append to the list.
I see this pattern broadly used for adding "null" to the type list, explicitly declaring that the field could contain a null value.
f
OK. I have target-athena working with partitions, but I'm trying to fix the "force everything to a STRING" at the same time...