Data Registry CLI Cheat Sheet
Overview
CLI Name: dregs
Version: 1.1.0
Date: February 2025
Description: A command-line tool for querying and managing datasets in a data registry.
Main Commands
Command |
Description |
---|---|
|
Show some properties |
|
List your entries in the data registry |
|
Modify an entry in the database |
|
Register a new entry to the database |
|
Delete an entry in the database |
🟦 Querying from the Command Line 🟦
Listing Datasets
The dregs ls
command lists all datasets in the connected namespace owned by the current user ($USER
). Note only columns from the dataset table are returned.
Command |
Description |
---|---|
|
List all datasets owned by the current user. |
|
List all datasets in the namespace. |
|
List datasets owned by |
Selecting Specific Columns
Command |
Description |
---|---|
|
Show only specified columns. |
Limiting Rows and Characters
Command |
Description |
---|---|
|
Limit output to 100 rows. |
|
Limit column width to 20 characters. |
Filtering by Keyword
Command |
Description |
---|---|
|
Filter datasets by the keyword |
🟩 Registering a Dataset 🟩
Adding a New Dataset
To register a new dataset, use the following command:
dregs register dataset my_dataset 1.0.0 \
--old_location /path/to/data \
--owner myowner \
--owner_type group \
--description "My first dataset in the registry"
Description of Options
Option |
Description |
---|---|
|
The name to register the dataset under. |
|
The version of the dataset following semantic versioning. |
|
The absolute path to the existing dataset location. Data will be copied to the root directory. |
|
The owner of the dataset. |
|
Specifies that the owner type is a group. |
|
A human-readable description of the dataset. |
Additional Properties
There are many other properties that can be set when registering a dataset. You can use:
dregs register dataset --help
to see all available options. We recommend being as detailed as possible when providing metadata.
🟨 Modifying a Dataset 🟨
Updating Dataset Information
To modify an existing dataset, use the following command:
dregs modify dataset 1234 \
--column description \
--new_value "Updated dataset description"
Description of Options
Option |
Description |
---|---|
|
The dataset ID of the dataset to be modified. |
|
Specifies which column in the dataset to modify. |
|
The new value to set for the specified column. |
Additional Properties
There are additional fields that can be modified. You can use:
dregs modify dataset --help
to see all available options.
🟥 Deleting a Dataset 🟥
Removing a Dataset
To delete a dataset, use the following command:
dregs delete dataset my_dataset 1.0.0 \
--owner myowner \
--owner_type group
Description of Options
Option |
Description |
---|---|
|
The name of the dataset to be deleted. |
|
The version of the dataset to be deleted. |
|
The owner of the dataset. |
|
Specifies that the owner is a group. |
Confirmation
Deleting a dataset is irreversible. Ensure you have the correct details before running the command. To see additional deletion options, use:
dregs delete dataset --help