Coming from…
Coming from SQL, pandas or dbt
If you work in SQL, pandas, Polars or dbt, you already know every step Locra offers. The nodes are those steps with a form in front of them. Underneath, each node is code you can read, and you can always drop back to writing SQL or Python yourself.
What feels familiar
- It runs on DuckDB. Most nodes run as DuckDB SQL, so DuckDB functions and types behave the way you expect. The Metadata tab shows each column's DuckDB type.
- Write SQL when it's faster. A DuckDB Query node takes any query, CTEs and window functions included.
- Python is one click away. Every node's code is Python. Click the pencil to edit it by hand, or use a Custom Node for your own function. A Code Gen node writes the Python from a plain-language description.
- Your workflow can leave the app. Export as Python library turns the project into an installable Python package. One call runs the whole workflow, and each node can be imported on its own.
What's different
- Edges replace
ref()and variable names. You wire one node's output to the next instead of naming tables. - Every step keeps its result. Select any node to see its rows under the canvas. Run recomputes only the nodes that are out of date, so you don't re-run a whole notebook to check one step.
- Tests are nodes too. dbt-style tests become Assert (stops the run) or Expectations (reports, never stops).
- No upserts yet. Write to DB replaces or appends a table.
MERGEandON CONFLICThave no equivalent yet.
SQL/pandas names in Locra
You don't need this table open while you work. Type a SQL/pandas name into the add-node menu (right-click the canvas) or the command palette (⌘K, Ctrl+K on Windows). The matching Locra node shows up with a small chip, such as SQL/pandas: GROUP BY, so you learn our name as you go.
SQL
pandas and Polars
dbt
| SQL/pandas name | Locra |
|---|---|
| ref | Wire an edge from the upstream node instead |
| source | DB Reader or CSV Reader |
| seed | CSV Reader or Constant Table |
| materialized='table' | Write to DB |
| dbt run | The Run button (⌘↵), or Run pipeline in ⌘K |
| dbt test | Assert or Expectations |
| not_null | Assert or Expectations |
| unique | Distinct or Assert |
| accepted_values | Assert or Expectations |
| relationships | Join or Assert |
| recency | Assert or Expectations |
| unique_combination_of_columns | Assert or Expectations |
| generate_surrogate_key | Surrogate Key or Row Hash |
| date_spine | Generate Series or Densify |
| snapshot | Compare Tables or Row Hash |
| dbt Cloud job | Deploy & schedule to cloud (Cloud runs) |
| dbt docs generate | Lineage is the canvas itself; see docs per node |
No equivalent yet
Some SQL/pandas tools have no Locra node yet. Searching for them shows a hint instead of an empty list. These are the ones you are most likely to miss:
| SQL/pandas name | What to do instead |
|---|---|
| MERGE INTO | Upsert not supported yet; Write to DB can replace or append |
| ON CONFLICT | Upsert not supported yet; Write to DB can replace or append |
| GROUPING SETS | Run several Aggregate nodes and stack them with Union |
| ROLLUP | Aggregate at each level, then Union the results for subtotals |
| CUBE | Aggregate per combination, then Union; or write it in DuckDB Query |
| CREATE MACRO | Put reusable SQL in a DuckDB Query node |
| EXPLAIN | No query plan view; each node's SQL is visible in its code |
| cumprod | No cumulative product; use a Multi-row Formula ([Row-1:col] * x) |
| get_dummies | No one-hot node yet; Pivot with count, or a DuckDB Query |
| read_feather | Convert to Parquet first; Feather isn't read yet |
| read_fwf | No fixed-width reader; read lines as CSV then Split to Columns |
| read_sas | SAS files aren't supported; export to CSV first |
| insert_by_period | Loop over periods and append with Write to DB |
| get_query_results_as_dict | Use the node's output table directly; no Jinja templating |
Tips
- Search by function name. Typing
melt,QUALIFYormerge_asoffinds Unpivot, Filter and As-of Join. - Use a query node as a bridge. Paste a query you already trust into a DuckDB Query node to get going, then split it into nodes where seeing each step's output helps.
- Read the code a node runs. Select a node and open the Code tab to see its Python. Click the pencil there to edit it, and the node runs your version; Revert to generated code in the Attributes panel brings back the generated code.
- Take it to production as a package. Export as Python library gives you a package you can install with pip. Credentials are never written into it: they come from environment variables, listed in an example file next to the package.