Skip to end of banner
Go to start of banner

SQL-file - 9.x

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 4 Next »

On this page

Description

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

  1. Security - it can be secured separately from the other SQL macros. 
    1. Using Macro Security for Confluence, more general users can be authorized to use this macro since the administrator controls what queries can be accessed.
    2. When not using Macro Security for Confluence, 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. 
  2. Simplified File Access - the modified parameter makes it easier to specify and read SQL from files.

Usage Parameters

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

file
(may be restricted)

(tick)
File

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

Output

Output format

Determines how the output is formatted:

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

Examples

Explore SQL Parameters

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

 

  • No labels