Source Tool Options
Use the vkconfig script's source tool to create, update, or delete a source. It accepts the following arguments in addition to the Common vkconfig Script Options.
| Option | Description |
|---|---|
--source source_name |
The name for the source to add to, remove from, or edit in the scheduler configuration. You can use any name you like for a new source. Most people use the name of the Kafka topic the scheduler loads its data from. |
--new-source source_name |
Updates the name of an existing source to the name specified by this parameter. Requires: |
--partitions count |
Sets the number of partitions in the source. Default Value: 1 Requires: You must keep this consistent with the number of partitions in the source. Renamed from |
--cluster cluster_name |
Identifies the cluster containing the source that you want to create or edit. You must have already defined this cluster in the scheduler. |
--new-cluster cluster_name |
Changes the cluster this source belongs to. All sources referencing the old cluster source now target this cluster. Requires: |
--enabled TRUE|FALSE |
When TRUE, the source is available for use. |
Examples
The following examples show how you can create or update SourceFeed.
Create the source SourceFeed and assign it to the cluster, StreamCluster1 in the scheduler defined by the myscheduler.conf config file:
$ /opt/vertica/packages/kafka/bin/vkconfig source --create --source SourceFeed \
--cluster StreamCluster1 --partitions 3
--conf myscheduler.conf
Update the existing source SourceFeed to use the existing cluster, StreamCluster2 in the scheduler defined by the myscheduler.conf config file:
$ /opt/vertica/packages/kafka/bin/vkconfig source --update --source SourceFeed \
--new-cluster StreamCluster2
--conf myscheduler.conf