> For the complete documentation index, see [llms.txt](https://developer.collibra.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.collibra.com/api/guides/introduction/the-output-module-query-language/map-the-results-to-a-tabular-format.md).

# Map the results to a tabular format

The Output Module supports a tabular output format and uses a different kind of `ViewConfig`, called `TableViewConfig`. `TableViewConfig` has a `Columns` mapping section that assigns each selected field to a column. The previous examples use the `ViewConfig` as input to the API to produce a JSON tree format.

The following example uses `TableViewConfig`. This is available under the same `{{domain}}/rest/2.0/outputModule/export/json` endpoint, just using the `TableViewConfig` as the JSON payload.

{% tabs %}
{% tab title="JSON" %}

```json
{
  "TableViewConfig": {
    "displayLength": 5,
    "displayStart": 10,
    "Resources": {
      "Community": {
        "Id": { "name": "communityId" },
        "Name": { "name": "communityName" },
        "Description": { "name": "communityDescription" }
      }
    },
    "Columns": [
      { "Column": { "fieldName": "communityId" } },
      { "Column": { "fieldName": "communityName" } },
      { "Column": { "fieldName": "communityDescription" } }
    ]
  }
}
```

{% endtab %}

{% tab title="YAML" %}

```yaml
---
TableViewConfig:
  displayLength: 5
  displayStart: 10
  Resources:
    Community:
      Id:
        name: "communityId"
      Name:
        name: "communityName"
      Description:
        name: "communityDescription"
  Columns:
  -
    Column:
      fieldName: "communityId"
  -
    Column:
      fieldName: "communityName"
  -
    Column:
      fieldName: "communityDescription"
```

{% endtab %}
{% endtabs %}

When formatted, this query produces an array of rows, each containing the requested columns.

```json
{
    "iTotalDisplayRecords": 48,
    "iTotalRecords": 5,
    "aaData": [
        {
            "communityId": "12345678-0006-0000-0000-000000000000",
            "communityName": "Simple Community 6",
            "communityDescription": ""
        },
        {
            "communityId": "12345678-0007-0000-0000-000000000000",
            "communityName": "Simple Community 7",
            "communityDescription": ""
        },
        {
            "communityId": "12345678-0008-0000-0000-000000000000",
            "communityName": "Simple Community 8",
            "communityDescription": ""
        },
        {
            "communityId": "12345678-0009-0000-0000-000000000000",
            "communityName": "Simple Community 9",
            "communityDescription": ""
        },
        {
            "communityId": "12345678-0010-0000-0000-000000000000",
            "communityName": "Simple Community 10",
            "communityDescription": ""
        }
    ]
}
```

{% hint style="info" %}
Because the `Columns` mapping determines what should be returned, setting `hidden: true` on a property has no effect in a `TableViewConfig`.
{% endhint %}

In the following example, the "displayLength" value is set to 0. This query shows the number of entities without retrieving actual results.

{% hint style="info" %}
The JSON Data Table output contains the total number of available records in Collibra for this query, which is `iTotalDisplayRecords`. It also contains the number of records returned in this set, which is `iTotalRecords`.
{% endhint %}

```json
{
    "iTotalDisplayRecords": 48,
    "iTotalRecords": 0,
    "aaData": []
}
```

You can use the `TableViewConfig` queries with the following endpoints:

* `{{domain}}/rest/2.0/outputModule/export/{{json | csv}}`
* `{{domain}}/rest/2.0/outputModule/export/{{json | csv | excel}}-file`
* `{{domain}}/rest/2.0/outputModule/export/{{json | csv | excel}}-job`


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://developer.collibra.com/api/guides/introduction/the-output-module-query-language/map-the-results-to-a-tabular-format.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
