You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by "Mahmoud Sabri (JIRA)" <ji...@apache.org> on 2017/05/16 06:50:04 UTC
[jira] [Comment Edited] (NIFI-3902) CaptureChangeMySQL returns null
column values if no DistributedMapCacheClient is selected
[ https://issues.apache.org/jira/browse/NIFI-3902?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16011834#comment-16011834 ]
Mahmoud Sabri edited comment on NIFI-3902 at 5/16/17 6:49 AM:
--------------------------------------------------------------
Hi Matthew,
After Enabling the "DistributedMapCacheServer and DistributedMapCacheClient" on my NiFi flow, I got the CDC of string columns (varchar type), however the column_types are coming as numbers, as following:
--------------------------------------------------------------------
[root@mariadb nxn]# more 22332926776927
{"type":"insert","timestamp":1494901773000,"binlog_filename":"master.000001","binlog_position":1495,"database":"mail","table_name":"users","tab
le_id":36,"columns":[{"id":1,"name":"id","column_type":4,"value":1},{"id":2,"name":"first_name","column_type":12,"value":"Ahmed"},{"id":3,"name
":"last_name","column_type":12,"value":"Mohammed"}]}
--------------------------------------------------------------------
was (Author: msabri):
Hi Matthew,
After Enabling the "DistributedMapCacheServer and DistributedMapCacheClient" on my NiFi flow, I got the CDC of string columns (varchar type), however the column_types are coming as numbers.
> CaptureChangeMySQL returns null column values if no DistributedMapCacheClient is selected
> -----------------------------------------------------------------------------------------
>
> Key: NIFI-3902
> URL: https://issues.apache.org/jira/browse/NIFI-3902
> Project: Apache NiFi
> Issue Type: Bug
> Components: Extensions
> Affects Versions: 1.2.0
> Reporter: Matt Burgess
>
> The "Distributed Map Cache Client" property of the CaptureChangeMySQL processor is not required, if it is not set then no column name or type information will be available when generating output flow files from binary log events. However if no type information is present and the column value is not a number or a byte array, the value of that column will be null in the outgoing flow file.
> It may not be possible to accurately represent the value if the type is not known, but the value could be set to the String representation of the object's value. At best it would correctly represent the value; at worst it would indicate that the value is indeed not null but otherwise indeterminate.
> The workaround (and best practice) is to use a DistributedMapCacheClient in the CaptureChangeMySQL processor in order to retrieve the column name and information for the CDC events.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)