r/MicrosoftFabric • Fabricator • 2d ago

Data Warehouse Stop current session

When I close a T-SQL notebook I get the question if I want to stop the current session. What type of session is there with T-SQL? What happens if I click No?

5 Upvotes

8 comments sorted by

1

u/warehouse_goes_vroom ‪ ‪Microsoft Employee ‪ 2d ago

u/catfabricdw, any insights? I'd expect that if you click no, the executing cell **might** run to completion. But the T-SQL notebook implementation is outside my wheelhouse.

2

u/Mr_Mozart Fabricator 2d ago

I get the message even if there is no cell currently executing

1

u/feignapathy 2d ago

I think every notebook opens up a spark session, regardless of what you're code is in. 

2

u/Mr_Mozart Fabricator 2d ago

Wouldn't we run in to the limit of spark sessions then? The nice thing with T-SQL notebooks is that we don't have that limitation.

2

u/duenalela 1 2d ago

Thanks for asking. I have wondered about that too.

2

u/dbrownems ‪ ‪Microsoft Employee ‪ 1d ago

I believe it's just the "notebook session", but since there's no usable saved state in a TSQL notebook session (unlike a Python or Spark notebook session), it doesn't make much difference.

0

u/MGF1997_2 2d ago

When you start a notebook, it open a spark session in the background. That is why the 1st time you run a notebook it will take a bit longer to start. If you don't need that sparks session, for instance you just want to run a notebook once, I would just click stop. If you have them in your pipelines, you can click no. The spark session will stop automatically anyway after, I think, 5 minutes if there are no more spark requests.

3

u/Mr_Mozart Fabricator 2d ago

I don't think that applies to T-SQL notebooks?