CREATE LINK
On this page
Creates a new connection link to S3, Azure, GCS, HDFS, HTTP, or Kafka for a permitted user.
Syntax
CREATE LINK [db_name.]connection_name AS
{ S3 | AZURE | GCS | HDFS | HTTP | KAFKA }
CREDENTIALS 'credentials_json'
[ CONFIG 'configuration_json' ]
[ DESCRIPTION 'description' ]Remarks
-
db_is the name of the SingleStore database.name It is an optional parameter. If not specified, the connection link is created in the current (context) database. -
CONFIGspecifies non-secret configuration settings, such as region and host.Sensitive secrets must not be stored in CONFIG.Store all passwords, tokens, and keys in CREDENTIALSinstead.The contents of CONFIGmay be displayed in metadata listings, such asSHOW LINKSandINFORMATION_.SCHEMA. LINKS -
CONFIGandCREDENTIALScan be specified in either order (CONFIGfollowed byCREDENTIALSorCREDENTIALSfollowed byCONFIG). -
The
CONFIGandCREDENTIALSexpect JSON-formatted information.Refer to the Examples. For more configuration examples, refer to BACKUP DATABASE. -
connection_is a user defined name of the connection link.name -
Only users with the
CREATE LINKpermission can create a connection link. -
descriptionspecifies the details related to the connection link. -
Commands such as
BACKUP,RESTORE,CREATE PIPELINE, andSELECTsupport connection links.Refer to any of these commands for details on the credentials_andjson configuration_clauses.json -
This command causes implicit commits.
Refer to COMMIT for more information. -
Refer to the Permission Matrix for the required permissions.
Examples
AWS S3 Example
The configuration_ and credentials_ for AWS connections look like this:
CREDENTIALS '{
"aws_access_key_id": "replace_with_your_access_key_id",
"aws_secret_access_key": "replace_with_your_secret_access_key"
[, "aws_session_token": "replace_with_your_temp_session_token"]
[, "role_arn":"replace_with_your_role_arn"]
}'
CONFIG ‘{
"region": "your_region",
"endpoint_url": "http://other_endpoint"
[,"x-amz-server-side-encryption":"<encryption_type>" [, "x-amz-server-side-encryption-aws-kms-key-id":"<optional_key>" ] |
"x-amz-server-side-encryption-customer-algorithm":"<encryption_type>",
"x-amz-server-side-encryption-customer-key":"<encrypted_or_unencrypted_key>",
"x-amz-server-side-encryption-customer-key-MD5":"<key>"
]
}'For other options for the CONFIG clause (disable_, request_, and others) see CREATE PIPELINE.
The following example demonstrates how to create an S3 connection link product_ to the database Orderdb.
CREATE LINK Orderdb.product_S3 AS S3CREDENTIALS '{"aws_access_key_id":"your_access_key_id","aws_secret_access_key":"your_secret_access_key"}'CONFIG '{"region":"us-east-1"}'DESCRIPTION 'Products ordered in December';
Azure Example
The credentials_ for Azure looks like this:
CREDENTIALS '{
"account_name": "your_account_name",
"account_key": "encrypted_key"
}';The following example shows how to create an Azure connection link.
CREATE LINK [db_name.]connection_name AS AZURECREDENTIALS '{"account_name": "your_account","account_key": "encrypted_key"}';
For more information about Azure credentials, see Azure Blob Pipeline Syntax.
GCS Example
The credentials_ for GCS looks like this:
CREDENTIALS '{
"access_id": "your_google_access_key",
"secret_key": "your_google_secret_key"
};The following example demonstrates how to create a GCS connection link called mylink.
CREATE LINK mylink AS GCS CREDENTIALS '{"access_id": "your_google_access_key","secret_key": "your_google_secret_key"}';
For more information about GCS credentials, see CREATE PIPELINE.
HDFS Example
The login for HDFS cluster is performed via a keytab file, so typically credentials_ is left blank and config_ is used.mylink:
CREATE LINK mylink AS HDFSCREDENTIALS ''CONFIG '{"hadoop.security.authentication": "kerberos","kerberos.user": "user@masked_host","kerberos.keytab": "/opt/software/adkeytabs/user.keytab","dfs.client.use.datanode.hostname": true,"dfs.datanode.kerberos.principal": "hdfs/_HOST@masked_host","dfs.namenode.kerberos.principal": "hdfs/_HOST@masked_host"}';
For more information about HDFS credentials, see Advanced HDFS Pipeline Mode.
HTTP Example
The following example demonstrates how to create an HTTP link.
CREATE LINK test AS HTTP CREDENTIALS '{"headers": {"Authorization": "Basic cm9vdDp0ZXN0aW5nCg=="}}';
Kafka Example
The credentials_ and config_ for Kafka can be complex.
The following example demonstrates how to create a Kafka connection link for Confluent Cloud.
CREATE LINK mylink AS KAFKACONFIG '{"security.protocol": "sasl_ssl","sasl.mechanism": "PLAIN"}'CREDENTIALS '{"sasl.username": "your_sasl_username","sasl.password": "your_sasl_secret_key"}';
Last modified: February 18, 2026