Target Tool Options

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...]
Option Description
--create

Creates a new target. 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 target. Cannot be used with --create, --delete, or --read.

--delete

Deletes a target. 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.

Avoid having columns with primary key restrictions in your target table. The scheduler stops loading data if it encounters a row that has a value which violates this restriction. If you must have a primary key restricted column, try to filter out any redundant values for that column in the streamed data before is it loaded by the scheduler.

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"}