...
...
Scenario
Div | ||
---|---|---|
| ||
Estimated Time: 8 min |
In this scenario, we will let's insert the SQL Macro macro on a Confluence page by inserting Markup from the menu. Our SQL Macro will reference The SQL macro uses the SQL statement loaded into the body of the Macromacro.
Background
Our This scenario will use a Data Source Profile called "BookWarehouse" to uses a data source profile, BookWarehouse, to query a database table called ", PUBLISHERS". The table contains the following columns and rows:
Code Block | ||
---|---|---|
| ||
SQL > select * from publishers; +----+------+-------------------+-----------------+---------+ | id | rank | parent_company | company_name | revenue | +----+------+-------------------+-----------------+---------+ | 10 | 1 | Pearson | Pearson | 5000.00 | | 11 | 2 | Reed | RELXGroup | 4900.00 | | 12 | 3 | WoodbridgeCompany | ThompsonReuters | 4700.00 | | 13 | 4 | BertelsmannAG-NV | Bertelsmann | 4500.00 | | 14 | 5 | WoltersKluwer | WoltersKluwer | 4100.00 | +----+------+-------------------+-----------------+---------+ |
...
Info |
---|
For information about data source profiles, refer to:
|
The sample query against the PUBLISHERS table looks like:
Code Block | ||
---|---|---|
| ||
SELECT rank as "Worldwide Ranking", company_name as "Company", format(revenue,0) as "M Revenue" FROM publishers ORDER BY rank asc; |
Steps
The following steps will demonstrate demonstrates how to use Markup to insert the SQL Macro macro on a Confluence page.:
Table plus | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||
|
Explore Tutorials
We've prepared a number of of tutorials which demonstrate how to use our SQL Macros macros with the native Chart Macro macro.Tutorials