datamodel.get_data
datamodel_get_dataRetrieve data from a data model table with an optional SQL query to filter rows. Returns a list of dicts that can be converted to a dataframe.
Instructions
Retrieve data from a specific table in a data model. Runs a SQL query against the data model and returns the rows in a row-based format (a list of dicts) compatible with to_dataframe.
Returns: list[dict[str, Any]] | dict[str, Any] List of dictionaries where each dict represents a row — an empty list means the query genuinely returned no data. On failure, returns the standard ``{"ok": False, "error": "...", …
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | No | Optional SQL query to filter the data. When omitted, all rows of the table are selected. | |
| table_name | Yes | Name of the table to retrieve data from. | |
| datamodel_name | Yes | Name of the data model. |