This is the link to the Guided project. So I have downloaded all the necessary package, including Ipython and the other sql packages. The starting code:
%%capture
%load_ext sql
%sql sqlite:///factbook.db
And it loaded without any problem. But unlike the directions, I don’t see Connected to factbook.db but there is a factbook.db file in the same directory. However, that file is completely empty. Is there something I should try?
Hi!
This code doesn´t return (and doesn´t have to) any output. What is your next code?
It should be the one to check sqlite_master
contents:
%%sql
SELECT *
FROM sqlite_master
WHERE type=‘table’;
This one in theory (and in my case) returns the output saying that there are 2 tables in the database: sqlite_sequence
and facts
. For the project we need the second one, so any queries should be like SELECT * FROM facts
Only the column names load when I run the code - but no data. What am I missing?
You are using a different sql module to the one recommended in the project.
This code that connects to the database
%%capture
%load_ext sql
%sql sqlite:///factbook.db
works for the sqlite3
module.
I´m not familiar with the sqlalchemy
, but after a quick glimpse into the tutorials, it seems that the syntax used there is a completely different one.
Hello, I’m having the same issue.
I’ve tried figuring it out on my own, but how do I make sure jupyter notebook is using the sqlite3 module instead of sqlalchemy?