CLI
The CLI library provides access to data lineage directly from the console. It also allows you to manually create, update, and delete Nodes and Edges from yaml files.
Install the CLI and configure your default server credentials (they will be the same as the credentials used for the Client).
Grai uses OS specific search paths to find it's configuration file
- macOS:
~/.config/graiand~/Library/Application Support/grai - Unix:
~/.config/graiand/etc/grai - Windows:
%APPDATA%\graiwhere the APPDATA environment variable falls back to%HOME%\AppData\Roamingif undefined
pip install grai-cli
grai config initTo confirm that your settings are working with your server:
grai client is_authenticatedThe Grai CLI has a range of commands to explore your data. For more details type
grai --helpTo apply a configuration by file name:
grai apply <file name>You can also use the flag --d for a dry run before committing your changes.
To adjust or view config settings which were set above use the config command, for instance to view your settings:
grai config viewTo get details about your lineage, such as querying for nodes and edges, use "grai get [noun]". For example, if you wanted to query for all of the nodes in your graph you would type
grai get nodesor if you wanted to search for a specific node named "customer.name" you would instead
grai get nodes customer.name