-
Notifications
You must be signed in to change notification settings - Fork 55
Open
Description
We are looking to ignore parse error in the json format, so we can ignore json response parse errors. There does not seem to be a way to define this.
The README says:
Additionally, it is possible to pass query format options from table's DDL. This can be done by using option like so: 'lookup-request.format.customFormatName.customFormatProperty' = 'propertyValue', for example 'lookup-request.format.customFormatName.fail-on-missing-field' = 'true'.
It is important that customFormatName part match SerializationFormatFactory identifier used for custom format implementation. In this case, the fail-on-missing-field will be passed to SerializationFormatFactory::createEncodingFormat( DynamicTableFactory.Context context, ReadableConfig formatOptions) method in ReadableConfig object.
With default configuration, Flink-Json format is used for GenericGetQueryCreator, all options defined in [json-format](https://nightlies.apache.org/flink/flink-docs-master/docs/connectors/table/formats/json/) can be passed through table DDL. For example 'lookup-request.format.json.fail-on-missing-field' = 'true'. In this case, format identifier is json.
I see unit tests indicating that this is valid:
+ "'format' = 'json',"
+ "'lookup-request.format' = 'json',"
+ "'lookup-request.format.json.fail-on-missing-field' = 'true',"
Unfortunately this does not work. In the flink tests I see
+ "'value.format'='test-format'\n"
+ "'value.test-format.delimiter'='|'\n"
+ "'value.test-format.fail-on-missing'='true'");
what the problem is, is that the validation logic wants
'lookup-request.format.json.ignore-parse-errors' = 'true',
but what actually works is 'lookup-request.json.ignore-parse-errors' = 'true',
Investigating whether we can change the validation to allow through the option without the word format in the prefix and amend the README to remove the word format from the key of format options like ignore-parse-errors
Metadata
Metadata
Assignees
Labels
No labels