> For the complete documentation index, see [llms.txt](https://docs.selfuel.digital/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.selfuel.digital/data-integration-with-nexus/nexus-elements/connectors/source/doris.md).

# Doris

> Doris source connector

### Key features[​](https://seatunnel.apache.org/docs/2.3.7/connector-v2/source/Doris#key-features) <a href="#key-features" id="key-features"></a>

* [x] &#x20;batch
* [ ] &#x20;stream
* [ ] &#x20;exactly-once
* [x] &#x20;schema projection
* [x] &#x20;parallelism
* [x] &#x20;support user-defined split

### Description[​](https://seatunnel.apache.org/docs/2.3.7/connector-v2/source/Doris#description) <a href="#description" id="description"></a>

Used to read data from Doris. Doris Source will send a SQL to FE, FE will parse it into an execution plan, send it to BE, and BE will directly return the data

### Supported DataSource Info[​](https://seatunnel.apache.org/docs/2.3.7/connector-v2/source/Doris#supported-datasource-info) <a href="#supported-datasource-info" id="supported-datasource-info"></a>

<table><thead><tr><th>Datasource</th><th>Supported versions</th><th>Driver</th><th>Url</th><th data-hidden>Maven</th></tr></thead><tbody><tr><td>Doris</td><td>Only Doris2.0 or later is supported.</td><td>-</td><td>-</td><td>-</td></tr></tbody></table>

### Data Type Mapping[​](https://seatunnel.apache.org/docs/2.3.7/connector-v2/source/Doris#data-type-mapping) <a href="#data-type-mapping" id="data-type-mapping"></a>

| Doris Data type                          | Nexus Data type                                                                                                                                           |
| ---------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- |
| INT                                      | INT                                                                                                                                                       |
| TINYINT                                  | TINYINT                                                                                                                                                   |
| SMALLINT                                 | SMALLINT                                                                                                                                                  |
| BIGINT                                   | BIGINT                                                                                                                                                    |
| LARGEINT                                 | STRING                                                                                                                                                    |
| BOOLEAN                                  | BOOLEAN                                                                                                                                                   |
| DECIMAL                                  | <p>DECIMAL((Get the designated column's specified column size)+1,<br>(Gets the designated column's number of digits to right of the decimal point.)))</p> |
| FLOAT                                    | FLOAT                                                                                                                                                     |
| DOUBLE                                   | DOUBLE                                                                                                                                                    |
| <p>CHAR<br>VARCHAR<br>STRING<br>TEXT</p> | STRING                                                                                                                                                    |
| DATE                                     | DATE                                                                                                                                                      |
| <p>DATETIME<br>DATETIME(p)</p>           | TIMESTAMP                                                                                                                                                 |
| ARRAY                                    | ARRAY                                                                                                                                                     |

### Source Options[​](https://seatunnel.apache.org/docs/2.3.7/connector-v2/source/Doris#source-options) <a href="#source-options" id="source-options"></a>

| Name                             | Type   | Required | Default    | Description                                                                                         |
| -------------------------------- | ------ | -------- | ---------- | --------------------------------------------------------------------------------------------------- |
| fenodes                          | string | yes      | -          | FE address, the format is `"fe_host:fe_http_port"`                                                  |
| username                         | string | yes      | -          | User username                                                                                       |
| password                         | string | yes      | -          | User password                                                                                       |
| database                         | string | yes      | -          | The name of Doris database                                                                          |
| table                            | string | yes      | -          | The name of Doris table                                                                             |
| doris.read.field                 | string | no       | -          | Use the 'doris.read.field' parameter to select the doris table columns to read                      |
| query-port                       | string | no       | 9030       | Doris QueryPort                                                                                     |
| doris.filter.query               | string | no       | -          | Data filtering in doris. the format is "field = value",example : doris.filter.query = "F\_ID > 2"   |
| doris.batch.size                 | int    | no       | 1024       | The maximum value that can be obtained by reading Doris BE once.                                    |
| doris.request.query.timeout.s    | int    | no       | 3600       | Timeout period of Doris scan data, expressed in seconds.                                            |
| doris.exec.mem.limit             | long   | no       | 2147483648 | Maximum memory that can be used by a single be scan request. The default memory is 2G (2147483648). |
| doris.request.retries            | int    | no       | 3          | Number of retries to send requests to Doris FE.                                                     |
| doris.request.read.timeout.ms    | int    | no       | 30000      |                                                                                                     |
| doris.request.connect.timeout.ms | int    | no       | 30000      |                                                                                                     |

#### Tips[​](https://seatunnel.apache.org/docs/2.3.7/connector-v2/source/Doris#tips) <a href="#tips" id="tips"></a>

> It is not recommended to modify advanced parameters at will

### Task Example[​](https://seatunnel.apache.org/docs/2.3.7/connector-v2/source/Doris#task-example) <a href="#task-example" id="task-example"></a>

> This is an example of reading a Doris table and writing to Console.

```
env {
  parallelism = 2
  job.mode = "BATCH"
}
source{
  Doris {
      fenodes = "doris_e2e:8030"
      username = root
      password = ""
      database = "e2e_source"
      table = "doris_e2e_table"
  }
}

transform {
    # If you would like to get more information about how to configure nexus and see full list of transform plugins,
    # please go to transform page
}

sink {
    Console {}
}
```

Use the 'doris.read.field' parameter to select the doris table columns to read

```
env {
  parallelism = 2
  job.mode = "BATCH"
}
source{
  Doris {
      fenodes = "doris_e2e:8030"
      username = root
      password = ""
      database = "e2e_source"
      table = "doris_e2e_table"
      doris.read.field = "F_ID,F_INT,F_BIGINT,F_TINYINT,F_SMALLINT"
  }
}

transform {
    # If you would like to get more information about how to configure nexus and see full list of transform plugins,
    # please go to transform page
}

sink {
    Console {}
}
```

Use 'doris.filter.query' to filter the data, and the parameter values are passed directly to doris

```
env {
  parallelism = 2
  job.mode = "BATCH"
}
source{
  Doris {
      fenodes = "doris_e2e:8030"
      username = root
      password = ""
      database = "e2e_source"
      table = "doris_e2e_table"
      doris.filter.query = "F_ID > 2"
  }
}

transform {
    # If you would like to get more information about how to configure nexus and see full list of transform plugins,
    # please go to transform page
}

sink {
    Console {}
}
```
