Div | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||
On this page
|
...
Parameter | Macro Parameter | Default | Description | |||||
---|---|---|---|---|---|---|---|---|
Limit rows processed | limit | No 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:
| |||||
Limit query time | queryTimeout | None | 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.
| |||||
Limit max active | maxActive | Noone | Used 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 options | showSqlOptions | None | Since 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 properties | connectionProperties | None | A 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 SQLs | initalSql<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:
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 SQL | beforeSql | None | SQL that is added before Macro defined SQL. | |||||
After SQL | afterSql | None | SQL that is added after Macro defined SQL. |
...
Info |
---|
Note: The connection status 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:
- Log in as a user with the Confluence Administrators Global Permission.
- Select Add-ons from the Administration menu (cog icon: ) 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: ).
- Select View and Modify Data Source Profiles (see: ) from the top navigation.
- You will see a list of Data Source Profiles and their connection status.
- Click on the edit link to the right of the Data Source Profile you would like to modify.
- 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.
- To save changes, click on the Next button (see: ) and then the Save Profile (see: ) 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.
...