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

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

Alters the properties of an existing
[data source](../../concepts/data_sources/).

## Input Parameter Description

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

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

  <Expandable title="datasource_updates_map">
    <ParamField body="location">
      Location of the remote storage in 'storage\_provider\_type://\[storage\_path\[:storage\_port]]' format.

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

    <ParamField body="user_name">
      Name of the remote system user; may be an empty string.
    </ParamField>

    <ParamField body="password">
      Password for the remote system user; may be an empty string.
    </ParamField>

    <ParamField body="skip_validation">
      Bypass validation of connection to remote source.

      The default value is `false`.

      The supported values are:

      * true
      * false
    </ParamField>

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

    <ParamField body="wait_timeout">
      Timeout in seconds for reading from this storage provider.
    </ParamField>

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

    <ParamField body="s3_bucket_name">
      Name of the Amazon S3 bucket to use as the data source.
    </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 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="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="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 source, 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 source.
    </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 source.
    </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 source.
    </ParamField>

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

    <ParamField body="gcs_service_account_keys">
      Google Cloud service account keys to use for authenticating the data source.
    </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 as the data source.
    </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 datasource if true, otherwise use HTTP.

      The default value is `true`.

      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>

    <ParamField body="schema_registry_connection_retries">
      Confluent Schema registry connection timeout (in secs).
    </ParamField>

    <ParamField body="schema_registry_connection_timeout">
      Confluent Schema registry connection timeout (in secs).
    </ParamField>

    <ParamField body="schema_registry_credential">
      Confluent Schema Registry [credential](../../concepts/credentials) object name.
    </ParamField>

    <ParamField body="schema_registry_location">
      Location of Confluent Schema Registry in '\[storage\_path\[:storage\_port]]' format.
    </ParamField>

    <ParamField body="schema_registry_port">
      Confluent Schema Registry port (optional).
    </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\_datasource\_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/datasource 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>
