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

# /alter/datasink

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

Alters the properties of an existing
[data sink](../../concepts/data_sinks/).

## Input Parameter Description

<ParamField body="name" type="string">
  Name of the data sink to be altered. Must be an existing data sink.
</ParamField>

<ParamField body="datasink_updates_map" type="map of string to strings">
  Map containing the properties of the data sink to be updated. Error if empty.

  <Expandable title="datasink_updates_map">
    <ParamField body="destination">
      Destination for the output data in format 'destination\_type://path\[:port]'.

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

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

    <ParamField body="wait_timeout">
      Timeout in seconds for waiting for a response from this 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.  This may be a KIFS file.
    </ParamField>

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

    <ParamField body="kafka_url">
      The publicly-accessible full path URL to the kafka broker, e.g., '[http://172.123.45.67:9300](http://172.123.45.67:9300)'.
    </ParamField>

    <ParamField body="kafka_topic_name">
      Name of the Kafka topic to use for this data sink, if it references a Kafka broker.
    </ParamField>

    <ParamField body="anonymous">
      Create an anonymous connection to the storage provider--DEPRECATED: this is now the default.  Specify use\_managed\_credentials for non-anonymous connection.

      The default value is `true`.

      The supported values are:

      * true
      * false
    </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="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="skip_validation">
      Bypass validation of connection to this data sink.

      The default value is `false`.

      The supported values are:

      * true
      * false
    </ParamField>

    <ParamField body="schema_name">
      Updates the schema name.  If *schema\_name* doesn't exist, an error will be thrown. If *schema\_name* is empty, then the user's default schema will be used.
    </ParamField>
  </Expandable>
</ParamField>

<ParamField body="options" type="map of string to strings">
  Optional parameters.
</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">
  'alter\_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 /alter/datasink endpoint:

  <Expandable title="data_str">
    <ResponseField name="updated_properties_map" type="map of string to strings">
      Map of values updated.
    </ResponseField>

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

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