Skip to content

Latest commit

 

History

History
61 lines (43 loc) · 2.44 KB

getting-started.md

File metadata and controls

61 lines (43 loc) · 2.44 KB

Getting started

These instructions will get you up and running this connector on your own machine.

Check official Confluent documentation on how to deploy to production cluster.

Prerequisites

Setting up DynamoDB table

  • Login to AWS console UI
  • Create test-dynamodb-connector DynamoDB table (or use any other name you choose)
  • Enable DynamoDB streams with mode new image or new and old image
  • Set TAG's:
    • environment=dev
    • datalake-ingest=
  • Put some random test data into it

Running connector

  • First we need to perform some configuration changes to make connector package available to Kafka Connect:

    • Store downloaded connector jar file to a location in your filesystem. For instance: /opt/connectors/kafka-dynamodb-connector
    • Edit file ${CONFLUENT_PLATFORM_HOME}/etc/schema-registry/connect-avro-distributed.properties and set plugin.path=/opt/connectors
  • Next start confluent and configure actual connector, by executing:

cd ${CONFLUENT_PLATFORM_HOME}/bin

# Starts all the required services including Kafka and Confluent Connect
./confluent start

# Check if "com.trustpilot.connector.dynamodb.DynamoDBSourceConnector" has been loaded
curl localhost:8083/connector-plugins | jq

# Configure connector
curl -X PUT -H "Content-Type: application/json" --data '{"connector.class":"DynamoDBSourceConnector","tasks.max":"100","name":"myDynamodbConnector"}' localhost:8083/connectors/myDynamodbConnector/config

# Check connector status
curl localhost:8083/connectors/myDynamodbConnector/status | jq

# To track plugin progress and debug issues use
./confluent log connect

# After about ~1 minute your data should be available in Kafka topic. Test it out with:
./kafka-avro-console-consumer --topic dynamodb-test-dynamodb-connector --bootstrap-server localhost:9092  --from-beginning  

# Once finished execute 
./confluent destroy

# Note: don't forget to delete DynamoDB tables

more details http://docs.confluent.io/current/connect/quickstart.html