Skip to main content
Version: 0.14.13

CLI (Command Line Interface)

SetupArrowConnect to DataArrowCreate ExpectationsArrowValidate Data

Overview

Definition

CLI stands for Command Line Interface.

Features and promises

The CLI provides useful convenience functions covering all the steps of working with Great Expectations. CLI commands consist of a noun indicating what you want to operate on, and a verb indicating the operation to perform. All CLI commands have help documentation that can be accessed by including the --help option after the command. Running great_expectations without any additional arguments or great_expectations --help will display a list of the available commands.

Relationship to other objects

The CLI provides commands for performing operations on your Great Expectations deployment, as well as on CheckpointsThe primary means for validating data in a production deployment of Great Expectations., DatasourcesProvides a standard API for accessing and interacting with data from a wide variety of source systems., Data DocsHuman readable documentation generated from Great Expectations metadata detailing Expectations, Validation Results, etc., StoresA connector to store and retrieve information about metadata in Great Expectations., and Expectation SuitesA collection of verifiable assertions about data..

You will usually also initialize your Data ContextThe primary entry point for a Great Expectations deployment, with configurations and methods for all supporting components. through the CLI.

Most CLI commands will either execute entirely in the terminal, or will open Jupyter Notebooks with boilerplate code and additional commentary to help you accomplish a task that requires more complicated configuration.

Use cases

SetupArrowConnect to DataArrowCreate ExpectationsArrowValidate Data

The CLI provides functionality at every stage in your use of Great Expectations. What commands you'll want to execute, however, will differ from step to step.

Setup

Setup

Every Great Expectations project starts with initializing your Data Context, which is typically done with the command:

Terminal command
great_expectations init

You can also utilize the project commands to check config files for validity and help with migrations when updating versions of Great Expectations. You can read about these commands in the CLI with the command:

Terminal command
great_expectations project --help
Setup

Connect to Data

To assist with connecting to data, the CLI provides commands for creating, listing, and deleting Datasources. You can read about these commands in the CLI with the command:

Terminal command
great_expectations datasource --help
Setup

Create Expectations

To assist you in creating Expectation Suites, the CLI provides commands for listing available suites, creating new empty suites, creating new suites with scaffolding, editing existing suites, and deleting expectation suites. You can read about these commands in the CLI with the command:

Terminal command
great_expectations suite --help
Setup

Validate Data

To assist you in Validating your data, the CLI provides commands for listing existing Checkpoints, running an existing Checkpoint, creating new Checkpoints, and creating Python scripts that will run a Checkpoint. You can read about these commands in the CLI with the command:

Terminal command
great_expectations checkpoint --help

There are also commands available through the CLI for building, deleting, and listing your available Data Docs. You can read about these commands in the CLI with the command:

Terminal command
great_expectations docs --help

Features

Convenience commands

The CLI provides commands that will list, create, delete, or edit almost anything you may want to list, create, delete, or edit in Great Expectations. If the CLI does not perform the operation directly in the terminal, it will provide you with a Jupyter Notebook that has the necessary code boilerplate and contextual notes to get you started on the process.

API basics

For an in-depth guide on using the CLI, see our document on how to use the Great Expectations CLI or read the CLI documentation directly using the following command:

Terminal command
great_expectations --help