Skip to main content

Creating a Looker Connection

AtScale supports integrations with Looker, enabling users to deploy models directly to Looker repositories.

Note

Looker integration requires a special AtScale license. For information on obtaining one, contact Atscale Support.

Prerequisites

Before creating a connection to Looker, ensure you have the following:

  • A Looker-enabled AtScale license.
  • A deployed catalog. This ensures a query endpoint is available.
  • A Git connection configured in Looker. For more information, see Setting up and testing a Git connection in the Looker documentation.

Add a connection to AtScale in Looker

First, you must configure a connection to AtScale in Looker:

  1. In Design Center, determine the name of the deployed catalog you want to connect to:

    1. Open the Deployed Catalogs panel, then open the catalog you want to connect to.
    2. Click the Connect tab. The Connection Settings page opens.
    3. Locate the JDBC field and make a note of the catalog name. This appears after the /host:port/ portion of the URL.
  2. In Looker, open the Admin panel and select Connections in the Database section.

  3. Click Add Connection.

  4. Complete the following fields. You can leave the default values for any not listed here.

    • Name: Enter a name to uniquely identify this connection in your LookML code.

      Make a note of the name you use, as you will have to enter the exact name when configuring Looker in AtScale.

    • Dialect: Select PostgreSQL 9.5+.

    • Host: Enter the address of the database host.

    • Port: Enter 15432.

    • Database: Enter the name of the deployed catalog that you obtained above.

    • Username: Enter a valid AtScale username.

    • Password: Enter the password for the AtScale user defined by Username.

For more information about creating new connections in Looker, see Connecting Looker to your database.

Important

Using port 15432 for the Looker connection may cause the AtScale engine to restart repeatedly. If this occurs, change the port to 15732.

Next, you need to add a Looker configuration in AtScale.

Add a Looker configuration in AtScale

To add a Looker configuration in AtScale:

  1. Log in to Design Center as an admin user.

  2. In the left-side navigation, click the Settings icon. The Settings page opens.

  3. Click the Looker tab.

  4. Click Add Looker Configuration. The Add Looker Server Definition panel opens.

  5. Complete the following fields:

    • Configuration Name: The name of Looker configuration, which should be unique. If multiple Looker configurations exist, this value is used to distinguish between them in the user interface.
    • AtScale Connection: The connection name you set for the AtScale server when configuring the Looker Connection Settings. This value is used to identify the Connection ID in the generated LookML.
    • Git URL: The URL for your Looker Git repository. This is where your AtScale models will be deployed.
    • Model Directory: The name of the directory in your repository you want your models deployed to.
    • Views Directory: The name of the directory in your repository you want your views deployed to.
    • Export Filter Regex: A regular expression used to determine which catalogs are deployed to Looker. You can include multiple expressions separated by commas. To include all projects, use .*.
  6. Click Apply.

Setting a connection for queries that do not contain a FROM clause

Some Looker queries don't specify a FROM clause. You can configure which connection to use for such queries using the query.noFrom.connectionId global setting. For more information, see Query Settings and Configuring Global Settings.

Next steps

Once you have your connection configured, you should create a LookML project to use for your AtScale models. For instructions, see Creating a LookML Project.

Additional information