Closed zaneselvans closed 6 months ago
It is possible to work around this issue by including True
and False
in the trueValues
and falseValues
arrays associated with the boolean fields, but this may mean introducing invalid metadata -- if True
and False
are not in fact valid within the packaged data. (e.g. if the data uses Y
and N
instead).
@akariv do you have a sense of what is going on here?
When uploading a tabular data resource containing boolean fields that have
trueValues
andfalseValues
set but that do not include the valuesTrue
andFalse
respectively, DataHub view generation fails, with errors of the variety:ERROR :Failed to cast row: Field "FIELD_NAME_HERE" can't cast value "True" for type "boolean" with format "default"
It appears that the boolean values in the tabular data package have been converted internally during processing to
True
andFalse
but that those values are being validated against or cast on the basis of thetrueValues
andfalseValues
attributes which are associated with the tabular data resource (which may not includeTrue
orFalse
).How to reproduce
trueValues
andfalseValues
attributes which are consistent with the data file contents, but which do not contain the commonTrue
andFalse
strings.data push
on the tabular data package.Expected behavior
Validation and view generation should proceed normally, if the tabular data resource has appropriately defined
trueValues
andfalseValues
as they pertain to the packaged data, with casting and validation taking place on the basis of the valid values provided.