# Using TiDB Lightning - Data Filtering

__*Using Lightning*__
__*Lightning data filtering*__

+ Command line
+ profiles

```
./tidb-lightning -f 'foo*.*' -f 'bar*.*' -d /tmp/data/ --backend tidb


[mydumper]
filter = ['foo*.*', 'bar*.*']
```
-------------------------------------------------------------
The TiDB data migration tool works on all databases by default, but in actual use, it often only works on a subset of them. For example, a user wants to work only with tables of the form Foo*and bar*, without having to work with other tables.

Starting with TiDB 4.0, all TiDB data migration tools use a common filtering syntax to define subsets. This document describes how to use the table library filtering feature.