2

I downloaded DataSpell, configured Jupyter Notebook (works) and connected to the database which I'm using (works).

Is there any way now how I can directly refer to chosen tables in the database (via DataSpell environment) or do I still need to write whole connection code inside Jupyter Notebook?

E. g. I'd like to create pandas DataFrame based on table from the Database. Do I need to connect to the database independently from Jupyter Notebook cells and then write SQL select query or I can just assign table which I'm already seeing in Database view into the variable directly (so somehow call it from environment)?

LazyOne
  • 158,824
  • 45
  • 388
  • 391
user782750
  • 21
  • 2
  • You can use https://www.sqlalchemy.org to make the connection directly from the notebook / `pd.read_sql()` - but you still need to create a query somewhere :\ You can also use `connectorx` – jtlz2 Mar 21 '22 at 18:20

0 Answers0