Versions Compared

Key

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


Div
idProductTOC

On this page

Table of Contents
maxLevel1
excludeOn this page
typeflat
separatorpipe

...

ParameterMacro ParameterDefaultDescription
Limit rows processedlimitNo limit

The maximum number of rows that will be processed and displayed by SQL macros. This prevents queries that result in a large number of rows from using excessive resources. Individual queries can use the limit parameter to override this value. The following options are available for selection:

  • No limit
  • 250 - Recommended
  • 500
  • 1000
  • 2500
  • 5000
  • 10000
  • 15000
Limit query timequeryTimeoutNone

The number of seconds that a query can take before we force a timeout. This prevents queries that take too long from impacting other users. Individual queries can use the queryTimeout parameter to override this value. 

Info

Note, this parameter:


Limit max activemaxActiveNooneUsed to limit the number of actively executing SQL queries for a specific data source. Once the maximum active limit is reached, the next requested render of a sql macro using the specific data source will return an error message instead of trying to connect to the database. See this article for additional information.
Show sql optionsshowSqlOptionsNoneSince 6.4. A comma separated list of code or code-pro (Code Pro Macro) parameters used when Show SQL is selected. This allows for customization of how the SQL code is shown. See How to improve the display of SQL source.
Connection propertiesconnectionPropertiesNoneA list of driver specific properties passed to the driver for creating connections. Each property is given as name=value, multiple properties are separated by semicolons (;). See Apache Tomcat JNDI resources.
Initial SQLsinitalSql<n>None

SQL that is run after the SQL connection is established where n is a number (1, 2, 3, ...). Multiple initial SQL statements are allowed to support databases that only allow single SQL statements. Example use for Oracle:

Code Block
languagetext
initialSql1=ALTER SESSION SET NLS_TERRITORY = GERMANY|initialSql2=ALTER SESSION SET NLS_LANGUAGE = GERMAN

No results are kept and any errors will generate a macro exception. Using beforeSql is recommended for Postgres and other database that support multiple sql statements as it is more efficient than multiple separated actions.

Before SQLbeforeSqlNoneSQL that is added before Macro defined SQL.
After SQLafterSqlNoneSQL that is added after Macro defined SQL.

...

Info

Note: The connection status (tick) indicates that the connection information supplied for the Data Source Profile will allow connections from Confluence to the targeted database. This does not indicate that the Data Source Profile is in use by any Macros on Confluence pages

Modify Data Source Profiles

To view, add, or modify a Data Source Profile:

  1. Log in as a user with the Confluence Administrators Global Permission.
  2. Select Add-ons from the Administration menu (cog icon: Image Added) at the top right of your screen. Then scroll down to Bob Swift Configuration on the left-hand nav bar and choose SQL Configuration (see: Image Added).
  3. Select View and Modify Data Source Profiles (see: Image Added ) from the top navigation.
  4. You will see a list of Data Source Profiles and their connection status.
  5. Click on the edit link to the right of the Data Source Profile you would like to modify.
  6. The edit dialog will appear and will default to the "By connection string" view. You can edit in place or toggle to the "Simple" setup type and make necessary changes.
  7. To save changes, click on the Next button (see: Image Added) and then the Save Profile (see: Image Added) button.

Security

Data sources are shared resources. Some of these resources may need to be secured for use only by specific users or groups. This can be accomplished by using CMSP and configuring access to the macro and perhaps to individual profiles. 

...