/create/datasource

URL: http://GPUDB_IP_ADDRESS:GPUDB_PORT/create/datasource

Creates a data source, which contains the location and connection information for a data store that is external to the database.

Input Parameter Description

NameTypeDescription
namestringName of the data source to be created.
locationstringLocation of the remote storage in 'storage_provider_type://[storage_path[:storage_port]]' format. Supported storage provider types are 'hdfs' and 's3'.
user_namestringName of the remote system user; may be an empty string
passwordstringPassword for the remote system user; may be an empty string
optionsmap of string to strings

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

Supported Parameters (keys)Parameter Description
skip_validation

Bypass validation of connection to remote source. The default value is false. The supported values are:

  • true
  • false
connection_timeoutTimeout in seconds for connecting to this storage provider
wait_timeoutTimeout in seconds for reading from this storage provider
credentialName of the Credential object to be used in data source
s3_bucket_nameName of the Amazon S3 bucket to use as the data source
s3_regionName of the Amazon S3 region where the given bucket is located
hdfs_kerberos_keytabKerberos keytab file location for the given HDFS user
hdfs_delegation_tokenDelegation token for the given HDFS user
hdfs_use_kerberos

Use kerberos authentication for the given HDFS cluster The default value is false. The supported values are:

  • true
  • false
azure_storage_account_nameName of the Azure storage account to use as the data source, this is valid only if tenant_id is specified
azure_container_nameName of the Azure storage container to use as the data source
azure_tenant_idActive Directory tenant ID (or directory ID)
azure_sas_tokenShared access signature token for Azure storage account to use as the data source
azure_oauth_tokenOauth token to access given storage container

Output Parameter Description

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

NameTypeDescription
statusString'OK' or 'ERROR'
messageStringEmpty if success or an error message
data_typeString'create_datasource_request' or 'none' in case of an error
dataStringEmpty string
data_strJSON or String

This embedded JSON represents the result of the /create/datasource endpoint:

NameTypeDescription
namestringValue of input parameter name.
infomap of string to stringsAdditional information.

Empty string in case of an error.