vigneshwar
vigneshwar

Reputation: 161

How do we filter out tables and provide for source jdbc connector to fetch data

I'm aware of providing table.whitelist property to fetch data from whitelisted tables. Now, in our database we need to extract data from tables whose table names are in some format.

For example, my database may contain tables as :-

cus_01
emp_01
cus_02
emp_02

And need to extract tables which as 01 at end (i.e.,cus_01 and emp_01).

How can I achieve it

Upvotes: 1

Views: 252

Answers (1)

Achyut Vyas
Achyut Vyas

Reputation: 501

You can provide regex for table.whitelist or table.include.list properties.

For your use case, you can use the following properties to include those tables which end with 01

"table.include.list": "^(Database_name.)(.+01)"

Upvotes: 1

Related Questions