fusion_run_query
Run read-only SQL SELECT queries on Oracle Fusion Cloud data. Substitutes lexical parameters and enforces a row cap for safe result exploration.
Instructions
Run a read-only SQL SELECT -- ONLY on a pod that substitutes lexical parameters.
Check whether this tool can work here before you use it. It ships the
statement as a lexical BI Publisher parameter, and a Fusion pod that has
lexical substitution disabled (the common SaaS hardening, and the case this
server was built for) silently drops it: the data model then executes
SELECT * FROM () and Oracle answers ORA-00903. No rewrite of your SQL fixes
that, so do not enter a repair loop -- the failure hint says so explicitly
when it sees that signature.
The working path on such a pod is the report registry: call
fusion_list_reports to see what an administrator has already built, then
fusion_run_report to run one with bind values and fusion_validate_report
to check it. Schema exploration works either way.
If your pod does honour lexicals, this is the full free-SQL surface. The
statement must be a single SELECT or WITH; anything else is rejected before it
leaves this machine, and a row cap is appended automatically unless the SQL
already limits rows. Give every selected expression a simple alias
(SUM(x) AS TOTAL_AMOUNT) -- result columns become XML element names, and
unaliased expressions can produce an unparsable document.
Args:
sql: The SELECT/WITH statement to execute.
datasource: Configured datasource key (default: the server's default).
max_rows: Row cap for this call, clamped to the server's hard maximum.
timeout_s: Per-call timeout in seconds.
select_list: engine_mode: clauses only -- the projection without SELECT.
from_clause: engine_mode: clauses only -- the FROM body without FROM.
where_clause: engine_mode: clauses only -- including the WHERE keyword.
group_clause: engine_mode: clauses only -- including GROUP BY/HAVING.
order_clause: engine_mode: clauses only -- including ORDER BY/FETCH.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sql | No | ||
| max_rows | No | ||
| timeout_s | No | ||
| datasource | No | ||
| from_clause | No | ||
| select_list | No | ||
| group_clause | No | ||
| order_clause | No | ||
| where_clause | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||