Member since
07-07-2022
42
Posts
2
Kudos Received
8
Solutions
My Accepted Solutions
| Title | Views | Posted |
|---|---|---|
| 5866 | 07-27-2022 12:05 PM | |
| 2583 | 07-25-2022 05:01 AM | |
| 1391 | 07-21-2022 02:03 AM | |
| 3136 | 07-21-2022 01:52 AM | |
| 1909 | 07-19-2022 10:48 AM |
07-12-2022
10:35 PM
@araujo I want to convert it to DateTime format like: 2021-10-17 15:58:58 not in timstamp. is there possible here to convert it to datetime formate like yyyy-MM-dd hh:mm:ss ?
... View more
07-12-2022
10:19 AM
Hi, I want to convert some of the field value like "enrolled_at":"Sun Oct 17 15:58:58 IST 2021" -> DateTime(2021-10-17 15:58:58) and "is_deleted":"{0}" -> boolean(true or false) from below Json array to save converted data in db. How i can achieve it in NiFi. [{"id":234521,"tenant_id":1,"product_id":1,"version":"3","user_id":197172,"user_ref_id":"8TS-0516","org_id":910,"org_subscription_id":7294,"access_code":null,"order_ref_id":null,"access_code_id":null,"enrol_type":"Admin4","enrolled_at":"Sun Oct 17 15:58:58 IST 2021","subscription_start_at":"Wed Oct 13 15:58:58 IST 2021","subscription_end_at":"Sat Oct 23 15:58:58 IST 2021","product_launched_at":"Wed Oct 13 16:05:49 IST 2021","product_completed_at":"Wed Oct 13 16:15:44 IST 2021","learning_completed_at":"Wed Oct 13 16:15:44 IST 2021","subscription_status":"ACTIVE","learning_status":"COMPLETED","total_credits":null,"completion_certificate_id":3585,"ecard_id":35867,"certificate_number":"tocubg3sfbkzfgfqslnisnci","ecard_number":"1hr5w9jkpikonazrfhqquauh","online_completion_date":"Wed Oct 13 16:08:07 IST 2021","offline_completion_date":"Wed Oct 13 16:15:44 IST 2021","ecard_date":"Tue Oct 31 16:15:44 IST 2023","is_deleted":"{0}","created_by":1,"updated_by":14302,"org_Name":"International Society","assignment_id":961,"last_activity_at":"Wed Oct 13 16:15:44 IST 2021","updated_at":"Wed Oct 13 16:15:44 IST 2021","source_lms":null,"course_instance_id":"20-3583"}]
... View more
Labels:
- Labels:
-
Apache NiFi
07-11-2022
11:06 AM
I tried again below expressions: 1. $.{enrolled_at:replaceAll('(IST)\s',''):toDate('EEE MMM dd HH:mm:ss yyyy'):format('yyyy-MM-dd HH:mm:ss')} // got error {enrolled_at:replaceAll does not exist. 2. ${enrolled_at:replaceAll('(IST)\s',''):toDate('EEE MMM dd HH:mm:ss yyyy'):format('yyyy-MM-dd HH:mm:ss')} // expression validation failling
... View more
07-11-2022
10:18 AM
I tried above conversion but I am getting below error. AvroSchema: { "name": "enrolled_at", "type": { "type":"int", "logicalType":"date"} }, ErrorLog: org.apache.nifi.serialization.MalformedRecordException: Successfully parsed a JSON object from input but failed to convert into a Record object with the given schema at org.apache.nifi.json.AbstractJsonRowRecordReader.nextRecord(AbstractJsonRowRecordReader.java:162) at org.apache.nifi.serialization.RecordReader.nextRecord(RecordReader.java:50) at jdk.internal.reflect.GeneratedMethodAccessor653.invoke(Unknown Source) Caused by: com.jayway.jsonpath.InvalidPathException: Function with name: {literal does not exist.
... View more
07-11-2022
08:36 AM
I have got solution for this.
... View more
07-11-2022
07:40 AM
I got solution for this. TableName : ${databaseName:equalsIgnoreCase("nrpsubscriptiondb2306"):and(${tableName:equalsIgnoreCase("status")}):ifElse("subscription_status",${databaseName:equalsIgnoreCase("nrpuserorgdb2306"):and(${tableName:equalsIgnoreCase("status")}):ifElse("user_org_status",${tableName})})}
... View more
07-11-2022
05:08 AM
Hi, How to insert or update a record in mySQL table if sourse db table name X and destination db table name Y using UpdateAttribute processor. I am able to achieve this if source and destination has single table but I have multiple table where source db table's names A,B and destination table's names Y,Z . I tried below condition but getting a error. schema.name : ${${databaseName}:equalsIgnoreCase(nrpsubscriptiondb2306):and(${tableName}:equalsIgnoreCase(status)):ifElse(subscription_status,${tableName})} Error log: due to Unexpected token ':' at line 1, column 76. Query: ${${databaseName}:equalsIgnoreCase(nrpsubscriptiondb2306):and(${tableName}:equalsIgnoreCase(status)):ifElse(subscription_status,${tableName})}
... View more
Labels:
- Labels:
-
NiFi Registry
07-08-2022
08:23 AM
I am getting String Date "Wed Oct 13 15:58:58 IST 2021" in changeCaptureMySql processor flowfile content out claim which is getting read from mysql-bin.log file as source DB data. Destination DB column has datatype DATETIME. I am using the JsonPathReader and AvroSchemaRegistry to read the each column data to save in db but it is giving data incorrect date-time value error. Q1. Is there any away I can convert String date time value to DATETIME to save it without error? Q2. How to define the DATETIME data type in AvroSchemaRegistry ?. I tried below data type in AvroSchemaRegistry but it won't work. Please find the attached screenshot for reference. { "name": "TIMESTAMP" , "type": { "type":"long", "logicalType":"timestamp-millis"} }, { "name": "DATE" , "type": { "type":"int", "logicalType":"date"} }
... View more
Labels:
- Labels:
-
Apache NiFi
07-08-2022
07:36 AM
I am reading the mysql mysql-bin.log file using captureChangeMySql processor. processor is ready the binarylog file and I see the processor flowfile content out claim data, it is giving BIT datatype value as "{}". Anyone can help here to get the right value in flowfile output for Bit datatype. Please find the captureChangeMySql processor configuration screenshot for reference. { "type": "update", "timestamp": 1657194900000, "binlog_filename": "mysql-bin.000020", "binlog_position": 37029, "database": "nrpsubscriptiondb2306", "table_name": "user_subscription", "table_id": 137, "columns": [ { "id": 29, "name": "is_deleted", "column_type": -7, "last_value": "{}", "value": "{}" }, ] }
... View more
Labels:
- Labels:
-
Apache NiFi
07-08-2022
06:11 AM
Hi , I am trying to automate data from 2 source DB to one destination DB where some the tables name of source DB is same but in destination DB I have given table name as soursceDBName_tableName. QA1-> How I can define common "table names" in changeCaptureMySql processor configuration when 2 source database has same tableName and columns and destination DB have different tableNames ? QA2-> Also how i can identify these tables that which data source it comes to save in right table in destination DB Ex. subscription DB(sourceDb1) -> status(tableName) userOrg DB(sourceDb2) -> stats(tableName) reportDb (destinationDB) -> subscription_status(TableName), userOrg(TableName). Please refer the screenshot for same.
... View more
Labels:
- Labels:
-
Apache NiFi
- « Previous
- Next »