Created on 12-23-2020 09:18 AM - edited on 12-23-2020 05:18 PM by subratadas
Other times you need something easier for just some basic changes and inserts to some tables you are interested in receiving new data as events. Apache NiFi can do this easily for you with QueryDatabaseTableRecord. You don't need to know anything, but the database connection information, table name and what field may change. NiFi will query, watch state and give you new records. Nothing is hardcoded, parameterize those values and you have a generic 'Any RDBMS' to 'Any Other Store' data pipeline. We are reading as records, which means each FlowFile in NiFi can have thousands of records that we know all the fields, types and schema related information for. This can be ones that NiFi infers the schema or ones we use to form a Schema Registry like Cloudera's amazing Open Source Schema Registry.
Let's see what data is in our PostgreSQL table:
Add-Ons Examples
These records can be also manipulated ETL/ELT style with Record processing in stream with options such as:
When you use PutORC, it will give you the details on building your external table. You can do a PutHiveQL to auto-build this table, but most companies want this done by a DBA.
CREATE EXTERNAL TABLE IF NOT EXISTS `pricesorc` (`item_id` BIGINT, `price` DOUBLE, `created_on` BIGINT, `updated_on` BIGINT)
STORED AS ORC
LOCATION '/user/tspann/prices'
Let's reverse this now. Sometimes you want to take data, say from a REST service and store it to a JDBC datastore.
From ApacheCon 2020, John Kuchmek does a great talk on Incrementally Streaming RDBMS Data.
Created on 01-21-2021 07:08 AM
Hi timothy, will you please help me with this question