Versions Compared

Key

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

Scenario

Div
classtime

Estimated Time: 10 min

In this scenario, we will add the SQL File macro to a Confluence page by inserting Markup from the menu. The SQL File macro references a file located within the <confluence-home>/script (default) directory on the Confluence server. 

...

Table plus
border0
heading0
multiplefalse
enableHeadingAttributesfalse
columnAttributesstyle="border:0;width=5%;",style="border:0;width=65%;",style="border:0;width=30%;max-width=30% !important;"
idsteps_table
enableSortingfalse
enableHighlightingfalse


Create a Confluence page

Create a Confluence page that contains a SQL File macro.

  1. Create a page named Classic Books in a space accessible to the desired audience.
  2. Click Save to save the new page.






Insert SQL File macro using the Insert markup menu

Edit the Classic Books page and:

  1. Select Insert markup from the Insert content list at the top.
  2. Type the following into the editor window. Note the dataSource name and file name referenced. 

    Code Block
     {sql-file:dataSource=BookWarehouse|file=books.sql}


  3. Click Insert to include your Markup within the page.
  4. Click Save to save your page and view your results.


Alternative method:

Edit the Classic Books page and:

  1. On the page, begin typing "{" (open parenthesis) and then type "sql-"
  2. Select "SQL File" from the available list of macros.
  3. The macro editor dialog will appear.
  4. Select "BookWarehouse" as the data source name.
  5. Type "books.sql" into the required "File" field.
  6. Click Save settings to insert your Markup within the page.

  7. Click Save to save your page and view your results.


How to Insert markup from the menu

Alternative method


Image Modified