Forum Discussion

Stevox's avatar
Stevox
Regular Visitor
1 year ago
Solved

Notebook connect

Hello, Please can i connect my MS fabric notebook directly to an azure SQL where i have only read only access to scan through the database and only save information i need? 
  • v-sgandrathi's avatar
    v-sgandrathi
    1 year ago

    HI Stevox,

    Thank you for the follow-up.
    Given your current setup, using spark.read.jdbc() to connect directly from a Microsoft Fabric notebook won't work because you only have the SQL connection string with SQL authentication and no access to configure firewall rules or create a Service Principal.
    The Spark engine in notebooks uses separate outbound IP addresses, which are not permitted by default in Azure SQL firewall settings, causing the connection failure. Although Copy Data and Dataflows succeed, they use Fabric's managed integration runtimes with internal network access. Unfortunately, workspace connections created in Fabric cannot be accessed directly from notebooks at this time and are only available to UI-based tools like Dataflows, Pipelines, and Copy Activity.
    As a workaround, you can use Copy Data or Dataflows to load filtered or minimal required data into a staging Lakehouse table, then run the incremental logic from your notebook. This keeps your notebook-based workflow intact without re-ingesting full datasets each time. Until Microsoft enables native notebook access to workspace connections or shared credentials, this workaround remains the most reliable with your current access level.

    Hope my suggestion gives you good idea, if you have any more questions, please feel free to ask we are here to help you.
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

     

    Best regards,
    Sahasra.