<?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: Convert column data type in querydatabasetable in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/Convert-column-data-type-in-querydatabasetable/m-p/230699#M192546</link>
    <description>&lt;A rel="user" href="https://community.cloudera.com/users/87210/ronlabau.html" nodeid="87210"&gt;@Ron Labau&lt;/A&gt;&lt;P&gt;Try to use Cast the fields names to &lt;STRONG&gt;Varchar&lt;/STRONG&gt; in your QueryDatabaseTable processor configs in Columns to Return.&lt;/P&gt;&lt;P&gt;If the above method doesn't work then Use &lt;STRONG&gt;ConvertRecord&lt;/STRONG&gt; processor to read your Incoming Avro data and in Record SetWriter configure the field names to have &lt;STRONG&gt;string datatype&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;So that we are going have OutputFlowfile in Avro format with string datatype.&lt;/P&gt;&lt;P&gt;Refer to &lt;A href="https://community.hortonworks.com/articles/115311/convert-csv-to-json-avro-xml-using-convertrecord-p.html" target="_blank"&gt;this&lt;/A&gt; link for configuring/usage of the &lt;STRONG&gt;ConvertRecord processor&lt;/STRONG&gt;.&lt;/P&gt;</description>
    <pubDate>Fri, 24 Aug 2018 04:26:20 GMT</pubDate>
    <dc:creator>Shu_ashu</dc:creator>
    <dc:date>2018-08-24T04:26:20Z</dc:date>
    <item>
      <title>Convert column data type in querydatabasetable</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Convert-column-data-type-in-querydatabasetable/m-p/230698#M192545</link>
      <description>&lt;P&gt;Hi,  I'm getting some data from a pg database, and it has 2 "Text" types, which I think are my problem.  When I go to insert those to a redshift table, i'm getting a jdbc error, "given type does not match given object".  I think i need to use nifi expression language to convert the text column toString, so it will work with varchar, but i'm not sure.  any help appreciated.&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Ron&lt;/P&gt;</description>
      <pubDate>Fri, 16 Sep 2022 13:37:22 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Convert-column-data-type-in-querydatabasetable/m-p/230698#M192545</guid>
      <dc:creator>ronlabau</dc:creator>
      <dc:date>2022-09-16T13:37:22Z</dc:date>
    </item>
    <item>
      <title>Re: Convert column data type in querydatabasetable</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Convert-column-data-type-in-querydatabasetable/m-p/230699#M192546</link>
      <description>&lt;A rel="user" href="https://community.cloudera.com/users/87210/ronlabau.html" nodeid="87210"&gt;@Ron Labau&lt;/A&gt;&lt;P&gt;Try to use Cast the fields names to &lt;STRONG&gt;Varchar&lt;/STRONG&gt; in your QueryDatabaseTable processor configs in Columns to Return.&lt;/P&gt;&lt;P&gt;If the above method doesn't work then Use &lt;STRONG&gt;ConvertRecord&lt;/STRONG&gt; processor to read your Incoming Avro data and in Record SetWriter configure the field names to have &lt;STRONG&gt;string datatype&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;So that we are going have OutputFlowfile in Avro format with string datatype.&lt;/P&gt;&lt;P&gt;Refer to &lt;A href="https://community.hortonworks.com/articles/115311/convert-csv-to-json-avro-xml-using-convertrecord-p.html" target="_blank"&gt;this&lt;/A&gt; link for configuring/usage of the &lt;STRONG&gt;ConvertRecord processor&lt;/STRONG&gt;.&lt;/P&gt;</description>
      <pubDate>Fri, 24 Aug 2018 04:26:20 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Convert-column-data-type-in-querydatabasetable/m-p/230699#M192546</guid>
      <dc:creator>Shu_ashu</dc:creator>
      <dc:date>2018-08-24T04:26:20Z</dc:date>
    </item>
    <item>
      <title>Re: Convert column data type in querydatabasetable</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Convert-column-data-type-in-querydatabasetable/m-p/230700#M192547</link>
      <description>&lt;P&gt;Thanks Shu, that seems to work! is that expression language, or is that basically doing regular sql functions on the db?&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Fri, 24 Aug 2018 22:58:08 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Convert-column-data-type-in-querydatabasetable/m-p/230700#M192547</guid>
      <dc:creator>ronlabau</dc:creator>
      <dc:date>2018-08-24T22:58:08Z</dc:date>
    </item>
    <item>
      <title>Re: Convert column data type in querydatabasetable</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Convert-column-data-type-in-querydatabasetable/m-p/230701#M192548</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/87210/ronlabau.html" nodeid="87210"&gt;@Ron Labau&lt;/A&gt; &lt;/P&gt;&lt;P&gt;if you are using QueryDatabaseTable processor then it is regular sql function on db.&lt;BR /&gt;if you are using convertRecord processor then we are doing in NiFi.&lt;/P&gt;</description>
      <pubDate>Sat, 25 Aug 2018 01:57:25 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Convert-column-data-type-in-querydatabasetable/m-p/230701#M192548</guid>
      <dc:creator>Shu_ashu</dc:creator>
      <dc:date>2018-08-25T01:57:25Z</dc:date>
    </item>
  </channel>
</rss>

