Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Openrefine unable to query sqlite3 database #3605

Closed
kushthedude opened this issue Feb 10, 2021 · 4 comments · Fixed by #3954
Closed

Openrefine unable to query sqlite3 database #3605

kushthedude opened this issue Feb 10, 2021 · 4 comments · Fixed by #3954
Assignees
Labels
import About importers in general - add a label for the data format if available SQL/database Integration with SQL databases in general Type: Bug Issues related to software defects or unexpected behavior, which require resolution.
Milestone

Comments

@kushthedude
Copy link
Member

While importing data from sqlite3 database, openrefine always errors out on Invalid or missing Query Info

To Reproduce

Steps to reproduce the behavior:

  1. Connect the sqlite3 DB
  2. Then, write this query select NDB_NO from FOOD;
  3. Finally, try previewing and see the error

Current Results

Screenshot 2021-02-10 at 10 33 07 PM

Error Logs

 refine] POST /command/core/importing-controller (13ms)
22:32:42.921 [          org.mortbay.log] /command/core/importing-controller (213ms)
java.lang.NullPointerException
	at com.google.refine.extension.database.DatabaseImportController.parsePreview(DatabaseImportController.java:270)
	at com.google.refine.extension.database.DatabaseImportController.doParsePreview(DatabaseImportController.java:200)
	at com.google.refine.extension.database.DatabaseImportController.doPost(DatabaseImportController.java:100)
	at com.google.refine.commands.importing.ImportingControllerCommand.doPost(ImportingControllerCommand.java:68)
	at com.google.refine.RefineServlet.service(RefineServlet.java:187)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
	at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511)
	at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1221)
	at org.mortbay.servlet.UserAgentFilter.doFilter(UserAgentFilter.java:78)
	at org.mortbay.servlet.GzipFilter.doFilter(GzipFilter.java:131)
	at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1212)
	at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:399)
	at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
	at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
	at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:766)
	at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:450)
	at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
	at org.mortbay.jetty.Server.handle(Server.java:326)
	at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
	at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:945)
	at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:756)
	at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212)
	at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
	at org.mortbay.jetty.bio.SocketConnector$Connection.run(SocketConnector.java:228)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)

Expected Behavior

Openrefine should import the data

Datasets

Here is the database https://drive.google.com/file/d/1xuGyEfp0MI0ddz8pBQ15f1AwcL_DGsM8/view?usp=sharing , try connecting to db and run the above query to see the output.

@kushthedude kushthedude added Type: Bug Issues related to software defects or unexpected behavior, which require resolution. Status: Pending Review Indicates that the issue or pull request is awaiting review by project maintainers or collaborators labels Feb 10, 2021
@kushthedude kushthedude self-assigned this Feb 10, 2021
@kushthedude kushthedude added the import About importers in general - add a label for the data format if available label Feb 10, 2021
@kushthedude
Copy link
Member Author

@wetneb Is this a valid issue or I am doing something wrong, as I have not used the DB import much in openrefine?

@kushthedude kushthedude removed their assignment Feb 10, 2021
@wetneb wetneb added the SQL/database Integration with SQL databases in general label Feb 10, 2021
@tfmorris
Copy link
Member

tfmorris commented Feb 10, 2021

It's a bug. It got broken by commit ded6ca0 - because we didn't have test coverage :)

Specifically, it's checking for a non-zero port number, when SQLite, of course, doesn't use port numbers.

@tfmorris tfmorris removed the Status: Pending Review Indicates that the issue or pull request is awaiting review by project maintainers or collaborators label Feb 10, 2021
@Gomaa
Copy link
Contributor

Gomaa commented May 31, 2021

Would you please assign me to this issue?

@wetneb
Copy link
Member

wetneb commented May 31, 2021

Sure, thank you! I have sent you an invite to the organization so that you can assign issues yourself in the future.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
import About importers in general - add a label for the data format if available SQL/database Integration with SQL databases in general Type: Bug Issues related to software defects or unexpected behavior, which require resolution.
Projects
None yet
4 participants