Skip to end of banner
Go to start of banner

SQL File - 10.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 16 Next »

On this page

Description

The SQL File macro has parameters and behavior similar to the SQL macro. There are two primary reasons for using this macro: 

  • Security - it can be secured independently of the SQL and SQL attachment macros. If you are an administrator:
    • You can control the queries accessible to the general users who are authorized using the Macro Security for Confluence app.
    • If you are not using Macro Security for Confluence app, you can disable the SQL and SQL Query macros while allowing access to the SQL File macro. (As it allows users to query only a fixed set of statements.)
  • Simplified File Access — the modified parameter makes it easier to specify and read SQL from files.

Usage Parameters

Macro Editor LabelDefaultDescriptionParameter
Data source name
Specify the data source name. It represents an application server defined data source or a data source profile defined by your administrator. This field may be restricted. This is a mandatory field.dataSource
File

File path configured in the Confluence server home directory under the script directory. This is a mandatory field. This field may be restricted.

script
Output formatHTML

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 the parameter to true.
  • XHTML (Pro Edition) — Generates and renders XHTML from result set data. Data is HTML encoded unless encoding has been disabled (disableAntiXss).
output

For more information on Common SQL parameters, refer to working with SQL parameters.

Example: Use SQL Macro with Markup


  • No labels