> ## Documentation Index
> Fetch the complete documentation index at: https://docs.kinetica.com/llms.txt
> Use this file to discover all available pages before exploring further.

# /create/datasink

```
URL: http://<db.host>:<db.port>/create/datasink
```

Creates a [data sink](../../concepts/data_sinks/), which contains the
destination information for a data sink that is external to the database.

## Input Parameter Description

<ParamField body="name" type="string">
  Name of the data sink to be created.
</ParamField>

<ParamField body="destination" type="string">
  Destination for the output data in format 'storage\_provider\_type://path\[:port]'.

  Supported storage provider types are 'azure', 'gcs', 'hdfs', 'http', 'https', 'jdbc', 'kafka', and 's3'.
</ParamField>

<ParamField body="options" type="map of string to strings">
  Optional parameters.

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

  <Expandable title="options">
    <ParamField body="connection_timeout">
      Timeout in seconds for connecting to this data sink.
    </ParamField>

    <ParamField body="wait_timeout">
      Timeout in seconds for waiting for a response from this data sink.
    </ParamField>

    <ParamField body="credential">
      Name of the [credential](../../concepts/credentials/) object to be used in this data sink.
    </ParamField>

    <ParamField body="s3_bucket_name">
      Name of the Amazon S3 bucket to use as the data sink.
    </ParamField>

    <ParamField body="s3_region">
      Name of the Amazon S3 region where the given bucket is located.
    </ParamField>

    <ParamField body="s3_verify_ssl">
      Whether to verify SSL connections.

      The default value is `true`.

      * **true**: Connect with SSL verification.
      * **false**: Connect without verifying the SSL connection; for testing purposes, bypassing TLS errors, self-signed certificates, etc.
    </ParamField>

    <ParamField body="s3_use_virtual_addressing">
      Whether to use virtual addressing when referencing the Amazon S3 sink.

      The default value is `true`.

      * **true**: The requests URI should be specified in virtual-hosted-style format where the bucket name is part of the domain name in the URL.
      * **false**: Use path-style URI for requests.
    </ParamField>

    <ParamField body="s3_aws_role_arn">
      Amazon IAM Role ARN which has required S3 permissions that can be assumed for the given S3 IAM user.
    </ParamField>

    <ParamField body="s3_encryption_customer_algorithm">
      Customer encryption algorithm used encrypting data.
    </ParamField>

    <ParamField body="s3_encryption_customer_key">
      Customer encryption key to encrypt or decrypt data.
    </ParamField>

    <ParamField body="s3_encryption_type">
      Server side encryption type.
    </ParamField>

    <ParamField body="s3_kms_key_id">
      KMS key.
    </ParamField>

    <ParamField body="hdfs_kerberos_keytab">
      Kerberos keytab file location for the given HDFS user.  This may be a KIFS file.
    </ParamField>

    <ParamField body="hdfs_delegation_token">
      Delegation token for the given HDFS user.
    </ParamField>

    <ParamField body="hdfs_use_kerberos">
      Use kerberos authentication for the given HDFS cluster.

      The default value is `false`.

      The supported values are:

      * true
      * false
    </ParamField>

    <ParamField body="azure_storage_account_name">
      Name of the Azure storage account to use as the data sink, this is valid only if tenant\_id is specified.
    </ParamField>

    <ParamField body="azure_container_name">
      Name of the Azure storage container to use as the data sink.
    </ParamField>

    <ParamField body="azure_tenant_id">
      Active Directory tenant ID (or directory ID).
    </ParamField>

    <ParamField body="azure_sas_token">
      Shared access signature token for Azure storage account to use as the data sink.
    </ParamField>

    <ParamField body="azure_oauth_token">
      Oauth token to access given storage container.
    </ParamField>

    <ParamField body="azure_use_virtual_addressing">
      Whether to use virtual addressing when referencing the Azure source.

      The default value is `true`.

      * **true**: The requests URI should be specified in virtual-hosted-style format where the bucket name is part of the domain name in the URL.
      * **false**: Use path-style URI for requests.
    </ParamField>

    <ParamField body="gcs_bucket_name">
      Name of the Google Cloud Storage bucket to use as the data sink.
    </ParamField>

    <ParamField body="gcs_project_id">
      Name of the Google Cloud project to use as the data sink.
    </ParamField>

    <ParamField body="gcs_service_account_keys">
      Google Cloud service account keys to use for authenticating the data sink.
    </ParamField>

    <ParamField body="jdbc_driver_jar_path">
      JDBC driver jar file location.
    </ParamField>

    <ParamField body="jdbc_driver_class_name">
      Name of the JDBC driver class.
    </ParamField>

    <ParamField body="kafka_topic_name">
      Name of the Kafka topic to publish to if input parameter *destination* is a Kafka broker.
    </ParamField>

    <ParamField body="max_batch_size">
      Maximum number of records per notification message.

      The default value is `1`.
    </ParamField>

    <ParamField body="max_message_size">
      Maximum size in bytes of each notification message.

      The default value is `1000000`.
    </ParamField>

    <ParamField body="json_format">
      The desired format of JSON encoded notifications message.

      The default value is `flat`.

      * **flat**: A single record is returned per message.
      * **nested**: Records are returned as an array per message.
    </ParamField>

    <ParamField body="use_managed_credentials">
      When no credentials are supplied, we use anonymous access by default.  If this is set, we will use cloud provider user settings.

      The default value is `false`.

      The supported values are:

      * true
      * false
    </ParamField>

    <ParamField body="use_https">
      Use HTTPS to connect to datasink if true, otherwise use HTTP.

      The default value is `true`.

      The supported values are:

      * true
      * false
    </ParamField>

    <ParamField body="skip_validation">
      Bypass validation of connection to this data sink.

      The default value is `false`.

      The supported values are:

      * true
      * false
    </ParamField>
  </Expandable>
</ParamField>

## Output Parameter Description

The Kinetica 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:

<ResponseField name="status" type="String">
  'OK' or 'ERROR'
</ResponseField>

<ResponseField name="message" type="String">
  Empty if success or an error message
</ResponseField>

<ResponseField name="data_type" type="String">
  'create\_datasink\_response' or 'none' in case of an error
</ResponseField>

<ResponseField name="data" type="String">
  Empty string
</ResponseField>

<ResponseField name="data_str" type="JSON or String">
  This embedded JSON represents the result of the /create/datasink endpoint:

  <Expandable title="data_str">
    <ResponseField name="name" type="string">
      Value of input parameter *name*.
    </ResponseField>

    <ResponseField name="info" type="map of string to strings">
      Additional information.
    </ResponseField>
  </Expandable>

  Empty string in case of an error.
</ResponseField>
