# Get data of database master

<div align="left"><figure><img src="/files/ejBZZeDrq5sOKCU38C1E" alt=""><figcaption></figcaption></figure></div>

The image used in the following description is an image of PostgreSQL linkage. \
Other database linkage has the same screen configuration.

## Function overview

* Database data retrieval is linked from the database to the i-Reporter using the ConMas Gateway.\
  This function creates an action file for a Gateway to be used in conjunction with a master selection cluster Gateway.

<table><thead><tr><th>Cooperation direction</th><th width="241.33333333333331">Function description</th><th>Execution timing</th></tr></thead><tbody><tr><td>Database→i-Reporter linkage</td><td>Use the ConMas Gateway to get the database data into a selection master cluster of i-Reporter reports.</td><td>Retrieve master selection cluster data for i-Reporter</td></tr></tbody></table>

## Steps for mapping settings

Follow the steps below to set the mapping.

### 1. Selecting a connection pattern with database

* Click the **get data of database master** menu to add a new mapping.

<figure><img src="/files/63PHaEOKn119i5iDrsrc" alt=""><figcaption></figcaption></figure>

### 2. Mapping code/name setting

* Set the **mapping code** and **mapping name**.
* A mapping code is the **key that uniquely identifies all mapping configurations within the i-Repo Link environment**.

<figure><img src="/files/GGJr8dCo2t3ivtoHy46x" alt=""><figcaption></figcaption></figure>

### 3. Select the data sources and tables/views as the source of linkage

* Select the database **data source** and **table or view** as the source of linkage.

<figure><img src="/files/bmC6PebvzntIe7ZUTMNy" alt=""><figcaption></figcaption></figure>

* Refer to the following page to add and configure data sources.

{% content-ref url="/pages/Mr8iIh9WBLvgsGDHpX6I" %}
[Data source management](/i-repo-link-manual/english/system/2/1.md)
{% endcontent-ref %}

### 4. Create a field configuration for the master data to be retrieved from the database

* Create a field configuration for the master data to be used in ConMas Designer to connect the Gateway for the master selection cluster. (creating a custom master table layout)

<figure><img src="/files/9847qsDTv3vE8SVzjydo" alt=""><figcaption></figcaption></figure>

### 5. Setting up Gateway

* **Download the action file** for the ConMas Gateway or **place the action file on the Gateway server**. \
  If you want to place the action file on the Gateway server, please configure ConMas Gateway setting in the system in advance.&#x20;
* The Gateway Settings of the master selection cluster of the corresponding form will not be updated from i-Repo Link. \
  Configure **the Settings in ConMas Designer using the created action file**.

<figure><img src="/files/yX9He46lMUV2z7Sdl0l4" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
**ConMas Gateway Config file to use "deploy to Gateway" button**

You need to use ConMas Gateway 2.1.230200 or later. \
Please change the Config file of the ConMas Gateway. \
Default location of Config file: C:\ConMas\gateway\ Config \default.json \
Open the Config file with a notepad etc. and add the "runMode" Settings described at the end of the following.&#x20;

**default.json file setting**

```json
{
  "port": 3000,
  "ssl": false,
  "sslkey": "./ssl/cert.key",
  "sslcert": "./ssl/cert.pem",
  "authType": "default",
  "token": "token",
  "pythonShell": {
    "mode": "text",
    "encoding": "utf8",
    "pythonOptions": ["-X", "utf8"]
  },
  "uploadFileTypes": {
    "binary": "bmp;gif;jpg;tif;png;wav",
    "text": ""
  },
  "customMaster": {
    "limit": 500
  }
  Add from here (add a comma at the beginning)
  ,
    "runMode": {
    "maintenance": true
  }
  So far.
}
```

{% endhint %}


---

# Agent Instructions: 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://cimtops.gitbook.io/i-repo-link-manual/english/menu/get-data-of-database-master.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.
