URL: http://GPUDB_IP_ADDRESS:GPUDB_PORT/create/datasink

Creates a data sink, which contains the destination information for a data sink that is external to the database.

Input Parameter Description

Name Type Description
name string Name of the data sink to be created.
destination string Destination for the output data in format 'destination_type://path[:port]'. Supported destination types are 'http', 'https' and 'kafka'.
options map of string to strings

Optional parameters. The default value is an empty map ( {} ).

Supported Parameters (keys) Parameter Description
connection_timeout Timeout in seconds for connecting to this data sink
wait_timeout Timeout in seconds for waiting for a response from this data sink
credential Name of the credential object to be used in this data sink
kafka_topic_name Name of the Kafka topic to publish to if input parameter destination is a Kafka broker
max_batch_size Maximum number of records per notification message. The default value is '1'.
max_message_size Maximum size in bytes of each notification message. The default value is '1000000'.

The desired format of JSON encoded notifications message. If nested, records are returned as an array. Otherwise, only a single record per messages is returned. The default value is flat. The supported values are:

  • flat
  • nested
jdbc_driver_jar_path JDBC driver jar file location
jdbc_driver_class_name Name of the JDBC driver class

Bypass validation of connection to this data sink. The default value is false. The supported values are:

  • true
  • false

Output Parameter Description

The GPUdb server embeds the endpoint response inside a standard response structure which contains status information and the actual response to the query. Here is a description of the various fields of the wrapper:

Name Type Description
status String 'OK' or 'ERROR'
message String Empty if success or an error message
data_type String 'create_datasink_response' or 'none' in case of an error
data String Empty string
data_str JSON or String

This embedded JSON represents the result of the /create/datasink endpoint:

Name Type Description
name string Value of input parameter name.
info map of string to strings Additional information.

Empty string in case of an error.