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

<div className="kinetica-pydoc">
  <div className="dl py method">
    <div className="dt sig sig-object py" id="gpudb.GPUdb.create_datasink"> <span className="sig-name descname"><span className="pre">create\_datasink</span></span><span className="sig-paren">(</span><span className="em sig-param"><span className="n"><span className="pre">name</span></span><span className="o"><span className="pre">=</span></span><span className="default_value"><span className="pre">None</span></span></span>, <span className="em sig-param"><span className="n"><span className="pre">destination</span></span><span className="o"><span className="pre">=</span></span><span className="default_value"><span className="pre">None</span></span></span>, <span className="em sig-param"><span className="n"><span className="pre">options</span></span><span className="o"><span className="pre">=</span></span><span className="default_value"><span className="pre">{"{"}{"}"}</span></span></span><span className="sig-paren">)</span><a href="https://github.com/kineticadb/kinetica-api-python/blob/master/gpudb/gpudb.py#L21978"><span className="viewcode-link"><span className="pre">\[source]</span></span></a></div>

    <div className="dd">
      <p>Creates a <a className="reference external" href="/content/concepts/data_sinks/">data sink</a>, which contains the destination information for a data sink that is external to the database.</p>
      <p><strong>Parameters</strong></p>

      <div className="blockquote">
        <div>
          <div className="dl">
            <div className="dt">name (<span className="em">str</span>) –</div>

            <div className="dd">
              <p>Name of the data sink to be created.</p>
            </div>

            <div className="dt">destination (<span className="em">str</span>) –</div>

            <div className="dd">
              <p>Destination for the output data in format ‘storage\_provider\_type://path\[:port]’.</p>
              <p>Supported storage provider types are ‘azure’, ‘gcs’, ‘hdfs’, ‘http’, ‘https’, ‘jdbc’, ‘kafka’, and ‘s3’.</p>
            </div>

            <div className="dt">options (<span className="em">dict of str to str</span>) –</div>

            <div className="dd">
              <p>Optional parameters. Allowed keys are:</p>

              <ul>
                <li>
                  <p><strong>connection\_timeout</strong> – Timeout in seconds for connecting to this data sink.</p>
                </li>

                <li>
                  <p><strong>wait\_timeout</strong> – Timeout in seconds for waiting for a response from this data sink.</p>
                </li>

                <li>
                  <p><strong>credential</strong> – Name of the <a className="reference external" href="/content/concepts/credentials/">credential</a> object to be used in this data sink.</p>
                </li>

                <li>
                  <p><strong>s3\_bucket\_name</strong> – Name of the Amazon S3 bucket to use as the data sink.</p>
                </li>

                <li>
                  <p><strong>s3\_region</strong> – Name of the Amazon S3 region where the given bucket is located.</p>
                </li>

                <li>
                  <p><strong>s3\_verify\_ssl</strong> – Whether to verify SSL connections. Allowed values are:</p>

                  <ul className="simple">
                    <li>
                      <p><strong>true</strong> – Connect with SSL verification.</p>
                    </li>

                    <li>
                      <p><strong>false</strong> – Connect without verifying the SSL connection; for testing purposes, bypassing TLS errors, self-signed certificates, etc.</p>
                    </li>
                  </ul>

                  <p>The default value is ‘true’.</p>
                </li>

                <li>
                  <p><strong>s3\_use\_virtual\_addressing</strong> – Whether to use virtual addressing when referencing the Amazon S3 sink. Allowed values are:</p>

                  <ul className="simple">
                    <li>
                      <p><strong>true</strong> – The requests URI should be specified in virtual-hosted-style format where the bucket name is part of the domain name in the URL.</p>
                    </li>

                    <li>
                      <p><strong>false</strong> – Use path-style URI for requests.</p>
                    </li>
                  </ul>

                  <p>The default value is ‘true’.</p>
                </li>

                <li>
                  <p><strong>s3\_aws\_role\_arn</strong> – Amazon IAM Role ARN which has required S3 permissions that can be assumed for the given S3 IAM user.</p>
                </li>

                <li>
                  <p><strong>s3\_encryption\_customer\_algorithm</strong> – Customer encryption algorithm used encrypting data.</p>
                </li>

                <li>
                  <p><strong>s3\_encryption\_customer\_key</strong> – Customer encryption key to encrypt or decrypt data.</p>
                </li>

                <li>
                  <p><strong>s3\_encryption\_type</strong> – Server side encryption type.</p>
                </li>

                <li>
                  <p><strong>s3\_kms\_key\_id</strong> – KMS key.</p>
                </li>

                <li>
                  <p><strong>hdfs\_kerberos\_keytab</strong> – Kerberos keytab file location for the given HDFS user. This may be a KIFS file.</p>
                </li>

                <li>
                  <p><strong>hdfs\_delegation\_token</strong> – Delegation token for the given HDFS user.</p>
                </li>

                <li>
                  <p><strong>hdfs\_use\_kerberos</strong> – Use kerberos authentication for the given HDFS cluster. Allowed values are:</p>

                  <ul className="simple">
                    <li>
                      <p>true</p>
                    </li>

                    <li>
                      <p>false</p>
                    </li>
                  </ul>

                  <p>The default value is ‘false’.</p>
                </li>

                <li>
                  <p><strong>azure\_storage\_account\_name</strong> – Name of the Azure storage account to use as the data sink, this is valid only if tenant\_id is specified.</p>
                </li>

                <li>
                  <p><strong>azure\_container\_name</strong> – Name of the Azure storage container to use as the data sink.</p>
                </li>

                <li>
                  <p><strong>azure\_tenant\_id</strong> – Active Directory tenant ID (or directory ID).</p>
                </li>

                <li>
                  <p><strong>azure\_sas\_token</strong> – Shared access signature token for Azure storage account to use as the data sink.</p>
                </li>

                <li>
                  <p><strong>azure\_oauth\_token</strong> – Oauth token to access given storage container.</p>
                </li>

                <li>
                  <p><strong>azure\_use\_virtual\_addressing</strong> – Whether to use virtual addressing when referencing the Azure source. Allowed values are:</p>

                  <ul className="simple">
                    <li>
                      <p><strong>true</strong> – The requests URI should be specified in virtual-hosted-style format where the bucket name is part of the domain name in the URL.</p>
                    </li>

                    <li>
                      <p><strong>false</strong> – Use path-style URI for requests.</p>
                    </li>
                  </ul>

                  <p>The default value is ‘true’.</p>
                </li>

                <li>
                  <p><strong>gcs\_bucket\_name</strong> – Name of the Google Cloud Storage bucket to use as the data sink.</p>
                </li>

                <li>
                  <p><strong>gcs\_project\_id</strong> – Name of the Google Cloud project to use as the data sink.</p>
                </li>

                <li>
                  <p><strong>gcs\_service\_account\_keys</strong> – Google Cloud service account keys to use for authenticating the data sink.</p>
                </li>

                <li>
                  <p><strong>jdbc\_driver\_jar\_path</strong> – JDBC driver jar file location.</p>
                </li>

                <li>
                  <p><strong>jdbc\_driver\_class\_name</strong> – Name of the JDBC driver class.</p>
                </li>

                <li>
                  <p><strong>kafka\_topic\_name</strong> – Name of the Kafka topic to publish to if input parameter <span className="em">destination</span> is a Kafka broker.</p>
                </li>

                <li>
                  <p><strong>max\_batch\_size</strong> – Maximum number of records per notification message. The default value is ‘1’.</p>
                </li>

                <li>
                  <p><strong>max\_message\_size</strong> – Maximum size in bytes of each notification message. The default value is ‘1000000’.</p>
                </li>

                <li>
                  <p><strong>json\_format</strong> – The desired format of JSON encoded notifications message. Allowed values are:</p>

                  <ul className="simple">
                    <li>
                      <p><strong>flat</strong> – A single record is returned per message.</p>
                    </li>

                    <li>
                      <p><strong>nested</strong> – Records are returned as an array per message.</p>
                    </li>
                  </ul>

                  <p>The default value is ‘flat’.</p>
                </li>

                <li>
                  <p><strong>use\_managed\_credentials</strong> – When no credentials are supplied, we use anonymous access by default. If this is set, we will use cloud provider user settings. Allowed values are:</p>

                  <ul className="simple">
                    <li>
                      <p>true</p>
                    </li>

                    <li>
                      <p>false</p>
                    </li>
                  </ul>

                  <p>The default value is ‘false’.</p>
                </li>

                <li>
                  <p><strong>use\_https</strong> – Use HTTPS to connect to datasink if true, otherwise use HTTP. Allowed values are:</p>

                  <ul className="simple">
                    <li>
                      <p>true</p>
                    </li>

                    <li>
                      <p>false</p>
                    </li>
                  </ul>

                  <p>The default value is ‘true’.</p>
                </li>

                <li>
                  <p><strong>skip\_validation</strong> – Bypass validation of connection to this data sink. Allowed values are:</p>

                  <ul className="simple">
                    <li>
                      <p>true</p>
                    </li>

                    <li>
                      <p>false</p>
                    </li>
                  </ul>

                  <p>The default value is ‘false’.</p>
                </li>
              </ul>

              <p>The default value is an empty dict ( {"{"}{"}"} ).</p>
            </div>
          </div>
        </div>
      </div>

      <p><strong>Returns</strong></p>

      <div className="blockquote">
        <div>
          <p>A dict with the following entries–</p>

          <div className="dl simple">
            <div className="dt">name (<span className="em">str</span>) –</div>

            <div className="dd">
              <p>Value of input parameter <span className="em">name</span>.</p>
            </div>

            <div className="dt">info (<span className="em">dict of str to str</span>) –</div>

            <div className="dd">
              <p>Additional information.</p>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>
</div>
