How to Install Elementary Locally

Elementary

Introduction

Elementary is an open-source data observability tool designed to help teams monitor and debug data pipeline issues efficiently. Installing Elementary locally is useful for development, testing, and debugging before deploying to production. A local setup allows users to experiment with configurations, run diagnostics, and integrate it with existing data tools in a controlled environment.

This guide covers the installation process using Docker and language-specific package managers like pip, npm, and Maven.


Installing Elementary with Docker

Docker provides an isolated environment, making it an ideal method for running Elementary without modifying your local system.

Prerequisites

  • Install Docker
  • Ensure Docker is running

Installation Steps

Pull the Elementary Docker image:

docker pull elementarydata/elementary:latest

Run Elementary in a container:

docker run --rm -it elementarydata/elementary:latest

To mount a local configuration file, use:

docker run --rm -it -v $(pwd)/config:/app/config elementarydata/elementary:latest

Installing Elementary with Python (pip)

Elementary can be installed via pip, making it easy to integrate with Python-based data pipelines.

Prerequisites

Install Python 3.7+

Ensure pip is up to date:

python -m pip install --upgrade pip

Installation Steps

Install Elementary using pip:

pip install elementary-data

Verify installation:

edr --help

To update Elementary, run:

pip install --upgrade elementary-data

Installing Elementary with Node.js (npm)

Elementary does not natively support Node.js, but integration with JavaScript-based workflows can be managed using system calls to the CLI.

Prerequisites

Installation Workaround

Since there’s no direct npm package, you can execute Elementary using a subprocess in Node.js:

Install Elementary via pip:

pip install elementary-data

Run it from a Node.js script:

const { exec } = require("child_process");

exec("edr --help", (error, stdout, stderr) => {
    if (error) {
        console.error(`Error: ${error.message}`);
        return;
    }
    if (stderr) {
        console.error(`Stderr: ${stderr}`);
        return;
    }
    console.log(`Output: ${stdout}`);
});

Installing Elementary with Java (Maven/Gradle)

Elementary is primarily a Python-based tool, but Java applications can interact with it via subprocess calls.

Maven Workaround

Install Python and Elementary using pip:

pip install elementary-data

Execute Elementary in Java:

import java.io.BufferedReader;
import java.io.InputStreamReader;

public class RunElementary {
    public static void main(String[] args) {
        try {
            Process process = Runtime.getRuntime().exec("edr --help");
            BufferedReader reader = new BufferedReader(new InputStreamReader(process.getInputStream()));
            String line;
            while ((line = reader.readLine()) != null) {
                System.out.println(line);
            }
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}

Managing and Verifying the Installation

After installation, confirm that Elementary is set up correctly:

Check the installed version

edr --version

Run a quick test to ensure functionality

edr validate

Check for updates regularly

pip install --upgrade elementary-data

By following these steps, you can successfully install Elementary and integrate it into your data pipeline workflows.

Last Releases

  • v0.19.0
    What’s Changed Enable support for multiple links and icons in alert messages by @MikaKerman in #1927 using elementary 0.19.0 by @arbiv in #1942 Known Issues dbt-databricks must be <1.10.2 by… Read more: v0.19.0
  • v0.18.1
    What’s Changed Athena now works in the CLI by @GuyEshdat in #1870 Allow contributor PRs to run tests by @haritamar in #1866 Add NOT_CONTAINS filter type by @MikaKerman in #1876… Read more: v0.18.1
  • v0.17.0
    What’s Changed Alerts Table Block: Introduced a new Table Block feature to present test results within alerts, enhancing data readability and user comprehension. ​ Selectable Alert Sections: Extended the support… Read more: v0.17.0

More From Author

Leave a Reply

Recent Comments

No comments to show.