CONNECT Statements

  • Capella Columnar
  • reference
    +
    This topic describes how you use CONNECT statements to connect all of the remote collections on a given link or links to their specified data sources, and start data ingestion.

    You incur charges when you connect a remote link.

    The CONNECT statement applies only to remote links, and is not applicable to external links.

    CONNECT statements cannot execute while the cluster is in a scaling state. The evaluation of such DDL statements fails. You can reattempt the action after scaling is complete.

    Syntax

    ConnectStmnt EBNF
    ConnectStmnt  ::= "CONNECT" "LINK" LinkSpecification
                      ( "WITH" ObjectConstructor )
    ConnectStmnt Diagram
    "CONNECT" "LINK" LinkSpecification ( "WITH" ObjectConstructor )

    The LinkSpecification is a comma-separated list of one or more link names to connect.

    Show LinkSpecification
    LinkName ( "," LinkName )*
    LinkSpecification

    Example

    The following example connects the remote link called myCbLink and starts receiving data for all of the remote collections on that link.

    CONNECT LINK myCbLink;

    After you use CONNECT and have completed your initial data ingest, you can run ANALYZE COLLECTION on each collection associated with the link. The ANALYZE statement samples data in the collection so that cost-based optimization (CBO) can be applied instead of rule-based optimization. As data in the collections changes, you can run ANALYZE COLLECTION periodically to refresh the samples. See Cost-Based Optimizer for Capella Columnar Services.

    Arguments

    WITH

    The WITH clause enables you to provide parameters for the connection. The ObjectConstructor represents a JSON object containing key-value pairs, one for each parameter. You can define the following parameter.

    Name Description Schema

    force
    Optional

    Applies to remote links for a Couchbase data service only.

    The metadata for remote Couchbase links includes the UUID of the remote Capella database or Coucbase Server cluster. If the UUID changes, connecting the link fails to prevent unintentional ingestion of data from a different cluster. To connect a link in this situation, set force to true.

    Boolean