- Subscribe to RSS Feed
- Mark Question as New
- Mark Question as Read
- Float this Question for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
How can i add multiple TableNamePattern in ListDatabseTable processor in NiFi (HDF) ?
Created on ‎02-20-2017 12:23 PM - edited ‎08-19-2019 04:04 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have around 400 tables in a SQL server database, out of which i want to list 10 tables from ListDatabaseTables processor in Apache NiFi in HDF. These 10 tables doesn't have a fix naming pattern.
When i am trying to add multiple tables with semicolon as separation in value of TableNamePattern property, the processor is not able to detect the tables. While the same works absolutely fine with single TableNamePattern value.
Refer to screen shots:
1st processors works fine whereas 2nd processor is not able to search the tables.
Any other suggestion to import data from 10 tables(not having a fix naming pattern) out of 400-500 tables through NiFi will be highly appreciated.
Created on ‎09-09-2017 10:50 PM - edited ‎08-19-2019 04:03 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @Praveen Singh,i got other solution for your case.
1. The results from ListDatabaseTables processor will have individual flowfiles with db.table.name, db.table.fullname attributes associated with each flow file.
2. You can take advantage of either of those attributes in RouteonAttribute processor by using the property as follows...
${db.table.name:in("tablename1","tablename2",.....,"tablename10")}
and mention the list of required table names in the expression to filter out the required table names from the results of ListDatabaseTables processor.
Flow screenshot:-
RouteonAttribute configs:-
