Target tool options

Use the target tool to configure a Vertica table to receive data from your streaming data application.

Use the target tool to configure a Vertica table to receive data from your streaming data application.

Syntax

vkconfig target {--create | --read | --update | --delete} \ 
                [--target-table table --table_schema schema] \
                [other_options...]
--create
Adds a new target table for the scheduler. Cannot be used with --delete, --read, or --update.
--read
Outputs the targets defined in the scheduler. This output is in JSON format. Cannot be used with --create, --delete, or --update.

By default this option outputs all of the targets defined in the configuration schema. You can limit the output to specific targets by using the --target-schema and --target-table options. The vkconfig script only outputs targets that match the values you set in these options.

You can use LIKE wildcards in these options. See LIKE for more information about using wildcards.

--update
Updates the settings for the targeted table. Use with the --new-target-schema and --new-target-table options. Cannot be used with --create, --delete, or --read.
--delete
Removes the scheduler's association with the target table table. Cannot be used with --create, --read, or --update.
--target-table table
The existing Vertica table for the scheduler to target. This option is required for --create, --update, and --delete.
--target-schema schema
The existing Vertica schema containing the target table. This option is required for --create, --update, and --delete.
--dump

When you use this option along with the --read option, vkconfig outputs the Vertica query it would use to retrieve the data, rather than outputting the data itself. This option is useful if you want to access the data from within Vertica without having to go through vkconfig. This option has no effect if not used with --read.

--new-target-schema schema_name
Changes the schema containing the target table to a another existing schema.

Requires: --update option.

--new-target-table table_name
Changes the Vertica target table associated with this schema to a another existing table.

Requires: --update option.

--validation-type {ERROR|WARN|SKIP}
Controls validation performed on a created or updated target:
  • ERROR - Cancel configuration or creation if vkconfig cannot validate that the table exists. This is the default setting.

  • WARN - Creates or updates the target if validation fails, but display a warning.

  • SKIP - Perform no validation.

Renamed from --skip-validation.

See Common vkconfig script options for options that are available in all of the vkconfig tools.

Examples

This example shows how you can create a target for the scheduler defined in the myscheduler.conf configuration file from public.streamtarget table:

$ /opt/vertica/packages/kafka/bin/vkconfig target --create \
            --target-table streamtarget --conf myscheduler.conf

This example lists all of the targets in the scheduler defined in the weblogs.conf configuration file.

$ vkconfig target --read --conf weblog.conf
{"target_schema":"public", "target_table":"web_hits"}