[ https://issues.apache.org/jira/browse/DRILL-6720?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16672830#comment-16672830 ]
kshitij commented on DRILL-6720: -------------------------------- [~kkhatua] As mentioned in my earlier comment, I have tried using the same JDBC driver in a simple java program that connects to the database and reads through all the records in the table. It works without any issue. PFB the Java code snippet: Connection con = DriverManager.getConnection(url, user, password); Statement stmt = con.createStatement(); ResultSet rs = stmt.executeQuery("SELECT * FROM SCHEMA.TABLE"); int count = 0; while(rs.next()){ System.out.println("Record number "+ ++count +":"+rs.getString(2)); } rs.close(); con.close(); > Unable to read more than 1000 records from DB2 table > ---------------------------------------------------- > > Key: DRILL-6720 > URL: https://issues.apache.org/jira/browse/DRILL-6720 > Project: Apache Drill > Issue Type: Bug > Components: Client - JDBC, Storage - JDBC > Affects Versions: 1.9.0 > Reporter: kshitij > Priority: Critical > Fix For: 1.9.0 > > Attachments: drill_DB2_query_error_log.txt, drill_db2_query_status.PNG > > > We have created a storage plugin in drill for DB2 database, PFB the details: > { > "type": "jdbc", > "driver": "com.ibm.db2.jcc.DB2Driver", > "url": "jdbc:db2://server:port/databasename", > "username": "user", > "password": "password", > "enabled": true > } > Version of DB2 is 10.1. We are using a type 4 JDBC driver (db2jcc4.jar). > When we try to read the data in any of the tables, the query fails with > following error from drill: > org.apache.drill.common.exceptions.UserRemoteException: DATA_READ ERROR: > Failure while attempting to read from database. sql SELECT * FROM > schema.table plugin DB2_PLUGIN Fragment 0:0 [Error Id: > 1404544f-bb5e-439b-b1a8-679388bb344d on server:port] > The error logs from drill have been attached. > One interesting observation - when we put a LIMIT clause of <=1000 to the > query, the query works and returns the data. Anything more than 1000 in LIMIT > clause throws back the same error as above. -- This message was sent by Atlassian JIRA (v7.6.3#76005)