The catch_all feature allows you to see the shape of your data before you've applied a transform to it. For example, this a transform with a mapping catchall, followed by three lines of sample data.
The catch_rejects attribute adds an extra filter to a transform. Invalid ingested data is added to a discrete column, while valid data is ingested as expected.
For example, assume you have a table with two columns.
Name
Type
primary_column
DateTime
uint_column
Uint32
An example transform for this would look like the following:
If your ingested data contains fields with invalid values, these will be rejected entirely. The result may be a partial success, and return an error message.
{
"code": 207,
"message": {
"success_count": 2,
"errors": [
"(column {\"name\":\"uint_column\",\"datatype\":{\"type\":\"uint32\",\"source\":{\"from_input_index\":1,\"from_input_fields\":[\"uint_column\"]}},\"position\":1} data -1 (json.Number)): value of unsigned column is negative -1",
"(column {\"name\":\"uint_column\",\"datatype\":{\"type\":\"uint32\",\"source\":{\"from_input_index\":1,\"from_input_fields\":[\"uint_column\"]}},\"position\":1} data -2 (json.Number)): value of unsigned column is negative -2"
]
}
}
You can use catch_rejects to isolate the invalid values and ingest the good ones by adding the attribute to the transform. This must be a string>string map.
Ingest the same data again, and you now have three columns. The rejected_data column shows the invalid data, and the other two columns are populated with good data or null values.