Skip to Content

lkml2cube package

lkml2cube package facilitates the migration from Looker  to Cube. It provides a convenient command-line tool for converting LookML  models into the Cube data model.

  • Install lkml2cube package from PyPI
  • Check the source code in lkml2cube on GitHub
  • Submit issues to cube on GitHub

Installation

Run the following command:

pip install lkml2cube

Usage

There are two commands: cubes and views. Both commands read all the files in the provided input parameter, including those referenced by the LookML keyword include.

cubes

The cubes command would inspect LookML views  and generate cubes.

Since join relationships are defined at the explore level in LookML syntax, generated cubes would not have join definitions.

Debugging

Run the following command to display a representation of a LookML object as a Python dictionary:

lkml2cube cubes --parseonly path/to/file.view.lkml

Converting

Run the following command to convert LookML views  into cubes:

lkml2cube cubes path/to/file.view.lkml --outputdir ./

views

The views command would inspect LookML explores  and generate cubes and views.

Since join relationships are defined at the explore level in LookML syntax, generated cubes and views would have join definitions.

Converting

Run the following command to convert LookML explores  into cubes and views:

lkml2cube views path/to/file.explore.lkml --outputdir ./

Was this page useful?