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

Creates a new load spec, 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 predicate for more information about using wildcards.

--update

Updates an existing Set Snippet Variable Value in Topic. Cannot be used with --create, --delete, or --read.

--delete

Deletes a Set Snippet Variable Value in Topic. Cannot be used with --create, --read, or --update.

--target-table table
The name of a Vertica table receive data from the scheduler. 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 Vertica schema associated with this schema to a new, already created schema.

Requires:--update option.

--new-target-table schema_name
Changes the Vertica target table associated with this schema to a new, already created 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"}