SQLexecutor2

Options
ckilduff16
ckilduff16 Registered Posts: 7 ✭✭✭

Hi,

I have recently encountered a problem with SQLExecutor2. When running a query using SQLExecutor2 in a jupyter notebook if I manually interrupt the kernel or something else interrupts the kernel before the query finishes, SQLExecutor2 seems to never close the connection to the database. After this happens, any new query I try to run from a dataiku notebook never finishes, which I believe is because it is waiting on the first query that never finished. I have looked at the database after cancelling a query from jupyter and have confirmed that the connection was never closed. Has anyone encountered this issue before and is there a manual way to close a connection from SQLExecutor2?

-Cameron


Operating system used: Windows

Tagged:

Answers

  • Alexandru
    Alexandru Dataiker, Dataiku DSS Core Designer, Dataiku DSS ML Practitioner, Dataiku DSS Adv Designer, Registered Posts: 1,209 Dataiker
    Options

    HI @ckilduff16
    ,

    Thanks for reporting this.

    Can you please confirm the SQL database type you are using?
    What version of DSS are you running"?
    Do you notice the same behavior when aborting a Python recipe or just notebooks?

  • ckilduff16
    ckilduff16 Registered Posts: 7 ✭✭✭
    Options

    @AlexT

    Hi AlexT,

    I am using MS SQL Server and DSS version 11.3.1

    I have not tried to run and abort the a query in a python recipe, just in notebooks. Is it possible to open and close a connection in dataiku like sqlalchemy?

  • Turribeach
    Turribeach Dataiku DSS Core Designer, Neuron, Dataiku DSS Adv Designer, Registered, Neuron 2023 Posts: 1,727 Neuron
    Options

    I have seen similar behavoir. When you connec tto a database in code you have to handle a lot of potential issues. My advice will be for you not to use Jupyter Notebooks with code connecting to SQL using the SQL Executor. Either use a SQL Script recipe or a SQL Query Recipe and connect to the datasets in Python. For exploration use SQL Notebooks, which are great ways to data analysis. And if you want to play with the data in Jupyter Notebook then save the SQL Notebook as a recipe and then use the dataset from Jupyter Notebook.

Setup Info
    Tags
      Help me…