<?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>topic Re: Databricks Logs some error messages while trying to read data using databricks-jdbc dependency in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/databricks-logs-some-error-messages-while-trying-to-read-data/m-p/4279#M1038</link>
    <description>&lt;P&gt;@Shanmugavel Chandrakasu​&amp;nbsp; - Thanks for the reply. &lt;/P&gt;&lt;P&gt;I have tried using the &lt;B&gt;getObject()&lt;/B&gt; method in &lt;B&gt;line#17&lt;/B&gt; but I can still see those error logs in my console. I have tried debugging my program and found out that these exceptions were logged when &lt;B&gt;line#14&lt;/B&gt; is getting executed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you also please explain to me why databricks-jdbc has an internal log4j instead of using log4j as its dependency?&lt;/P&gt;</description>
    <pubDate>Fri, 23 Jun 2023 16:39:40 GMT</pubDate>
    <dc:creator>Binesh</dc:creator>
    <dc:date>2023-06-23T16:39:40Z</dc:date>
    <item>
      <title>Databricks Logs some error messages while trying to read data using databricks-jdbc dependency</title>
      <link>https://community.databricks.com/t5/data-engineering/databricks-logs-some-error-messages-while-trying-to-read-data/m-p/4277#M1036</link>
      <description>&lt;P&gt;I have tried to read data from Databricks using the following java code.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;String TOKEN = "token...";
String url = "url...";
&amp;nbsp;
Properties properties = new Properties();
properties.setProperty("user", "token");
properties.setProperty("PWD", TOKEN);
&amp;nbsp;
Connection connection = DriverManager.getConnection(url, properties);
String query = "select * from schema.table";
&amp;nbsp;
Statement statement = connection.createStatement();
ResultSet rs = statement.executeQuery(query);
&amp;nbsp;
while(rs.next()) {
    int colCount = rs.getMetaData().getColumnCount();
    for(int col=1; col&amp;lt;=colCount; col++){
        System.out.print(rs.getString(col) + " ");
    }
&amp;nbsp;
    System.out.println();
}&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But every time when I run this java program, some errors are being logged by StatusLogger and I don't know how to resolve those errors.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="Logger Errors"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/205iFFAD3DB11CA43867/image-size/large?v=v2&amp;amp;px=999" role="button" title="Logger Errors" alt="Logger Errors" /&gt;&lt;/span&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;B&gt;Note:&lt;/B&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Apart from &lt;B&gt;databricks-jdbc &lt;/B&gt;dependency, I also have &lt;B&gt;log4j&lt;/B&gt; as a dependency.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;B&gt;Things I have noticed:&lt;/B&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;If I remove log4j from my dependency, no errors are being logged in the console.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can someone please help me resolving this issue?&lt;/P&gt;&lt;P&gt;Can someone also please explain me why databricks-jdbc has an internal log4j instead of using log4j as its dependency?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 16 May 2023 17:08:05 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/databricks-logs-some-error-messages-while-trying-to-read-data/m-p/4277#M1036</guid>
      <dc:creator>Binesh</dc:creator>
      <dc:date>2023-05-16T17:08:05Z</dc:date>
    </item>
    <item>
      <title>Re: Databricks Logs some error messages while trying to read data using databricks-jdbc dependency</title>
      <link>https://community.databricks.com/t5/data-engineering/databricks-logs-some-error-messages-while-trying-to-read-data/m-p/4278#M1037</link>
      <description>&lt;P&gt;@Binesh J​&amp;nbsp;- The issue could be due to the data type of the column is not compatible with getString() method in line#17. use getObject() method to retrieve the value as a generic value and then convert to string. &lt;/P&gt;</description>
      <pubDate>Thu, 15 Jun 2023 17:56:36 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/databricks-logs-some-error-messages-while-trying-to-read-data/m-p/4278#M1037</guid>
      <dc:creator>shan_chandra</dc:creator>
      <dc:date>2023-06-15T17:56:36Z</dc:date>
    </item>
    <item>
      <title>Re: Databricks Logs some error messages while trying to read data using databricks-jdbc dependency</title>
      <link>https://community.databricks.com/t5/data-engineering/databricks-logs-some-error-messages-while-trying-to-read-data/m-p/4279#M1038</link>
      <description>&lt;P&gt;@Shanmugavel Chandrakasu​&amp;nbsp; - Thanks for the reply. &lt;/P&gt;&lt;P&gt;I have tried using the &lt;B&gt;getObject()&lt;/B&gt; method in &lt;B&gt;line#17&lt;/B&gt; but I can still see those error logs in my console. I have tried debugging my program and found out that these exceptions were logged when &lt;B&gt;line#14&lt;/B&gt; is getting executed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you also please explain to me why databricks-jdbc has an internal log4j instead of using log4j as its dependency?&lt;/P&gt;</description>
      <pubDate>Fri, 23 Jun 2023 16:39:40 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/databricks-logs-some-error-messages-while-trying-to-read-data/m-p/4279#M1038</guid>
      <dc:creator>Binesh</dc:creator>
      <dc:date>2023-06-23T16:39:40Z</dc:date>
    </item>
  </channel>
</rss>

