---
title: "Configure JSON data source in Advanced Table Viewer macro"
canonical: "https://support.appfire.com/space/TBL/3297017872/Configure%20JSON%20data%20source%20in%20Advanced%20Table%20Viewer%20macro"
format: markdown
---
> Macro (aura-html)

---

This page details how to connect to a JSON data source and configure the Advanced Table Viewer macro.

## Insert the macro

Insert the macro in a Confluence page using the macro browser or the macro shortcut (/).

![Advanced Tables macro shortcut for inserting Advanced Table Viewer](media://f7ceae17-ace1-496a-a35f-c7591fd7e928)

## **Connect data source**

- On the initial setup screen, click **Connect Data Source**.

![connect datasource](media://f3d0c47f-e753-4c17-baf7-c5559bf71de3)

- The *Select* *data source* dialog opens. By default, the CSV data connector is selected.
- For the JSON data connector, choose how you want to provide your JSON data. By default, **Upload file** is selected. Refer to [Configure the JSON data source](#Configure-the-JSON-data-source).
  - **Upload file**: Upload a JSON file from your computer.
  - **Attachment**: Use a JSON file attached to the current Confluence page.
  - **URL**: Provide a URL to your JSON file.
  - **Insert JSON**: Type or paste JSON code directly into the macro.

## Configure the JSON data source 

> Macro (refined-tabs)
> 
> > Macro (refined-tab)
> 
> The **Upload file** option lets you to use a JSON file from your computer.
> 
> - Once you select **Upload file,** the macro displays the **Upload a file** field.
> - To upload a JSON file, click **Browse**.
> - Select a JSON file not exceeding 10 MB from your computer.
>   
> - Once you choose the file, the **Row data path** field appears.
>   - Specify the JSON path to import data and generate a table. The path is case sensitive.
>   - The path can be a dot-separated path to the target field in the JSON string. For example: *Hardware.Storage*
>   - The data at this path will populate the table rows. [Learn more about JSON path syntax.﻿](https://goessner.net/articles/JsonPath/)
> 
> > ❌ If the JSON file contains formatting errors or exceeds 10 MB, the macro displays an error message.
> 
> - Once you specify the **Row data path**, the **Select columns **field displays the list of field names available at the specified path. For further configuration, proceed to the **Select and order columns** section on this page.
> 
> > Macro (refined-tab)
> 
> The Attachment option lets you to use a JSON file attached to the current Confluence page as your data source.
> 
> - Once you select **Attachment,** the macro displays the **Select page attachment **dropdown.
> - The **Select page attachment** dropdown lists the JSON files attached to the current page. Select the JSON file you want to use as your data source.
> - Once you choose the file, the **Row data path** field appears.
>   - Specify the JSON path to import data and generate a table. The path is case sensitive.
>   - The path can be a dot-separated path to the target field in the JSON string. For example: *Hardware.Storage*
>   - The data at this path will populate the table rows. [Learn more about JSON path syntax.﻿](https://goessner.net/articles/JsonPath/)
> 
> > ❌ If the JSON file contains formatting errors or exceeds 10 MB, the macro displays an error message.
> 
> - Once you specify the **Row data path**, the **Select columns **field displays the list of field names available at the specified path. For further configuration, proceed to the **Select and order columns **section on this page.
> 
> > Macro (refined-tab)
> 
> The URL option lets you use a JSON file URL as your data source.
> 
> - Once you select the **URL **option, the macro displays the **Paste file URL **field.
> - In the** Paste file URL** field, type or paste the direct URL to your JSON file and click **Import data**.
> 
> > ℹ️ The macro supports only a direct link to a JSON file.
> > ℹ️ 
> > ℹ️ :check_mark: [https://abc.example.com/taxables.JSON](https://abc.example.com/taxables.JSON)
> > ℹ️ 
> > ℹ️ :cross_mark: [https://abc.example.com/taxables_download](https://abc.example.com/taxables_download)
> 
> - Once you click **Import data** and the file downloads successfully, the **Row data path** field appears.
>   - Specify the JSON path to import data and generate a table. The path is case sensitive.
>   - The path can be a dot-separated path to the target field in the JSON string. For example: *Hardware.Storage.*
>   - The data at this path will populate the table rows. [Learn more about JSON path syntax.﻿](https://goessner.net/articles/JsonPath/)
> 
> > ❌ If the URL is invalid, or the JSON file contains formatting errors, or the file size exceeds 10 MB, the macro displays an error message.
> 
> - Once you specify the Row data path, the **Select columns **field displays the list of field names available at the specified path. For further configuration, proceed to the **Select and order columns** section on this page.
> 
> > Macro (refined-tab)
> 
> The Insert JSON option lets you use the JSON code directly in the macro. 
> 
> > ⚠️ Inserting a large amount of JSON code can affect the performance of your Confluence page. For large datasets, use the Upload file, Attachment, or URL option instead.
> 
> - Once you select **Insert JSON,** the macro displays the **Insert JSON text **field.
> - In the** Insert JSON text** field, enter or paste the JSON code.
> - Once you insert the JSON text, the **Row data path** field appears.
>   - Specify the JSON path to import data and generate a table. The path is case sensitive.
>   - The path can be a dot-separated path to the target field in the JSON string. For example: *Hardware.Storage.*
>   - The data at this path will populate the table rows. [Learn more about JSON path syntax.﻿](https://goessner.net/articles/JsonPath/)
> 
> > ❌ If the JSON code contains errors, the macro displays an error message.
> 
> - Once you specify the Row data path, the **Select columns **field displays the list of field names available at the specified path. For further configuration, proceed to the **Select and order columns** section on this page.
> 
> > Macro (refined-tab)
> 
> The **Select Columns** field displays the column names available to display in the table.
> 
> You can remove, select, and reorder the column names as needed. The column names appear in the Confluence table in the order you select them.
> 
> - **To clear all selected columns**
>   - To remove all column selections at once, click Clear All (:cross_circle: ). After clearing, click the field and re-select column names in the required order.
> - **To remove a specific column**
>   - Next to the column name, click :cross_circle: to remove it from the selection.
> - **To select columns**
>   - Click the **Select Columns** field and choose the column names from the dropdown. The order you select determines the column order in the table.
> 
> > ℹ️ The order in which you select the column names determines the column order displayed in the Confluence table.
> 
> Once you have selected the required columns, proceed to the **Save and publish **section on this page.
> 
> > Macro (refined-tab)
> 
> - In the *Select data source* dialog, click **Save**.
> - The macro opens in setup mode, displaying the table with the selected column names and data.
> - In setup mode, you can configure various features, such as column filtering, row styling, column grouping, search, row numbering, sorting, pagination, download, rename heading, and column and group calculations. Refer to [Set up the Advanced Table Viewer macro features](https://appfire.atlassian.net/wiki/spaces/TBL/pages/1765147138).
> - To apply the configurations, click **Save**.
> - The configured table appears on the Confluence page in edit mode.
> - **Publish** the page to view the table in the page view mode.
> 
> Your JSON data is now ready to view and analyse directly within Confluence.

> ℹ️ To know about the various terms used in the macro, refer to the <u>[Advanced Table Viewer macro glossary](https://appfire.atlassian.net/wiki/spaces/TBL/pages/1765245023)</u>.