This article will cover the syntax of the ‘connect’ regular script statement

The connect statement is used to open a connection to a database.

Statement syntax

ODBC | OLEDB | CUSTOM | LIB CONNECT TO connect-string | connection

ODBC | OLEDB | CUSTOM | LIBThis defines the type of connection that is to be made. LIB refers to a previously created data connection that is stored under a name in the ‘connections’ sidebar in the data load editor.
connect-string | connectionIf the database of types ODBC | OLEDB | CUSTOM is used, this will be the full connection string, including the necessary parameters. If the connection is being made to an existing stored connection using the LIB prefix, this will be the name of the connection as it appears in the list of existing connections in the data load editor.

Example

This example connects to an existing Google Analytics connection.

LIB CONNECT TO 'Public:Google_Analytics_Be';

Result

A connection is opened and subsequent LOAD statements can access data from this source.