Forum Discussion

msprog's avatar
msprog
Advocate III
10 months ago
Solved

Notebook connecting to SQL Server

HEy

we have a onprem sql server. There is a gateway connection to the sql server. 

Now i want to access this sql server via a pyspark notebook. How can i set up a connection to this please. 

 

thanks

 

  • msprog's avatar
    msprog
    10 months ago

    do you have a link to the announcement please?

10 Replies

Replies have been turned off for this discussion
  • Is that a Fabric notebook? What will you do next after connecting? Run a SQL query and load it into a dataframe?

    • msprog's avatar
      msprog
      Advocate III

      yeah Fabric notebook. I read atable and load into a dataframe. 

  • spencer_sa's avatar
    spencer_sa
    Impactful Individual

    One of the announced features at Fabcon Europe was connections coming to notebooks.

    • msprog's avatar
      msprog
      Advocate III

      do you have a link to the announcement please?

    • spencer_sa's avatar
      spencer_sa
      Impactful Individual

      Justyna has just confirmed that notebook connections don't support On Premise yet.

    • v-hjannapu's avatar
      v-hjannapu
      Community Support

      Hi JibinSebastian,

      Right now, Fabric notebooks don’t support connecting to on-prem SQL Server through the gateway. That’s why you are not able to connect directly from PySpark notebook.

      Regards,
      Community Support Team.

       

  • msprog JibinSebastian You might be able to create a Mirrored SQL database from the on-premise SQL server using an OPDG (on-premise data gateway). It's realtively easy to try but when you are configuring the mirrored database you'd need to use a SQL server account with the admin permission so it can configure CDC. Once the mirroring is working you can create a shortcut to tables in a Lakehouse and now you have full access to the mirrored data from a Notebook.

    • JibinSebastian's avatar
      JibinSebastian
      Advocate II

      Thank you apturlov for your response and efforts, I will  try connecting with  Mirrored SQL database into the fabric.