Important
You are viewing documentation for an older version of Confluent Platform. For the latest, click here.
confluent local load¶
Description¶
Load a bundled connector with a predefined name or a custom connector.
Important
The confluent local commands are intended for a single-node development environment and are not suitable for a production environment. The data that are produced are transient and are intended to be temporary. For production-ready workflows, see Install and Upgrade Confluent Platform.
confluent local load [<connector-name> -- [-d <connector-config-file>]] --path <path-to-confluent>
Caution
You must include a double dash (--
) between the topic name and your flag. For more information,
see this post.
Flags¶
Tip
You must either specify the path for each Confluent CLI confluent local
command invocation, export the
path as an environment variable for each terminal session, or set the path to your Confluent Platform installation in your
shell profile. For example:
cat ~/.bash_profile
export CONFLUENT_HOME=<path-to-confluent>
export PATH="${CONFLUENT_HOME}/bin:$PATH"
Name, shorthand | Description |
---|---|
-d <connector-config-file> |
Specify a custom connector. |
--path <path-to-confluent> |
Path to Confluent Platform install directory. |
-h, --help |
Print command information. |
Positional arguments¶
Name, shorthand | Default | Description |
---|---|---|
<connector-config-file> |
The configuration file. The file must be formatted as a valid JSON or Java properties file and must contain a correct configuration for a connector whose name matches the one specified in the command-line. | |
<connector-name> |
The connector name. If only the connector name is specified, the connector configuration is printed. |
Examples¶
Load a predefined connector:
confluent local load s3-sink
Your output should resemble:
{
"name": "s3-sink",
"config": {
"connector.class": "io.confluent.connect.s3.S3SinkConnector",
"tasks.max": "1",
"topics": "s3_topic",
"s3.region": "us-west-2",
"s3.bucket.name": "confluent-kafka-connect-s3-testing",
"s3.part.size": "5242880",
"flush.size": "3",
"storage.class": "io.confluent.connect.s3.storage.S3Storage",
"format.class": "io.confluent.connect.s3.format.avro.AvroFormat",
"schema.generator.class": "io.confluent.connect.storage.hive.schema.DefaultSchemaGenerator",
"partitioner.class": "io.confluent.connect.storage.partitioner.DefaultPartitioner",
"schema.compatibility": "NONE",
"name": "s3-sink"
},
"tasks": [],
"type": null
}
Tip
You can view all available connectors with the confluent local list command. For more information, see the connectors documentation.