Overview

Understanding Layers

Create your visualizations in layers to share configuration and queries across visualizations.

What is a Layer?

Each visualization in White Label Data is created by one or more Layers. Layers form the configuration for, and fully describe, a given visualization. Each layer file is organized into sections containing configuration, queries, pipeline steps, figures, and mappings.

Basic Layer Configuration

The Config section of the Layer file, denoted by the <config> tag, is required in all cases, as it describes the basic type of the visualization that should be rendered.

Forming Queries

Queries are placed in Layer files in sections denoted with a <query> tag. Each query tag must also be named so that it can be referred to in a pipeline step.

The Layer Pipeline

The White Label Data pipeline is responsible for querying and transforming data in advance of mapping that data into a visualization. The pipeline is specified in your Layer file in the <pipeline> section.

Using Transforms

The pipeline in White Label Data allows for transforming query results using built-in transform operations. See the Layer Pipeline documentation for an example of adding transforms to the pipeline.

Query Looker API

White Label Data can query the Looker API using the pipeline. Looker queries using the Looker API are not written in SQL. Therefore, there is no <query> tag required to query the Looker API.

Query Snowflake

White Label Data can query Snowflake data warehouses and connect the results to a visualization. First, you must Create a Snowflake Connection. To add a query to a visualization, you create a <query> section in a Layer file and write your SQL query.

Query BigQuery

White Label Data can query Google BigQuery data warehouses and connect the results to a visualization. First, you must Create a BigQuery Connection. To add a query to a visualization, you create a <query> section in a Layer file and write your SQL query.

Query Postgres

White Label Data can query Postgres data warehouses and connect the results to a visualization. First, you must Create a Postgres Connection. To add a query to a visualization, you create a <query> section in a Layer file and write your SQL query.

Query Elasticsearch

While most of the White Label Data documentation refers to placing SQL in queries, it is also possible to query Elasticsearch using a JSON-formatted query. First, you must Create an Elasticsearch Connection.

Understanding Figures and Mappings

After the pipeline steps are complete, you have a DataFrames that contains data you wish to visualize. However, you still have not told White Label Data how to visualize your data.

Adding Shared Queries

It is common that multiple visualizations on the same page use the same database query. For example, you may want to include both a chart and a table for the same data.

Using Base Types

In the /layers/base-types folder of your Git repository, you will find a set of Layer files (ending in .wld) that contain figure and mapping sections. These are base types, White Label Data’s term for layers that are good starting points for various chart and visualizations.

Debugging Your Layers

White Label Data provides a profiling tool that allows you to inspect the rendering process of your visualizations in real time. It provides visibility into each step of the pipeline and the figure rendering process.