Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.



On this page

Table of Contents
excludeOn this page
separator |


This macro has similar parameters as the SQL Macro and the SQL macro and behaves similarly in most cases. There are 2 two primary reasons for using sql-file:

  • Security — it can be secured separately from the other SQL macros. 
    • Using CMSP, more general users can be authorized to use this macro since the administrator controls what queries can be accessed.
    • When not using CMSP, the administrator can disable the sql and sql-query macros and still allow the sql-file macro since it has a fixed set of queries that can be run. 
  • Simplified File Accessfile access — the modified parameter makes it easier to specify and read SQL from files.


ParameterRequiredDefaultMacro Browser LabelDescription
Data Sourcesource
(may be restricted)
Data Source NameSpecify the Data Source data source name. It represents an application server defined Data Source or Data Source Profile defined defined data source or data source profile defined by your administrator.

(may be restricted)


File path in the configured Confluence server home directory under the script directory.


Output format

Determines how the output is formatted:

  • HTML — Generates  — Generates HTML from the result set data. Data is HTML encoded unless encoding has been disabled.
  • wiki — Generates  — Generates and renders wiki markup from result set data. If the data might contain unintended wiki markup characters, set the escape parameter to the escape parameter as true.
  • XHTML (Pro Edition) — Generates and renders XHTML from result set data. Data  Data is HTML encoded unless encoding has been disabled (disableAntiXss).
  • unrenderedWiki (Pro Edition) — Generates wiki markup from result set data, similar to to wiki, without rendering. Wraps with a table-plus macro  macro suitable for copying to another system.

For more information on Common common SQL parameters, refer to Working with SQL parameters - 9.x.


Children Display

Explore SQL



The SQL Macro -file macro has dozens of built-in parameters that you can explore and apply.