Transforming Confluence Tables into SQL Queries: A Step-by-Step Guide
Confluence, an Atlassian collaboration software, allows teams to create and share tables, but sometimes you might need to extract this data for further analysis or manipulation using SQL. This guide will walk you through transforming Confluence tables into SQL queries, using a simple example.
Understanding Confluence Tables
Confluence tables are easy to create and manage, with columns for data and rows for entries. They can contain various data types, including text, numbers, and even links. To extract data from a Confluence table, you'll first need to understand its structure.
Table Structure
- Columns: Each column represents a field in your table. For example, in a 'Employees' table, you might have columns like 'ID', 'Name', 'Role', and 'Department'.
- Rows: Each row represents a record or entry in your table. In our 'Employees' example, each row would contain data for one employee.
Extracting Data from Confluence Tables
Before you can transform your Confluence table into an SQL query, you'll need to extract the data. You can do this manually by copying and pasting, or use a tool like the Confluence REST API to automate the process.

Manual Extraction
To extract data manually, simply copy the table from Confluence and paste it into a text editor or spreadsheet. This will give you a clear view of the data and its structure.
Automated Extraction using Confluence REST API
The Confluence REST API allows you to extract data programmatically. You can use this to pull tables from Confluence and save them as CSV or JSON files, which can then be imported into a database.
Transforming Confluence Tables into SQL Queries
Now that you have your data extracted, you can start transforming it into an SQL query. The structure of your SQL query will depend on the structure of your table and the type of data you're working with.

Creating the Table
Before you can insert data into your database, you'll need to create the table. The structure of your table should match the structure of your Confluence table. Here's an example of creating an 'Employees' table:
```sql CREATE TABLE Employees ( ID INT PRIMARY KEY, Name VARCHAR(50), Role VARCHAR(50), Department VARCHAR(50) ); ```
Inserting Data into the Table
Once your table is created, you can start inserting data from your Confluence table. Here's an example of inserting data from our 'Employees' table:
```sql INSERT INTO Employees (ID, Name, Role, Department) VALUES (1, 'John Doe', 'Software Engineer', 'Engineering'), (2, 'Jane Smith', 'Project Manager', 'Project Management'), (3, 'Mike Johnson', 'Data Analyst', 'Data Science'); ```
Querying Your Data
Now that your data is in your database, you can use SQL queries to retrieve and manipulate it. Here are a few examples of queries you might use:
- Selecting all data:
SELECT * FROM Employees;
- Selecting specific data:
SELECT Name, Role FROM Employees;
- Filtering data:
SELECT * FROM Employees WHERE Department = 'Engineering';
Conclusion
Transforming Confluence tables into SQL queries can seem daunting at first, but with a clear understanding of your table structure and a bit of practice, you'll be extracting and manipulating data like a pro. Whether you're working with a small team or a large organization, these skills can help you unlock the full potential of your data.
More Details
28.03.2023 ... I have 3 Confluence "sprint performance" tables with data pasted from Jira for sprint stories that are complete, incomplete, or removed, ...

Table Transformer is one of the macros bundled in the Table Filter, Charts & Spreadsheets for Confluence app. The macro allows you to merge and associate ...

SQL-Powered Table Transformer - a tool to transform/convert/analyze Confluence tables using SQL. Use full power of SQL. No need to have or setup a DB (macro ...
28.03.2019 ... The Table Transformer macro is included in the bundle of useful macros for tables processing of the Table Filter and Charts for Confluence ...

Insert the Table Transformer macro and paste the tables or the macros outputting tables within the macro body. Select the macro and click Edit. In the Presets ...

18.11.2022 ... Put three Jira macros on a Confluence page to fetch the relevant tables of A, B, and C data. Then wrap it in a table transformer macro, where I can (ala)SQL ...

07.08.2018 ... Please visit https://v-and-b.atlassian.net/wiki/spaces/PD/pages/229981/SQL+Table+Transformer+Macro+for+Confluence for detailed info An ...
04.02.2025 ... ... Table Transformer Macro, which relies on SQL queries based on another tab ... SQL queries based on another table from a different Confluence ...
13.10.2023 ... Solution: The Table Transformer macro allows you to merge and lookup tables. It can be applied to tables of any structure and length. The only ...
Insert the Table Transformer macro and paste the table or the macros outputting tables within the macro body. Select the macro and click Edit. In the Presets ...
Data filtering - filter table data by selecting the required value from the drop-down list under each column. · Column sorting · Data specific sorting · Column ...
04.02.2025 ... I need to extract data from a Confluence page that contains a table created using the Table Transformer Macro, which relies on SQL queries based on another ...

14.08.2025 ... Article content The SQL query panel in the Table Transformer macro. Here is a sample of the SQL I wrote for our use case. SELECT Status AS ...

17.09.2024 ... For example, SQL Server has an Algebrizer component. Oracle has their Query Transformer, and still other query engines have other names for this ...
Table Transformer is powered by the AlaSQL library. Find the list of SQL ... Applies Confluence Wiki Markup to table cells (see an example). 53 ...

Also, many plugins that we are using, for example Table Filter and Charts for Confluence. ... Table, Table Transformer, Chart from Table) in the new Confluence ...
28.06.2019 ... Pay attention to the deltaQuery attribute which has an SQL statement capable of detecting changes in the item table. Note the variable ${ ...

- Coordinator node ingests from a SQL table - There is a discriminator key ... SQL query. Dead simple design, extremely robust, very high throughput ...

23.08.2022 ... ... SQL database results on a Confluence page. It uses ScriptRunner for Confluence Server/Data Center which available for 30 days free at https ...
25.02.2022 ... Below you can find how Table Transformer helps to enhance the formatting abilities of tables in Confluence. ... SQL query. Keep the following ...
