Skip to main content
Version: I2023.1.0

Using LookML files in Looker

Now that the LookML are generated by AtScale you can start using them in your Looker project. There are two way to do this - copying the files manually, or setting integration via Git.

Before you begin

Ensure that the connection to AtScale is created, the Looker configuration properties are defined, and a project is created in Looker. For details, see Using AtScale with Looker.

Copying the files manually

To copy the files manually you need to know how to modify Looker projects. For details, see Accessing and editing project information.

You can copy the LookML files in the following way:

  1. In AtScale Design Center, publish your project.

    The engine will generate LookML files for the published project: one containing information for the model (AtScale project), and one for the view (AtScale data models).

  2. Go to PROJECTS > your project > PUBLISHED, your cube > CONNECT > LOOKER and download both LookML files using the corresponding buttons.

  3. In Looker, choose "Develop/your project name".

  4. Copy the data from the generated Model file from AtScale into the created model file in Looker, and replace the generated data from Looker.

  5. Copy the contents of the AtScale-generated View file to the created view file.

  6. Choose "Develop/Manage LookML Projects", choose the "Configure" button next to your project name, and select the allowed connections.

  7. Click the "Save" button, and your project will now be visible in the "Develop" menu.

info

note

Every time you update your AtScale project you should repeat the steps above.

Setting Git integration

Prerequisites:

  • Create your account on a supported Git provider (GitHub or GitLab), set a Git repository, and enable HTTPS access to it.

  • To access your repository you would need a personal access token.

    For details on how to obtain it, see Creating a personal access token (for GitHub) and Personal access tokens (for GitLab).

  • For the each project, cube, or perspective in AtScale, make sure their names do not contain any of the following characters: / \ ? * : | " < > %

    Space and underscore characters it such names are allowed. When AtScale generates file names and LookML include paths it converts such characters to underscore and double underscore, respectively.

  • To set Git integration you need to know how Looker works with Git repositories. For details, see Setting up and testing a Git connection and Using version control and deploying.

Git integration is configured in two steps. First, set Looker to work with your Git repository:

  1. In Looker, go to Admin > Users > User Attributes and create github_token and github_username attributes.

  2. Go to the User Account page, and use the attributes you created to enter the credentials for the repository from step 1.

  3. Access your LookML project and go to the Git settings:

    1. Enter the URL of the repository, the user name, and the token.
    2. Select "Test and Finalize Setup".
info

note

Consider that one repository can be linked to one Looker project. If you want to work with more projects you need to create more repositories.

Next, set AtScale to work with your Git repository:

  1. Make sure the repository URL is set in the configuration properties.

    For details, see Creating Looker Configuration.

  2. Each user who will publish to the Git repository should enter their Git credentials.

    To do this, go to User > Profile > Looker connection to repo map > Add, and fill in the Git provider information:

    • USERNAME: your username for the account you use to access your Git provider.

    • ACCESS TOKEN: your personal access token for the Git repository.

    • EMAIL: the email address set for your account in the Git repository.

    • DEVELOPER BRANCH: the branch to which AtScale should commit changes.

      Typically, this is the "Personal Branch" configured in Looker in the user's project Settings. You can find this value in Looker by going Develop > YourProjectName > Settings. See the value set for "Your Personal Branch". Consult with your Looker Administrator to confirm the correct value to use based on your Looker Project's deployment workflow.

This way the systems are integrated via Git. Now you can use them as follows:

  1. Update your project in AtScale as needed, and publish it.

    In the publishing wizard, in Advanced Options select the repository connection you need.

  2. Pull the updates in Looker.