A source partition describes the general location from which a connector obtains data. In Kafka Connect, it is represented as a Map and supplied to the SourceRecord constructor alongside a source offset. section 5.6.1
Use the source partition to identify the source location, and the source offset to identify progress within that location:
- Identify a database table, file, or API URL as the source partition. section 5.6.1
- Record the individual record’s position in the retrieved result as the source offset. section 5.6.1
- Pass both Maps when constructing each SourceRecord; the record may carry the generated schema into Kafka. section 5.6.1
Ticker API connector
A source task polls a ticker API, flattens its JSON results, and creates one SourceRecord per entry. It uses the API URL as the source partition and the entry’s position in the result as the source offset. section 5.6.1
