fda is a command line utility for interacting with the Feldera Manager's REST API.
It allows you to create, manage, and monitor pipelines. It also features an interactive
shell for inspecting and modifying the state of tables and views using SQL commands.
curl -fsSL https://feldera.com/install-fda | bash| Supported platforms |
|---|
| linux-x86_64 |
| linux-aarch64 |
Requires glibc >= 2.39 (Ubuntu 24.04+, Debian 13+, Fedora 40+, RHEL 10+).
Since fda is a single binary, you can update or install older versions by re-running the installer script.
To install a specific version, pass the release git tag to the install script:
curl -fsSL https://feldera.com/install-fda | FDA_VERSION=v0.247.0 bashTo install to a custom directory:
curl -fsSL https://feldera.com/install-fda | FDA_VERSION=v0.247.0 FELDERA_INSTALL=/opt/feldera bashTo install fda with Cargo, you need a working Rust environment. You can install Rust by following
the instructions on the Rust website.
Run the following command to install fda as a Rust crate:
cargo install fdaAlternatively, to build and install the latest fda revision from our main git branch, run the following command:
cargo install --git https://github.com/feldera/feldera fdaTo build from the sources in your local feldera repository, you can install fda with the
following commands:
cd crates/fda
cargo install --path .Once the fda binary is installed, you can enable shell command completion for fda
by adding the following line to your shell init script.
- Bash
echo "source <(COMPLETE=bash fda)" >> ~/.bashrc- Elvish
echo "eval (COMPLETE=elvish fda)" >> ~/.elvish/rc.elv- Fish
echo "source (COMPLETE=fish fda | psub)" >> ~/.config/fish/config.fish- Powershell
echo "COMPLETE=powershell fda | Invoke-Expression" >> $PROFILE- Zsh
echo "source <(COMPLETE=zsh fda)" >> ~/.zshrcTo connect to the Feldera manager, you need to provide the URL of the manager. You can either provide the URL as an
environment variable or as a command line argument. The environment variable is called FELDERA_HOST and the
command line argument is called --host.
If your Feldera instance requires authentication (not needed in the local docker form factor), you'll also need to
provide an API key. You can either set the API key as an environment variable or as a command line argument.
The environment variable is called FELDERA_API_KEY and the command line argument is called --auth.
It is recommended to use an environment variable configured in your shell init script to avoid storing the API
key in your shell history.
:::info
You can create a new API key by logging into the Feldera WebConsole. Once logged in, click on your profile in the top right. Go to Manage API Keys and click Generate new key.
:::
Specify the host and API key as command line arguments or environment variables:
fda --host https://try.feldera.com --auth apikey:0aKFj50iE... pipelines
export FELDERA_HOST=https://try.feldera.com
export FELDERA_API_KEY=apikey:0aKFj50iE...
fda pipelinesCreate a new pipeline p1 from a program.sql file:
echo "CREATE TABLE example ( id INT NOT NULL PRIMARY KEY );
CREATE VIEW example_count AS ( SELECT COUNT(*) AS num_rows FROM example );" > program.sql
fda create p1 program.sqlRetrieve the program for p1 and create a new pipeline p2 from it:
fda program get p1 | fda create p2 -sEnable storage for p1:
fda set-config p1 storage trueAdd Rust UDF code to p1:
fda program set p1 --udf-toml udf.toml --udf-rs udf.rsRun the pipeline p1:
fda start p1Start a transaction for p1:
fda start-transaction p1Commit a transaction for p1:
fda commit-transaction p1Retrieve the stats for p1:
fda stats p1Retrieve the latest log messages for p1:
fda logs p1Download the support bundle for p1:
fda support-bundle p1Shutdown and delete the pipeline p1:
fda shutdown p1
fda delete p1Execute ad-hoc SQL query:
fda exec pipeline-name "SELECT * FROM materialized_view;"
cat query.sql | fda exec pipeline-name -sYou can enter the fda shell for a pipeline by running the following command:
fda shell p1Within the shell, you can interact with the pipeline p1 by sending ad-hoc SQL queries to it.
The shell also lets you execute certain CLI commands like start, restart, shutdown without having to provide the
pipeline name every time. Type help for more information.