> 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/output-module/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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
