<?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 QueryDatabaseTableRecord converting varbinary column to text? in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/QueryDatabaseTableRecord-converting-varbinary-column-to-text/m-p/413727#M254209</link>
    <description>&lt;P&gt;Edit: Tried using CSVWriter, XMLWriter and AvroWriter. All NG.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE border="1" width="93.44833036254072%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%" height="30px"&gt;Nifi Version&lt;/TD&gt;&lt;TD width="83.64664064933399%" height="30px"&gt;2.5.0&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%" height="30px"&gt;Processor&lt;/TD&gt;&lt;TD width="83.64664064933399%" height="30px"&gt;&lt;SPAN&gt;QueryDatabaseTableRecord&amp;nbsp;&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%" height="30px"&gt;Driver&lt;/TD&gt;&lt;TD width="83.64664064933399%" height="30px"&gt;&lt;SPAN&gt;com.microsoft.sqlserver.jdbc.SQLServerDriver&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a requirement to pull varbinary data from a table however the&amp;nbsp; output is always text.&amp;nbsp; I expect a result starting with 0x. According to the jdbc driver within nifi, varbinary is supported however I see it gets converted to bytes. Is there a way to maintain the 0x format for the writer?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Notes&lt;/STRONG&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;JDBC source for statement varbinary is supported at &lt;A href="https://github.com/apache/nifi/blob/main/nifi-extension-bundles/nifi-extension-utils/nifi-database-utils/src/main/java/org/apache/nifi/util/db/JdbcCommon.java" target="_blank" rel="noopener"&gt;https://github.com/apache/nifi/blob/main/nifi-extension-bundles/nifi-extension-utils/nifi-database-utils/src/main/java/org/apache/nifi/util/db/JdbcCommon.java&lt;/A&gt;&amp;nbsp;(line 360)&lt;/LI&gt;&lt;/UL&gt;</description>
    <pubDate>Tue, 17 Mar 2026 15:43:17 GMT</pubDate>
    <dc:creator>grimcha</dc:creator>
    <dc:date>2026-03-17T15:43:17Z</dc:date>
    <item>
      <title>QueryDatabaseTableRecord converting varbinary column to text?</title>
      <link>https://community.cloudera.com/t5/Support-Questions/QueryDatabaseTableRecord-converting-varbinary-column-to-text/m-p/413727#M254209</link>
      <description>&lt;P&gt;Edit: Tried using CSVWriter, XMLWriter and AvroWriter. All NG.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE border="1" width="93.44833036254072%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%" height="30px"&gt;Nifi Version&lt;/TD&gt;&lt;TD width="83.64664064933399%" height="30px"&gt;2.5.0&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%" height="30px"&gt;Processor&lt;/TD&gt;&lt;TD width="83.64664064933399%" height="30px"&gt;&lt;SPAN&gt;QueryDatabaseTableRecord&amp;nbsp;&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%" height="30px"&gt;Driver&lt;/TD&gt;&lt;TD width="83.64664064933399%" height="30px"&gt;&lt;SPAN&gt;com.microsoft.sqlserver.jdbc.SQLServerDriver&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a requirement to pull varbinary data from a table however the&amp;nbsp; output is always text.&amp;nbsp; I expect a result starting with 0x. According to the jdbc driver within nifi, varbinary is supported however I see it gets converted to bytes. Is there a way to maintain the 0x format for the writer?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Notes&lt;/STRONG&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;JDBC source for statement varbinary is supported at &lt;A href="https://github.com/apache/nifi/blob/main/nifi-extension-bundles/nifi-extension-utils/nifi-database-utils/src/main/java/org/apache/nifi/util/db/JdbcCommon.java" target="_blank" rel="noopener"&gt;https://github.com/apache/nifi/blob/main/nifi-extension-bundles/nifi-extension-utils/nifi-database-utils/src/main/java/org/apache/nifi/util/db/JdbcCommon.java&lt;/A&gt;&amp;nbsp;(line 360)&lt;/LI&gt;&lt;/UL&gt;</description>
      <pubDate>Tue, 17 Mar 2026 15:43:17 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/QueryDatabaseTableRecord-converting-varbinary-column-to-text/m-p/413727#M254209</guid>
      <dc:creator>grimcha</dc:creator>
      <dc:date>2026-03-17T15:43:17Z</dc:date>
    </item>
    <item>
      <title>Re: QueryDatabaseTableRecord converting varbinary column to text?</title>
      <link>https://community.cloudera.com/t5/Support-Questions/QueryDatabaseTableRecord-converting-varbinary-column-to-text/m-p/413728#M254210</link>
      <description>&lt;P&gt;I have resolved this by forcing a CONVERT with a style of 1 to ensure binary output in the sql query with a 0x primer.&amp;nbsp; Documentation here:&amp;nbsp;&lt;A href="https://learn.microsoft.com/en-us/sql/t-sql/functions/cast-and-convert-transact-sql?view=sql-server-ver17" target="_blank"&gt;https://learn.microsoft.com/en-us/sql/t-sql/functions/cast-and-convert-transact-sql?view=sql-server-ver17&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 17 Mar 2026 16:11:51 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/QueryDatabaseTableRecord-converting-varbinary-column-to-text/m-p/413728#M254210</guid>
      <dc:creator>grimcha</dc:creator>
      <dc:date>2026-03-17T16:11:51Z</dc:date>
    </item>
  </channel>
</rss>

