Now you will write a real analysis script and execute it. The agent will create a .do file — a script in the language used by StataTM — and run it through dodo, which compiles it to SQL and executes it on DuckDB.
Stata is a registered trademark of StataCorp LLC. This platform is not affiliated with or endorsed by StataCorp.
When you run a .do file, this happens:
dodoc compiles the .do file to SQL (DuckDB dialect)This is deterministic — same input, same output, every time. No model involved in the execution. The agent writes the code; dodo runs it.
.do file that summarizes trade values by country.src/summary_by_country.do (analysis scripts belong in src/).``
Prompt to copy:
Write a .do file at src/summary_by_country.do that imports data/trade_data.csv, collapses trade_value by country, sorts by trade_value, and lists the result. Then run it.
`
`stata
* Summarize trade data by country
import delimited "data/trade_data.csv", clear
collapse (sum) trade_value, by(country)
sort trade_value
list
`
Note: the path to the CSV is relative to the workspace root, not to the src/ directory. The dodo tool runs from the workspace root.
file exists at src/summary_by_country.do. and it returned successfully.