Skip to content

Commit aa98ed0

Browse files
authored
Update README.md
1 parent 024b8c2 commit aa98ed0

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

README.md

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -141,19 +141,22 @@ For body based queries such as POST/PUT requests, the
141141
([GenericGetQueryCreator](src/main/java/com/getindata/connectors/http/internal/table/lookup/querycreators/GenericGetQueryCreator.java))
142142
is provided as a default query creator. This implementation uses Flink's [json-format](https://nightlies.apache.org/flink/flink-docs-master/docs/connectors/table/formats/json/) to convert RowData object into Json String.
143143

144-
The important thing worth knowing is that `GenericGetQueryCreator` allows for using custom formats that will perform serialization to Json. Thanks to this, users can create their own logic for converting RowData to Json Strings that will match their requirements
145-
and use it in HTTP Lookup connector and SQL queries.
144+
The `GenericGetQueryCreator` allows for using custom formats that will perform serialization to Json. Thanks to this, users can create their own logic for converting RowData to Json Strings suitable for their HTTP endpoints and use this logic as custom format
145+
with HTTP Lookup connector and SQL queries.
146146
To create a custom format user has to implement Flink's `SerializationSchema` and `SerializationFormatFactory` interfaces and register custom format factory along other factories in
147147
`resources/META-INF.services/org.apache.flink.table.factories.Factory` file. This is common Flink mechanism for providing custom implementations for various factories.
148-
In order to use custom format, user has to specify option `'lookup-request.format' = 'customFormatName'`, where `customFormatName` is the identifier of our custom format factory.
148+
149+
In order to use custom format, user has to specify option `'lookup-request.format' = 'customFormatName'`, where `customFormatName` is the identifier of custom format factory.
149150

150151
Additionally, it is possible to pass query format options from table's DDL.
151152
This can be done by using option like so: `'lookup-request.format.customFormatName.customFormatProperty' = 'propertyValue'`, for example
152-
`'lookup-request.format.customFormatName.fail-on-missing-field' = 'true'`. It is important that `customFormatName` part must match `SerializationFormatFactory` identifier used for custom format implementation.
153+
`'lookup-request.format.customFormatName.fail-on-missing-field' = 'true'`.
154+
155+
It is important that `customFormatName` part match `SerializationFormatFactory` identifier used for custom format implementation.
153156
In this case, the `fail-on-missing-field` will be passed to `SerializationFormatFactory::createEncodingFormat(
154157
DynamicTableFactory.Context context, ReadableConfig formatOptions)` method in `ReadableConfig` object.
155158

156-
In configuration with default, 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/)
159+
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/)
157160
can be passed through table DDL. For example `'lookup-request.format.json.fail-on-missing-field' = 'true'`. In this case, format identifier is `json`.
158161

159162
#### Timeouts

0 commit comments

Comments
 (0)