<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question PutDatabaseRecord processor error: &amp;quot;Record does not have a value for the PrimaryKey column 'HOST' &amp;quot; in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/PutDatabaseRecord-processor-error-quot-Record-does-not-have/m-p/348901#M235477</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I am getting error "Record does not have a value for the PrimaryKey column 'HOST' " when I update a data in source db table. &lt;STRONG&gt;This issue is happening when destination DB table's name: 'user' or 'users'. It is working fine when destination table's name is change to 'report_user'&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;(I mean when we change the table name 'user'or 'users' to something else which is not used as mysql internal&amp;nbsp; table)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;I am not sure why it is trying to insert or update on internal mysql table as I am giving the destination DBName and tableName.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Can anyone suggest how can we fix this issue without changing the destination table name?&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="PutDatabaseRecord_processor.png" style="width: 999px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/35053i0EB73BC7DB60C4BD/image-size/large?v=v2&amp;amp;px=999" role="button" title="PutDatabaseRecord_processor.png" alt="PutDatabaseRecord_processor.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Error Log:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;PutDatabaseRecord[id=ff8ca68c-8252-3652-8f55-1044ad3f1bab] Failed to put Records to database for StandardFlowFileRecord[uuid=43e64992-a3d0-4a75-bb85-8d70c1f556d7,claim=StandardContentClaim [resourceClaim=StandardResourceClaim[id=1658747398462-4, container=default, section=4], offset=20549, length=1214],offset=0,name=43e64992-a3d0-4a75-bb85-8d70c1f556d7,size=1214]. Routing to failure.&lt;BR /&gt;org.apache.nifi.serialization.MalformedRecordException: Record does not have a value for the PrimaryKey column 'HOST'&lt;BR /&gt;at org.apache.nifi.processors.standard.PutDatabaseRecord.normalizeKeyColumnNamesAndCheckForValues(PutDatabaseRecord.java:1367)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;PutDatabaseRecord processor flow file output:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;[ {&lt;BR /&gt;"id" : 1,&lt;BR /&gt;"first_name" : "john",&lt;BR /&gt;"middle_name" : "s_test",&lt;BR /&gt;"last_name" : "asjndjnas",&lt;BR /&gt;"user_name" : "deleted_8AB-0034",&lt;BR /&gt;"is_terms_accepted" : "true",&lt;BR /&gt;"is_retail" : "true",&lt;BR /&gt;"tenant_id" : 1,&lt;BR /&gt;"email" : "sreejith.karonnan2@mailinator.com",&lt;BR /&gt;"alternate_email" : null,&lt;BR /&gt;"gender" : "M",&lt;BR /&gt;"dob" : "2008-01-01",&lt;BR /&gt;"sso_id" : null,&lt;BR /&gt;"phone_number" : null,&lt;BR /&gt;"status_id" : 2,&lt;BR /&gt;"time_zone_id" : 1,&lt;BR /&gt;"is_activated" : "true",&lt;BR /&gt;"activated_at" : "2021-01-07 16:29:25",&lt;BR /&gt;"is_deleted" : "false",&lt;BR /&gt;"import_id" : null,&lt;BR /&gt;"created_at" : "2021-01-07 16:29:25",&lt;BR /&gt;"updated_at" : "2021-11-16 18:38:42",&lt;BR /&gt;"created_by" : 123,&lt;BR /&gt;"updated_by" : 3,&lt;BR /&gt;"last_login_date" : null,&lt;BR /&gt;"agreement_acceptance_date" : "2021-03-22 20:44:23",&lt;BR /&gt;"user_ref_id" : "589RngS1",&lt;BR /&gt;"is_admin" : "false",&lt;BR /&gt;"is_distributor" : "true",&lt;BR /&gt;"is_self_register" : "false",&lt;BR /&gt;"ce_job_id" : null,&lt;BR /&gt;"region" : "US",&lt;BR /&gt;"recovery_status" : null,&lt;BR /&gt;"hlc_user_name" : null,&lt;BR /&gt;"allow_assignment" : false,&lt;BR /&gt;"has_ce" : false,&lt;BR /&gt;"product_launched_at" : null,&lt;BR /&gt;"is_perpetual" : false,&lt;BR /&gt;"learning_completed_at" : null,&lt;BR /&gt;"enrolled_at" : null,&lt;BR /&gt;"dispatch_confirmation" : false,&lt;BR /&gt;"subscription_end_at" : null,&lt;BR /&gt;"ecard_date" : null,&lt;BR /&gt;"offline_completion_date" : null,&lt;BR /&gt;"subscription_start_at" : null,&lt;BR /&gt;"product_completed_at" : null,&lt;BR /&gt;"online_completion_date" : null,&lt;BR /&gt;"is_legacy" : false,&lt;BR /&gt;"last_activity_at" : null,&lt;BR /&gt;"multi_package" : false,&lt;BR /&gt;"metadata" : null,&lt;BR /&gt;"self_registration_override" : false&lt;BR /&gt;} ]&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;</description>
    <pubDate>Wed, 27 Jul 2022 13:59:37 GMT</pubDate>
    <dc:creator>AbhishekSingh</dc:creator>
    <dc:date>2022-07-27T13:59:37Z</dc:date>
    <item>
      <title>PutDatabaseRecord processor error: "Record does not have a value for the PrimaryKey column 'HOST' "</title>
      <link>https://community.cloudera.com/t5/Support-Questions/PutDatabaseRecord-processor-error-quot-Record-does-not-have/m-p/348901#M235477</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I am getting error "Record does not have a value for the PrimaryKey column 'HOST' " when I update a data in source db table. &lt;STRONG&gt;This issue is happening when destination DB table's name: 'user' or 'users'. It is working fine when destination table's name is change to 'report_user'&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;(I mean when we change the table name 'user'or 'users' to something else which is not used as mysql internal&amp;nbsp; table)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;I am not sure why it is trying to insert or update on internal mysql table as I am giving the destination DBName and tableName.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Can anyone suggest how can we fix this issue without changing the destination table name?&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="PutDatabaseRecord_processor.png" style="width: 999px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/35053i0EB73BC7DB60C4BD/image-size/large?v=v2&amp;amp;px=999" role="button" title="PutDatabaseRecord_processor.png" alt="PutDatabaseRecord_processor.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Error Log:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;PutDatabaseRecord[id=ff8ca68c-8252-3652-8f55-1044ad3f1bab] Failed to put Records to database for StandardFlowFileRecord[uuid=43e64992-a3d0-4a75-bb85-8d70c1f556d7,claim=StandardContentClaim [resourceClaim=StandardResourceClaim[id=1658747398462-4, container=default, section=4], offset=20549, length=1214],offset=0,name=43e64992-a3d0-4a75-bb85-8d70c1f556d7,size=1214]. Routing to failure.&lt;BR /&gt;org.apache.nifi.serialization.MalformedRecordException: Record does not have a value for the PrimaryKey column 'HOST'&lt;BR /&gt;at org.apache.nifi.processors.standard.PutDatabaseRecord.normalizeKeyColumnNamesAndCheckForValues(PutDatabaseRecord.java:1367)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;PutDatabaseRecord processor flow file output:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;[ {&lt;BR /&gt;"id" : 1,&lt;BR /&gt;"first_name" : "john",&lt;BR /&gt;"middle_name" : "s_test",&lt;BR /&gt;"last_name" : "asjndjnas",&lt;BR /&gt;"user_name" : "deleted_8AB-0034",&lt;BR /&gt;"is_terms_accepted" : "true",&lt;BR /&gt;"is_retail" : "true",&lt;BR /&gt;"tenant_id" : 1,&lt;BR /&gt;"email" : "sreejith.karonnan2@mailinator.com",&lt;BR /&gt;"alternate_email" : null,&lt;BR /&gt;"gender" : "M",&lt;BR /&gt;"dob" : "2008-01-01",&lt;BR /&gt;"sso_id" : null,&lt;BR /&gt;"phone_number" : null,&lt;BR /&gt;"status_id" : 2,&lt;BR /&gt;"time_zone_id" : 1,&lt;BR /&gt;"is_activated" : "true",&lt;BR /&gt;"activated_at" : "2021-01-07 16:29:25",&lt;BR /&gt;"is_deleted" : "false",&lt;BR /&gt;"import_id" : null,&lt;BR /&gt;"created_at" : "2021-01-07 16:29:25",&lt;BR /&gt;"updated_at" : "2021-11-16 18:38:42",&lt;BR /&gt;"created_by" : 123,&lt;BR /&gt;"updated_by" : 3,&lt;BR /&gt;"last_login_date" : null,&lt;BR /&gt;"agreement_acceptance_date" : "2021-03-22 20:44:23",&lt;BR /&gt;"user_ref_id" : "589RngS1",&lt;BR /&gt;"is_admin" : "false",&lt;BR /&gt;"is_distributor" : "true",&lt;BR /&gt;"is_self_register" : "false",&lt;BR /&gt;"ce_job_id" : null,&lt;BR /&gt;"region" : "US",&lt;BR /&gt;"recovery_status" : null,&lt;BR /&gt;"hlc_user_name" : null,&lt;BR /&gt;"allow_assignment" : false,&lt;BR /&gt;"has_ce" : false,&lt;BR /&gt;"product_launched_at" : null,&lt;BR /&gt;"is_perpetual" : false,&lt;BR /&gt;"learning_completed_at" : null,&lt;BR /&gt;"enrolled_at" : null,&lt;BR /&gt;"dispatch_confirmation" : false,&lt;BR /&gt;"subscription_end_at" : null,&lt;BR /&gt;"ecard_date" : null,&lt;BR /&gt;"offline_completion_date" : null,&lt;BR /&gt;"subscription_start_at" : null,&lt;BR /&gt;"product_completed_at" : null,&lt;BR /&gt;"online_completion_date" : null,&lt;BR /&gt;"is_legacy" : false,&lt;BR /&gt;"last_activity_at" : null,&lt;BR /&gt;"multi_package" : false,&lt;BR /&gt;"metadata" : null,&lt;BR /&gt;"self_registration_override" : false&lt;BR /&gt;} ]&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;</description>
      <pubDate>Wed, 27 Jul 2022 13:59:37 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/PutDatabaseRecord-processor-error-quot-Record-does-not-have/m-p/348901#M235477</guid>
      <dc:creator>AbhishekSingh</dc:creator>
      <dc:date>2022-07-27T13:59:37Z</dc:date>
    </item>
    <item>
      <title>Re: PutDatabaseRecord processor error: "Record does not have a value for the PrimaryKey column 'HOST' "</title>
      <link>https://community.cloudera.com/t5/Support-Questions/PutDatabaseRecord-processor-error-quot-Record-does-not-have/m-p/348907#M235480</link>
      <description>&lt;P&gt;Seems like it's not using the schema name field when building the insert statement.&amp;nbsp; &amp;nbsp;Are you specifying the database to use in your DBCP connection pool service?&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Although user/users are reserved words in mysql, so I would expect problems with that name.&amp;nbsp; &amp;nbsp;Possibly creating the table wrapping the name in back ticks might work.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 27 Jul 2022 15:20:37 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/PutDatabaseRecord-processor-error-quot-Record-does-not-have/m-p/348907#M235480</guid>
      <dc:creator>cnelson2</dc:creator>
      <dc:date>2022-07-27T15:20:37Z</dc:date>
    </item>
    <item>
      <title>Re: PutDatabaseRecord processor error: "Record does not have a value for the PrimaryKey column 'HOST' "</title>
      <link>https://community.cloudera.com/t5/Support-Questions/PutDatabaseRecord-processor-error-quot-Record-does-not-have/m-p/348925#M235482</link>
      <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/96113"&gt;@cnelson2&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Are you specifying the database to use in your DBCP connection pool service?&amp;nbsp; -&amp;gt; yes&lt;/P&gt;&lt;P&gt;I solve this issue. I have given Catalog Name : destinationDBName and Make empty schema Name value in putdatabase&amp;nbsp; record processor. Now I am able to perform insert , update and delete action source to destination 'user' table.&lt;/P&gt;&lt;P&gt;Thanks,&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 27 Jul 2022 19:05:36 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/PutDatabaseRecord-processor-error-quot-Record-does-not-have/m-p/348925#M235482</guid>
      <dc:creator>AbhishekSingh</dc:creator>
      <dc:date>2022-07-27T19:05:36Z</dc:date>
    </item>
  </channel>
</rss>

