> ## 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.

# createDatasink

<div className="kinetica-javadoc">
  <ul className="member-list">
    <li>
      <div className="section detail" id="createDatasink(com.gpudb.protocol.CreateDatasinkRequest)">
        <h3>createDatasink</h3>
        <div className="member-signature"><span className="modifiers">public</span> <span className="return-type"><a href="/content/api/java/com/gpudb/protocol/CreateDatasinkResponse" title="class in com.gpudb.protocol">CreateDatasinkResponse</a></span> <span className="element-name">createDatasink</span><wbr /><span className="parameters">(<a href="/content/api/java/com/gpudb/protocol/CreateDatasinkRequest" title="class in com.gpudb.protocol">CreateDatasinkRequest</a> request)</span> throws <span className="exceptions"><a href="/content/api/java/com/gpudb/GPUdbException" title="class in com.gpudb">GPUdbException</a></span></div>
        <div className="block">Creates a <a href="/content/concepts/data_sinks/" target="_top">data sink</a>, which contains the destination information for a data sink that is external to the database.</div>

        <div className="dl notes">
          <div className="dt">Parameters:</div>
          <div className="dd"><code>request</code> - <a href="/content/api/java/com/gpudb/protocol/CreateDatasinkRequest" title="class in com.gpudb.protocol"><code>Request</code></a> object containing the parameters for the operation.</div>
          <div className="dt">Returns:</div>
          <div className="dd"><a href="/content/api/java/com/gpudb/protocol/CreateDatasinkResponse" title="class in com.gpudb.protocol"><code>Response</code></a> object containing the results of the operation.</div>
          <div className="dt">Throws:</div>
          <div className="dd"><code><a href="/content/api/java/com/gpudb/GPUdbException" title="class in com.gpudb">GPUdbException</a></code> - if an error occurs during the operation.</div>
        </div>
      </div>
    </li>

    <li>
      <div className="section detail" id="createDatasink(java.lang.String,java.lang.String,java.util.Map)">
        <h3>createDatasink</h3>
        <div className="member-signature"><span className="modifiers">public</span> <span className="return-type"><a href="/content/api/java/com/gpudb/protocol/CreateDatasinkResponse" title="class in com.gpudb.protocol">CreateDatasinkResponse</a></span> <span className="element-name">createDatasink</span><wbr /><span className="parameters">(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" className="external-link">String</a> name, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" className="external-link">String</a> destination, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/Map.html" title="class or interface in java.util" className="external-link">Map</a>\<<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" className="external-link">String</a>,<wbr /><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" className="external-link">String</a>> options)</span> throws <span className="exceptions"><a href="/content/api/java/com/gpudb/GPUdbException" title="class in com.gpudb">GPUdbException</a></span></div>
        <div className="block">Creates a <a href="/content/concepts/data_sinks/" target="_top">data sink</a>, which contains the destination information for a data sink that is external to the database.</div>

        <div className="dl notes">
          <div className="dt">Parameters:</div>
          <div className="dd"><code>name</code> - Name of the data sink to be created.</div>
          <div className="dd"><code>destination</code> - 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'.</div>

          <div className="dd">
            <code>options</code> - Optional parameters.

            <ul>
              <li><a href="/content/api/java/com/gpudb/protocol/CreateDatasinkRequest.Options#CONNECTION_TIMEOUT"><code>CONNECTION\_TIMEOUT</code></a>: Timeout in seconds for connecting to this data sink. </li>
              <li><a href="/content/api/java/com/gpudb/protocol/CreateDatasinkRequest.Options#WAIT_TIMEOUT"><code>WAIT\_TIMEOUT</code></a>: Timeout in seconds for waiting for a response from this data sink. </li>
              <li><a href="/content/api/java/com/gpudb/protocol/CreateDatasinkRequest.Options#CREDENTIAL"><code>CREDENTIAL</code></a>: Name of the <a href="/content/concepts/credentials/" target="_top">credential</a> object to be used in this data sink. </li>
              <li><a href="/content/api/java/com/gpudb/protocol/CreateDatasinkRequest.Options#S3_BUCKET_NAME"><code>S3\_BUCKET\_NAME</code></a>: Name of the Amazon S3 bucket to use as the data sink. </li>
              <li><a href="/content/api/java/com/gpudb/protocol/CreateDatasinkRequest.Options#S3_REGION"><code>S3\_REGION</code></a>: Name of the Amazon S3 region where the given bucket is located. </li>

              <li>
                <a href="/content/api/java/com/gpudb/protocol/CreateDatasinkRequest.Options#S3_VERIFY_SSL"><code>S3\_VERIFY\_SSL</code></a>: Whether to verify SSL connections. Supported values:

                <ul>
                  <li><a href="/content/api/java/com/gpudb/protocol/CreateDatasinkRequest.Options#TRUE"><code>TRUE</code></a>: Connect with SSL verification. </li>
                  <li><a href="/content/api/java/com/gpudb/protocol/CreateDatasinkRequest.Options#FALSE"><code>FALSE</code></a>: Connect without verifying the SSL connection; for testing purposes, bypassing TLS errors, self-signed certificates, etc. </li>
                </ul>

                The default value is <a href="/content/api/java/com/gpudb/protocol/CreateDatasinkRequest.Options#TRUE"><code>TRUE</code></a>.
              </li>

              <li>
                <a href="/content/api/java/com/gpudb/protocol/CreateDatasinkRequest.Options#S3_USE_VIRTUAL_ADDRESSING"><code>S3\_USE\_VIRTUAL\_ADDRESSING</code></a>: Whether to use virtual addressing when referencing the Amazon S3 sink. Supported values:

                <ul>
                  <li><a href="/content/api/java/com/gpudb/protocol/CreateDatasinkRequest.Options#TRUE"><code>TRUE</code></a>: The requests URI should be specified in virtual-hosted-style format where the bucket name is part of the domain name in the URL. </li>
                  <li><a href="/content/api/java/com/gpudb/protocol/CreateDatasinkRequest.Options#FALSE"><code>FALSE</code></a>: Use path-style URI for requests. </li>
                </ul>

                The default value is <a href="/content/api/java/com/gpudb/protocol/CreateDatasinkRequest.Options#TRUE"><code>TRUE</code></a>.
              </li>

              <li><a href="/content/api/java/com/gpudb/protocol/CreateDatasinkRequest.Options#S3_AWS_ROLE_ARN"><code>S3\_AWS\_ROLE\_ARN</code></a>: Amazon IAM Role ARN which has required S3 permissions that can be assumed for the given S3 IAM user. </li>
              <li><a href="/content/api/java/com/gpudb/protocol/CreateDatasinkRequest.Options#S3_ENCRYPTION_CUSTOMER_ALGORITHM"><code>S3\_ENCRYPTION\_CUSTOMER\_ALGORITHM</code></a>: Customer encryption algorithm used encrypting data. </li>
              <li><a href="/content/api/java/com/gpudb/protocol/CreateDatasinkRequest.Options#S3_ENCRYPTION_CUSTOMER_KEY"><code>S3\_ENCRYPTION\_CUSTOMER\_KEY</code></a>: Customer encryption key to encrypt or decrypt data. </li>
              <li><a href="/content/api/java/com/gpudb/protocol/CreateDatasinkRequest.Options#S3_ENCRYPTION_TYPE"><code>S3\_ENCRYPTION\_TYPE</code></a>: Server side encryption type. </li>
              <li><a href="/content/api/java/com/gpudb/protocol/CreateDatasinkRequest.Options#S3_KMS_KEY_ID"><code>S3\_KMS\_KEY\_ID</code></a>: KMS key. </li>
              <li><a href="/content/api/java/com/gpudb/protocol/CreateDatasinkRequest.Options#HDFS_KERBEROS_KEYTAB"><code>HDFS\_KERBEROS\_KEYTAB</code></a>: Kerberos keytab file location for the given HDFS user. This may be a KIFS file. </li>
              <li><a href="/content/api/java/com/gpudb/protocol/CreateDatasinkRequest.Options#HDFS_DELEGATION_TOKEN"><code>HDFS\_DELEGATION\_TOKEN</code></a>: Delegation token for the given HDFS user. </li>

              <li>
                <a href="/content/api/java/com/gpudb/protocol/CreateDatasinkRequest.Options#HDFS_USE_KERBEROS"><code>HDFS\_USE\_KERBEROS</code></a>: Use kerberos authentication for the given HDFS cluster. Supported values:

                <ul>
                  <li><a href="/content/api/java/com/gpudb/protocol/CreateDatasinkRequest.Options#TRUE"><code>TRUE</code></a> </li>
                  <li><a href="/content/api/java/com/gpudb/protocol/CreateDatasinkRequest.Options#FALSE"><code>FALSE</code></a> </li>
                </ul>

                The default value is <a href="/content/api/java/com/gpudb/protocol/CreateDatasinkRequest.Options#FALSE"><code>FALSE</code></a>.
              </li>

              <li><a href="/content/api/java/com/gpudb/protocol/CreateDatasinkRequest.Options#AZURE_STORAGE_ACCOUNT_NAME"><code>AZURE\_STORAGE\_ACCOUNT\_NAME</code></a>: Name of the Azure storage account to use as the data sink, this is valid only if tenant\_id is specified. </li>
              <li><a href="/content/api/java/com/gpudb/protocol/CreateDatasinkRequest.Options#AZURE_CONTAINER_NAME"><code>AZURE\_CONTAINER\_NAME</code></a>: Name of the Azure storage container to use as the data sink. </li>
              <li><a href="/content/api/java/com/gpudb/protocol/CreateDatasinkRequest.Options#AZURE_TENANT_ID"><code>AZURE\_TENANT\_ID</code></a>: Active Directory tenant ID (or directory ID). </li>
              <li><a href="/content/api/java/com/gpudb/protocol/CreateDatasinkRequest.Options#AZURE_SAS_TOKEN"><code>AZURE\_SAS\_TOKEN</code></a>: Shared access signature token for Azure storage account to use as the data sink. </li>
              <li><a href="/content/api/java/com/gpudb/protocol/CreateDatasinkRequest.Options#AZURE_OAUTH_TOKEN"><code>AZURE\_OAUTH\_TOKEN</code></a>: Oauth token to access given storage container. </li>

              <li>
                <a href="/content/api/java/com/gpudb/protocol/CreateDatasinkRequest.Options#AZURE_USE_VIRTUAL_ADDRESSING"><code>AZURE\_USE\_VIRTUAL\_ADDRESSING</code></a>: Whether to use virtual addressing when referencing the Azure source. Supported values:

                <ul>
                  <li><a href="/content/api/java/com/gpudb/protocol/CreateDatasinkRequest.Options#TRUE"><code>TRUE</code></a>: The requests URI should be specified in virtual-hosted-style format where the bucket name is part of the domain name in the URL. </li>
                  <li><a href="/content/api/java/com/gpudb/protocol/CreateDatasinkRequest.Options#FALSE"><code>FALSE</code></a>: Use path-style URI for requests. </li>
                </ul>

                The default value is <a href="/content/api/java/com/gpudb/protocol/CreateDatasinkRequest.Options#TRUE"><code>TRUE</code></a>.
              </li>

              <li><a href="/content/api/java/com/gpudb/protocol/CreateDatasinkRequest.Options#GCS_BUCKET_NAME"><code>GCS\_BUCKET\_NAME</code></a>: Name of the Google Cloud Storage bucket to use as the data sink. </li>
              <li><a href="/content/api/java/com/gpudb/protocol/CreateDatasinkRequest.Options#GCS_PROJECT_ID"><code>GCS\_PROJECT\_ID</code></a>: Name of the Google Cloud project to use as the data sink. </li>
              <li><a href="/content/api/java/com/gpudb/protocol/CreateDatasinkRequest.Options#GCS_SERVICE_ACCOUNT_KEYS"><code>GCS\_SERVICE\_ACCOUNT\_KEYS</code></a>: Google Cloud service account keys to use for authenticating the data sink. </li>
              <li><a href="/content/api/java/com/gpudb/protocol/CreateDatasinkRequest.Options#JDBC_DRIVER_JAR_PATH"><code>JDBC\_DRIVER\_JAR\_PATH</code></a>: JDBC driver jar file location. </li>
              <li><a href="/content/api/java/com/gpudb/protocol/CreateDatasinkRequest.Options#JDBC_DRIVER_CLASS_NAME"><code>JDBC\_DRIVER\_CLASS\_NAME</code></a>: Name of the JDBC driver class. </li>
              <li><a href="/content/api/java/com/gpudb/protocol/CreateDatasinkRequest.Options#KAFKA_TOPIC_NAME"><code>KAFKA\_TOPIC\_NAME</code></a>: Name of the Kafka topic to publish to if <code>destination</code> is a Kafka broker. </li>
              <li><a href="/content/api/java/com/gpudb/protocol/CreateDatasinkRequest.Options#MAX_BATCH_SIZE"><code>MAX\_BATCH\_SIZE</code></a>: Maximum number of records per notification message. The default value is '1'. </li>
              <li><a href="/content/api/java/com/gpudb/protocol/CreateDatasinkRequest.Options#MAX_MESSAGE_SIZE"><code>MAX\_MESSAGE\_SIZE</code></a>: Maximum size in bytes of each notification message. The default value is '1000000'. </li>

              <li>
                <a href="/content/api/java/com/gpudb/protocol/CreateDatasinkRequest.Options#JSON_FORMAT"><code>JSON\_FORMAT</code></a>: The desired format of JSON encoded notifications message. Supported values:

                <ul>
                  <li><a href="/content/api/java/com/gpudb/protocol/CreateDatasinkRequest.Options#FLAT"><code>FLAT</code></a>: A single record is returned per message. </li>
                  <li><a href="/content/api/java/com/gpudb/protocol/CreateDatasinkRequest.Options#NESTED"><code>NESTED</code></a>: Records are returned as an array per message. </li>
                </ul>

                The default value is <a href="/content/api/java/com/gpudb/protocol/CreateDatasinkRequest.Options#FLAT"><code>FLAT</code></a>.
              </li>

              <li>
                <a href="/content/api/java/com/gpudb/protocol/CreateDatasinkRequest.Options#USE_MANAGED_CREDENTIALS"><code>USE\_MANAGED\_CREDENTIALS</code></a>: When no credentials are supplied, we use anonymous access by default. If this is set, we will use cloud provider user settings. Supported values:

                <ul>
                  <li><a href="/content/api/java/com/gpudb/protocol/CreateDatasinkRequest.Options#TRUE"><code>TRUE</code></a> </li>
                  <li><a href="/content/api/java/com/gpudb/protocol/CreateDatasinkRequest.Options#FALSE"><code>FALSE</code></a> </li>
                </ul>

                The default value is <a href="/content/api/java/com/gpudb/protocol/CreateDatasinkRequest.Options#FALSE"><code>FALSE</code></a>.
              </li>

              <li>
                <a href="/content/api/java/com/gpudb/protocol/CreateDatasinkRequest.Options#USE_HTTPS"><code>USE\_HTTPS</code></a>: Use HTTPS to connect to datasink if true, otherwise use HTTP. Supported values:

                <ul>
                  <li><a href="/content/api/java/com/gpudb/protocol/CreateDatasinkRequest.Options#TRUE"><code>TRUE</code></a> </li>
                  <li><a href="/content/api/java/com/gpudb/protocol/CreateDatasinkRequest.Options#FALSE"><code>FALSE</code></a> </li>
                </ul>

                The default value is <a href="/content/api/java/com/gpudb/protocol/CreateDatasinkRequest.Options#TRUE"><code>TRUE</code></a>.
              </li>

              <li>
                <a href="/content/api/java/com/gpudb/protocol/CreateDatasinkRequest.Options#SKIP_VALIDATION"><code>SKIP\_VALIDATION</code></a>: Bypass validation of connection to this data sink. Supported values:

                <ul>
                  <li><a href="/content/api/java/com/gpudb/protocol/CreateDatasinkRequest.Options#TRUE"><code>TRUE</code></a> </li>
                  <li><a href="/content/api/java/com/gpudb/protocol/CreateDatasinkRequest.Options#FALSE"><code>FALSE</code></a> </li>
                </ul>

                The default value is <a href="/content/api/java/com/gpudb/protocol/CreateDatasinkRequest.Options#FALSE"><code>FALSE</code></a>.
              </li>
            </ul>

            The default value is an empty <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/Map.html" title="class or interface in java.util" className="external-link"><code>Map</code></a>.
          </div>

          <div className="dt">Returns:</div>
          <div className="dd"><a href="/content/api/java/com/gpudb/protocol/CreateDatasinkResponse" title="class in com.gpudb.protocol"><code>Response</code></a> object containing the results of the operation.</div>
          <div className="dt">Throws:</div>
          <div className="dd"><code><a href="/content/api/java/com/gpudb/GPUdbException" title="class in com.gpudb">GPUdbException</a></code> - if an error occurs during the operation.</div>
        </div>
      </div>
    </li>
  </ul>
</div>
