Which one to connect to SQLite Shell in Jupyterlab - console or terminal

i have been trying to follow the SQL missions https://app.dataquest.io/m/192/table-relations-and-normalization/2/creating-tables on my client. However, here is a question, should i be running the SQLite Shell from the console or terminal. Or am i jumping the gun here as i see there is another course Querying SQLite from Python. It would help a lot if there is a blog post or sthg to guide on step by step to noobs like myself on how to run SQL from Anaconda like the initial course.

Refer below the options available in Jupyterlab

From the console i was able to connect with the database, but cannot run any SQLite shell command

From the terminal, there is bash. This is what it looks like from terminal

1 Like

Hey.

If you want to mimic the mission, then you should be running it from your command-line. You can see how in the first screen:

The error you get on your screenshot occurs for the same reason that I explain at the bottom of this reply.

i see. silly me, i should be running SQLite Shell from my Terminal from Mac, not from Anaconda. :man_facepalming:
i am now able to mimic everything from my Terminal in Mac.

Can i understand what is the difference btw

  1. Terminal from Mac
  2. Terminal from Jupyterlabs from Anaconda
  3. Console from Jupyterlabs from Anaconda

i hv always thought that 1) and 2) are the same?
and is 2 and 3 the same? i tried googling, but not very clear in this area here.

2 Likes

Can you show me what you’re referring to with both 2 and 3? Even though I don’t know what you mean, they should be the same.

this is

  1. terminal from jupyterlabs from anaconda

it has zsh, but somehow when i tried running SQL previously, it didn’t work. only worked with terminal from mac.

  1. console from jupyterlabs from anaconda

So, 2. is just Bash, it’s not zsh. You can run sqlite there to enter the SQLite shell. If you don’t do this, then it will surely not understand SQL commands as it is Bash.

As for 3, it’s a Python shell, more specifically, it is the IPython shell. IPython is basically Jupyter without the pretty GUI. You wouldn’t be able to run SQL commands here because it’s a Python shell, it only understands Python.

2 Likes

ah great thank you so much Bruno for the explanation :grinning: