Versions Compared

Key

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

This article helps you get find all the list of pages where the Advanced Tables SQL for Confluence macros are added to your confluence instance hosted on the server or data center.

...

Log in as Confluence Administrator and navigate to Cog wheel Cogwheel > General configuration > Administration > Macro Usage:

Image Removed

...

Under All macros, look out for the App name Bob Swift Atlassian Apps - Advanced TablesSQL(Pro Edition) for Confluence:Image Removed

...


Usage information using SQL queries:

As the Advanced Tables the SQL for Confluence has five three macros, you must execute the query for each macro to get the macro-level usage information. If the query returns any records, the output includes the the Title of the page and SpaceID of  and SpaceID of the relevant pages.

...

  • For the

    json-table

    sql macro, execute the following query:

    Code Block
    languagesqlthemeMidnight
    Select CONTENT.Title, CONTENT.SpaceID from CONTENT, BODYCONTENT
    WHERE PREVVER IS NULL AND (CONTENT.CONTENTTYPE = 'PAGE' OR CONTENT.CONTENTTYPE = 'BLOGPOST')
    
    AND CONTENT.CONTENTID = BODYCONTENT.CONTENTID
    
    AND (BODYCONTENT.BODY like '%<ac:structured-macro ac:name="json-tablesql"%');


    Results:

    2024-04-03_11-13-16.pngImage Added


  • For the

    table

    sql-

    plus

    query macro, execute the following query:

    Code Block
    languagesql
    themeMidnight
    Select CONTENT.Title, CONTENT.SpaceID from CONTENT, BODYCONTENT
    WHERE PREVVER IS NULL AND (CONTENT.CONTENTTYPE = 'PAGE' OR CONTENT.CONTENTTYPE = 'BLOGPOST')
    
    AND CONTENT.CONTENTID = BODYCONTENT.CONTENTID
    
    AND (BODYCONTENT.BODY like '%<ac:structured-macro ac:name="tablesql-plusquery"%');
    For the jql-table macro, execute the following query


    Results:

    Code Block
    languagesql
    themeMidnight
    Select CONTENT.Title, CONTENT.SpaceID from CONTENT, BODYCONTENT
    WHERE PREVVER IS NULL AND (CONTENT.CONTENTTYPE = 'PAGE' OR CONTENT.CONTENTTYPE = 'BLOGPOST')
     AND CONTENT.CONTENTID = BODYCONTENT.CONTENTID
     AND (BODYCONTENT.BODY like '%<ac:structured-macro ac:name="jql-table"%');
    For the attachment-table2024-04-03_11-12-26.pngImage Added


  • For the sql-file macro, execute the following query:

    Code Block
    languagesql
    themeMidnight
    Select CONTENT.Title, CONTENT.SpaceID from CONTENT, BODYCONTENT
    WHERE PREVVER IS NULL AND (CONTENT.CONTENTTYPE = 'PAGE' OR CONTENT.CONTENTTYPE = 'BLOGPOST')
     AND CONTENT.CONTENTID = BODYCONTENT.CONTENTID
     AND (BODYCONTENT.BODY like '%<ac:structured-macro ac:name="attachment-table"%');

    For the CSV macro, execute the following query:

    Code Block
    language
    sql
    themeMidnight
    Select CONTENT.Title, CONTENT.SpaceID from CONTENT, BODYCONTENT
    WHERE PREVVER IS NULL AND (CONTENT.CONTENTTYPE = 'PAGE' OR CONTENT.CONTENTTYPE = 'BLOGPOST')
     AND CONTENT.CONTENTID = BODYCONTENT.CONTENTID
     AND (BODYCONTENT.BODY like '%<ac:structured-macro ac:name="csv-file"%');

...


  • Results:

    2024-04-03_11-12-54.pngImage Added

Info

It is recommended to: 

  • Test the above queries in a test environment. The time taken to get the results is based on the number of pages where the macro has been used.

  • Run the query during the off-business hours to reduce any impact caused due to the run time of the query.

  • Queries have to be adjusted with syntax in databases.