fusion_adhoc_query
Run a one-off SELECT on Oracle Fusion Cloud with bind parameters, returning rows via a temporary report that is deleted after execution.
Instructions
Run one ad-hoc SELECT by authoring an ephemeral report for it.
This pod refuses lexical substitution, so caller SQL cannot travel through
a fixed report -- instead this call turns the SQL into a report: a
data-model/report pair is created in the catalog, run once with your bind
values (parameter-echo verification included), and deleted again. Guarded
(read-only, deny-list), audited with the real SQL, and gated behind
fusion.allow_adhoc_queries in config.yaml.
Rules the statement must follow (they are the data-model rules):
Single SELECT/WITH, no trailing semicolon, read-only.
Alias every projection with a simple name -- aliases become the XML element names.
SELECT *is rejected; name the columns.Reference parameters as
:bindnames and pass a value for every one inbinds. Literals work too, but binds keep the audit trail honest.Explore first: fusion_list_tables / fusion_describe_table / fusion_search_columns / fusion_describe_flexfields, and read fusion_get_hints for the _TL/_F/_ALL join traps before joining anything.
Cost note: two catalog uploads + two deletes per call. If the same shape of question will be asked again, mint it once with fusion_author_report and run it as a registered report from then on.
Args:
sql: The SELECT. Every projection aliased; binds as :p_name.
binds: A value for every bind the SQL references, e.g.
{"p_from": "2026-01-01"}. No defaults exist here.
columns: Only needed when the select list defeats alias parsing;
normally derived from the SQL.
max_rows: Rows to return, clamped to the server's hard maximum.
timeout_s: Per-call timeout in seconds.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sql | Yes | ||
| binds | No | ||
| columns | No | ||
| max_rows | No | ||
| timeout_s | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||