# Configuration Section: Data Sources Configuration

+ **`route-rules:`** Use mapping rules in the `Routes Config` to match multiple upstream sharded tables
+ **`snapshot:`** Can use historical data for comparison

```
######################### ~!@Datasource config@!~ #########################
[data-sources]
[data-sources.mysql]
    host = "127.0.0.1"
    port = 3306
    user = "root"
    password = "mysql"
    route-rules = ["rule1", "rule2"]

[data-sources.tidb]
    host = "127.0.0.1"
    port = 4000
    user = "root"
    password = "tidb"
    snapshot = "386902609362944000"
```

-------------------------------------------------------------
`Database configuration` sample:
```
######################### Datasource config #########################
[data-sources]
[data-sources.mysql1] # mysql1 is the only custom ID for the database instance. It is used for the following `task.source-instances/task.target-instance` configuration.
    host = "127.0.0.1"
    port = 3306
    user = "root"
    password = ""

    # (optional) Use mapping rules to match multiple upstream sharded tables. Rule1 and rule2 are configured in the following Routes section.
    route-rules = ["rule1", "rule2"]

[data-sources.tidb0]
    host = "127.0.0.1"
    port = 4000
    user = "root"
    password = ""
    # (optional) Uses the snapshot feature. If enabled, historical data is used for comparison
    # snapshot = "386902609362944000"
```