Skip to main content
Creates a new data sink, which contains the location and connection information for a data consumer that is generally external to Kinetica. A data sink serves as an authentication & access mechanism to the remote resource.
CREATE DATA SINK Syntax
A data sink can be referenced in an EXPORT … INTO call (for exporting local table data to a remote system) or a CREATE STREAM call (for streaming local table data to a remote system).
The data sink will be validated upon creation, by default, and will fail to be created if an authorized connection cannot be established.
The following data sink consumers are supported:
  • Azure (Microsoft blob storage)
  • GCS (Google Cloud Storage)
  • HDFS (Apache Hadoop Distributed File System)
  • JDBC (Java Database Connectivity, using a user-supplied driver or one of the drivers on the supported list)
  • Kafka (Apache Kafka streaming feed)
  • Local (Table within the same Kinetica instance)
  • S3 (Amazon S3 Bucket)
  • Webhook (HTTP/HTTPS)
Kafka data sinks will be validated upon creation, by default, and will fail to be created if an authorized connection cannot be established.
For consumer-specific syntax, see Consumer-Specific Syntax. For consumer-specific examples, see Creating Data Sinks.

Parameters

OR REPLACE

Any existing data sink with the same name will be dropped before creating this one

EXTERNAL

Optional keyword for clarity

<schema name>

Name of the schema that will contain the created data sink; if no schema is specified, the data sink will be created in the user’s default schema

<data sink name>

Name of the data sink to create; must adhere to the supported naming criteria

<consumer>

Consumer of the data sinkSupported consumers include:
ConsumerDescription
AZUREMicrosoft Azure blob storage
GCSGoogle Cloud Storage
HDFSApache Hadoop Distributed File System
HTTPUnsecured webhook
HTTPSSecured webhook
JDBCJDBC connection, where LOCATION is the JDBC URL.
LOCATION = ‘jdbc:postgresql://example.com:5432/mydb’
See the supported list for the full list of supported drivers, or specify one with JDBC_DRIVER_JAR_PATH and JDBC_DRIVER_CLASS_NAME.
KAFKAApache Kafka broker
TABLELocal Kinetica table residing in the same database as the data sink:
LOCATION = ‘TABLE://example.employee_backup’
S3Amazon S3 bucket

<target>

Target to connect to via data sink; the following consumers have a default host target, if target is left blank:
ConsumerDefault Host
Azure<storage_account_name>.blob.core.windows.net
GCSstorage.googleapis.com
S3<region>.amazonaws.com
For local Kinetica tables, target is the name of the name of the target table:

<port>

Port to connect to via the data sink, if applicable

WITH OPTIONS

Optional indicator that a comma-delimited list of connection option/value assignments will follow. See Options for the full list of options.

Examples

To create a data sink, kin_dsink, that connects to an Apache Kafka broker:
CREATE DATA SINK Example

Options

Consumer-Specific Syntax

Several authentication schemes across multiple consumers are supported.

Azure

Syntax below, examples here.

GCS

Syntax below, examples here.

HDFS

Syntax below, examples here.
Credential

JDBC

Syntax below, examples here.

Kafka

Syntax below, examples here.

Local (Kinetica)

Syntax below, examples here.
User Auth

S3

Syntax below, examples here.

Webhook

Syntax below, examples here.