<?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 Re: How to update in phoenix based on specific columns? in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/How-to-update-in-phoenix-based-on-specific-columns/m-p/204394#M166383</link>
    <description>&lt;P&gt;You can specify the columns that you want to update as long as you have the primary-key constraint columns available.&lt;/P&gt;&lt;PRE&gt;&amp;gt; create table t(pk varchar not null primary key, col1 integer, col2 integer, col3 integer);
&amp;gt; upsert into t(pk, col2) values('a', 2);
&lt;/PRE&gt;&lt;P&gt;When you provide fewer columns than the schema defines, the other columns will receive no new value. This is an equivalent operation to an "UPDATE" in a traditional RDBMS.&lt;/P&gt;</description>
    <pubDate>Tue, 03 Oct 2017 00:02:16 GMT</pubDate>
    <dc:creator>elserj</dc:creator>
    <dc:date>2017-10-03T00:02:16Z</dc:date>
    <item>
      <title>How to update in phoenix based on specific columns?</title>
      <link>https://community.cloudera.com/t5/Support-Questions/How-to-update-in-phoenix-based-on-specific-columns/m-p/204393#M166382</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I am trying to figure out a way to do the equivalent of below command in phoenix:&lt;/P&gt;&lt;P&gt;update ics_tag_list set  targetColumn  = concat( 'prefix', sourceColumn) where rig =somerig;&lt;/P&gt;&lt;P&gt;I know that Phoenix does not support update command to update rows. But how do I update rows without entering values of all the columns in the query as an upsert command? Even with the upsert select command, we can only select values from other tables but I am not able to think of a way to generate the equivalent of above query in Phoenix since my source and target columns will change upon selection in the UI.&lt;/P&gt;</description>
      <pubDate>Mon, 02 Oct 2017 23:10:20 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/How-to-update-in-phoenix-based-on-specific-columns/m-p/204393#M166382</guid>
      <dc:creator>arohit91</dc:creator>
      <dc:date>2017-10-02T23:10:20Z</dc:date>
    </item>
    <item>
      <title>Re: How to update in phoenix based on specific columns?</title>
      <link>https://community.cloudera.com/t5/Support-Questions/How-to-update-in-phoenix-based-on-specific-columns/m-p/204394#M166383</link>
      <description>&lt;P&gt;You can specify the columns that you want to update as long as you have the primary-key constraint columns available.&lt;/P&gt;&lt;PRE&gt;&amp;gt; create table t(pk varchar not null primary key, col1 integer, col2 integer, col3 integer);
&amp;gt; upsert into t(pk, col2) values('a', 2);
&lt;/PRE&gt;&lt;P&gt;When you provide fewer columns than the schema defines, the other columns will receive no new value. This is an equivalent operation to an "UPDATE" in a traditional RDBMS.&lt;/P&gt;</description>
      <pubDate>Tue, 03 Oct 2017 00:02:16 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/How-to-update-in-phoenix-based-on-specific-columns/m-p/204394#M166383</guid>
      <dc:creator>elserj</dc:creator>
      <dc:date>2017-10-03T00:02:16Z</dc:date>
    </item>
  </channel>
</rss>

