Generates LookML model from your metriql datasets. The idea is to leverage metriql datasets in your Looker setup without any additional modeling.
The library is available in PyPI so you can install it via pip as follows:
pip install metriql-lookml
The library expects stdin
for the metriql metadata and outputs a ZIP file to stdout
. Here is an example:
curl http://metriql-server.com/api/v0/metadata | metriql-lookml --connection myproject > metriql.zip
You can use --file
argument instead of reading the metadata from stdin
as an alternative.
The command outputs a zip file to stdout
by default, if you pass --out myfile.zip
argument, it will write to the specified file instead.
-
Create a connection to metriql from Looker using its Trino interface.
-
Run
metriql-lookml
passing the relevantconnection
argument for metriql.
You need to enable JDBC in your metriql server to be able to use metriql's Trino interface.
Requires pipenv and python >=3.7
# From root folder
# Install
pipenv install --dev
# Run
pipenv run metriql2lookml