Before you start
- Exploratory Desktop is running and the project is open (Choose a project). Check with expl status.
- The commands that create or change things (create-source, apply-step and the others in this page) work only when Allow create, edit and delete is on in System Settings > MCP / CLI.
- Running R (run-r), ai-wrangle and deleting steps ask for confirmation first. In a terminal, expl asks Continue? [y/N]. From a script or an AI agent, add
--yes. See Confirmation and long-running operations.
Steps
1. Check the file, then import it
For a local text file, check its beginning and format first.--head-bytes sets how much to read, and --encoding takes utf-8, shift_jis or auto.
To import, pass a name and an R script that returns the whole data frame. @file reads the script from a file (Pass arguments and JSON).
readr::read_csv("./sales_orders.csv"). To import from a data source plugin instead of a script, pass --source with a JSON object that has type, connection_id and params. For a database, run expl dataframe get-source-params to see what the plugin takes. To import a catalog item, the source types are local_catalog (params.item_id) and server_catalog (params.url).
2. Look at the data frame
3. Add a wrangling step
Ask for the parameters of the command first. The names that get-command returns are the only ones that work.--command is the operation, and --params is a JSON object that holds all of its settings.
--save-with-error keeps it as an error step. To insert a step before or after an existing one, pass --insert-position ‘{"side":"after","stepName":"<step name>"}’; without it the step is added at the end.
expl dataframe preview-steps tries changes on temporary objects and shows the effect without saving. Its arguments are in expl dataframe preview-steps --help.
4. Check the result
expl dataframe ai-wrangle --prompt "..." (add --run to add it as a step). It asks for confirmation. The step diagram and the other read commands are in Desktop commands.
If it fails
For the arguments of any command, run
expl <command> --help or expl tools describe "<command>".
