davidradl commented on code in PR #30: URL: https://github.com/apache/flink-connector-http/pull/30#discussion_r2945804073
########## docs/content/docs/connectors/table/http.md: ########## @@ -73,6 +73,119 @@ The HTTP source connector supports [Lookup Joins](https://nightlies.apache.org/f * [Logging the HTTP content](#logging-the-http-content) * [Restrictions at this time](#restrictions-at-this-time) <!-- TOC --> +## Quick Start + +This guide provides quick examples to get started with the HTTP connector. + +### SQL Example — HTTP Sink + +Use the HTTP Sink connector to write Flink records to an external HTTP endpoint via SQL: + +```sql +CREATE TABLE http_sink ( + id BIGINT, + name STRING, + status STRING +) WITH ( + 'connector' = 'http-sink', + 'url' = 'https://api.example.com/events', + 'format' = 'json', + 'insert-method' = 'POST' +); + +INSERT INTO http_sink SELECT id, name, status FROM source_table; +``` + +Note: Flink SQL uses single quotes for string literals in WITH clause options. + +### SQL Example — HTTP Lookup Source + +Use the HTTP Lookup connector to enrich a stream with data from an external HTTP API: + +```sql +-- Define the HTTP lookup table +CREATE TABLE http_lookup ( + id STRING, + payload STRING +) WITH ( + 'connector' = 'rest-lookup', Review Comment: the connector is 'http' not 'rest-lookup' -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
