SHOW EXTERNAL CONNECTION

On this page Carat arrow pointing down

New in v24.2: You can use external connections to specify and interact with resources that are external from CockroachDB. When creating an external connection, you define a name for an external connection while passing the provider URI and query parameters. SHOW EXTERNAL CONNECTION displays the connection name, URI, and the type of connection.

You can also use the following SQL statements to work with external connections:

Required privileges

Users with the admin role can view all external connections with SHOW EXTERNAL CONNECTION.

Without the admin role, users can view the external connections that they own. Users own external connections that they have created with CREATE EXTERNAL CONNECTION.

Synopsis

SHOW EXTERNAL CONNECTIONS CONNECTION string_or_placeholder

Parameters

string_or_placeholder is the name of the created external connection.

Responses

Response Description
connection_name The user-specified name of the external connection.
connection_uri The storage/sink URI that the external connection references.
connection_type Possible values are:
.

Examples

Show all external connections in the cluster

icon/buttons/copy
SHOW EXTERNAL CONNECTIONS;
  connection_name |                                                                                                                                    connection_uri                                                                                                                                     | connection_type
------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------------
  msk             | kafka://boot-vzq1qitx.c1.kafka-serverless.us-east-1.amazonaws.com:9098/?sasl_aws_iam_role_arn={ARN}&sasl_aws_iam_session_name={session name}t&sasl_aws_region=us-east-1&sasl_enabled=true&sasl_mechanism=AWS_MSK_IAM&tls_enabled=true                                                 | STORAGE
  s3_bucket       | s3://bucket name?AWS_ACCESS_KEY_ID={access key}&AWS_SECRET_ACCESS_KEY=redacted                                                                                                                                                                                                        | STORAGE

Show an external connection

icon/buttons/copy
SHOW EXTERNAL CONNECTION s3_bucket;
  connection_name |                                       connection_uri                                       | connection_type
------------------+--------------------------------------------------------------------------------------------+------------------
  s3_bucket       | s3://bucket name?AWS_ACCESS_KEY_ID={access key}&AWS_SECRET_ACCESS_KEY=redacted             | STORAGE
(1 row)

See also


Yes No
On this page

Yes No