Reference
Python packages
lkml2cube

lkml2cube package

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

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 (opens in a new tab) 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 (opens in a new tab) into cubes:

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

views

The views command would inspect LookML explores (opens in a new tab) 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 (opens in a new tab) into cubes and views:

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