<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Pros and cons of using SQL in notebook to write data to warehouse vs. stored procedures in Data Engineering</title>
    <link>https://community.fabric.microsoft.com/t5/Data-Engineering/Pros-and-cons-of-using-SQL-in-notebook-to-write-data-to/m-p/4405227#M7133</link>
    <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/612230"&gt;@AlexanderPowBI&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;SPAN class=""&gt;If your workload involves frequent experimentation or requires integration with tools like Spark or Power BI, notebooks might be a better fit.&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN class=""&gt;For standardized, high-performance ETL tasks that need to be reused across multiple pipelines or projects, stored procedures are more suitable.&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN class=""&gt;In Microsoft Fabric specifically, stored procedures often outperform notebooks for large-scale transformations due to their tight integration with the warehouse engine.&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Feature&lt;/TD&gt;&lt;TD&gt;SQL in Notebooks&lt;/TD&gt;&lt;TD&gt;Stored Procedures&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Interactivity&lt;/TD&gt;&lt;TD&gt;Highly interactive; great for exploration and debugging.&lt;/TD&gt;&lt;TD&gt;Less interactive; designed for predefined batch execution.&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Performance&lt;/TD&gt;&lt;TD&gt;May incur overhead; not as optimized for large-scale operations.&lt;/TD&gt;&lt;TD&gt;Precompiled; optimized for high-performance transformations.&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Flexibility&lt;/TD&gt;&lt;TD&gt;Supports integration with other languages (e.g., Python).&lt;/TD&gt;&lt;TD&gt;Limited to T-SQL; less flexible for multi-language workflows.&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Maintainability&lt;/TD&gt;&lt;TD&gt;Can become fragmented in production setups.&lt;/TD&gt;&lt;TD&gt;Modular and reusable; easier to manage in production pipelines.&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Security&lt;/TD&gt;&lt;TD&gt;Relies on workspace-level security; less granular control.&lt;/TD&gt;&lt;TD&gt;Strong RBAC and object-level security controls available.&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If this is helpful , please accept the answer and give kudos&lt;/P&gt;</description>
    <pubDate>Tue, 11 Feb 2025 13:46:27 GMT</pubDate>
    <dc:creator>nilendraFabric</dc:creator>
    <dc:date>2025-02-11T13:46:27Z</dc:date>
    <item>
      <title>Pros and cons of using SQL in notebook to write data to warehouse vs. stored procedures</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/Pros-and-cons-of-using-SQL-in-notebook-to-write-data-to/m-p/4404859#M7127</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;When writing data from a lakehouse to a warehouse (and doing some transformations), I am wondering about theese two options:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1. Create stored procedure in warehouse and trigger it from my pipeline&lt;/P&gt;&lt;P&gt;2. Write the SQL in a notebook and trigger it from my pipeline&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there any major drawbacks of using any of the two approaches?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;//Alexander&lt;/P&gt;</description>
      <pubDate>Tue, 11 Feb 2025 10:35:45 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/Pros-and-cons-of-using-SQL-in-notebook-to-write-data-to/m-p/4404859#M7127</guid>
      <dc:creator>AlexanderPowBI</dc:creator>
      <dc:date>2025-02-11T10:35:45Z</dc:date>
    </item>
    <item>
      <title>Re: Pros and cons of using SQL in notebook to write data to warehouse vs. stored procedures</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/Pros-and-cons-of-using-SQL-in-notebook-to-write-data-to/m-p/4405227#M7133</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/612230"&gt;@AlexanderPowBI&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;SPAN class=""&gt;If your workload involves frequent experimentation or requires integration with tools like Spark or Power BI, notebooks might be a better fit.&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN class=""&gt;For standardized, high-performance ETL tasks that need to be reused across multiple pipelines or projects, stored procedures are more suitable.&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN class=""&gt;In Microsoft Fabric specifically, stored procedures often outperform notebooks for large-scale transformations due to their tight integration with the warehouse engine.&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Feature&lt;/TD&gt;&lt;TD&gt;SQL in Notebooks&lt;/TD&gt;&lt;TD&gt;Stored Procedures&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Interactivity&lt;/TD&gt;&lt;TD&gt;Highly interactive; great for exploration and debugging.&lt;/TD&gt;&lt;TD&gt;Less interactive; designed for predefined batch execution.&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Performance&lt;/TD&gt;&lt;TD&gt;May incur overhead; not as optimized for large-scale operations.&lt;/TD&gt;&lt;TD&gt;Precompiled; optimized for high-performance transformations.&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Flexibility&lt;/TD&gt;&lt;TD&gt;Supports integration with other languages (e.g., Python).&lt;/TD&gt;&lt;TD&gt;Limited to T-SQL; less flexible for multi-language workflows.&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Maintainability&lt;/TD&gt;&lt;TD&gt;Can become fragmented in production setups.&lt;/TD&gt;&lt;TD&gt;Modular and reusable; easier to manage in production pipelines.&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Security&lt;/TD&gt;&lt;TD&gt;Relies on workspace-level security; less granular control.&lt;/TD&gt;&lt;TD&gt;Strong RBAC and object-level security controls available.&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If this is helpful , please accept the answer and give kudos&lt;/P&gt;</description>
      <pubDate>Tue, 11 Feb 2025 13:46:27 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/Pros-and-cons-of-using-SQL-in-notebook-to-write-data-to/m-p/4405227#M7133</guid>
      <dc:creator>nilendraFabric</dc:creator>
      <dc:date>2025-02-11T13:46:27Z</dc:date>
    </item>
    <item>
      <title>Re: Pros and cons of using SQL in notebook to write data to warehouse vs. stored procedures</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/Pros-and-cons-of-using-SQL-in-notebook-to-write-data-to/m-p/4405415#M7137</link>
      <description>&lt;P&gt;Both options work, but the best choice depends on your needs.&lt;/P&gt;&lt;P&gt;I prefer using a notebook because it's more flexible you can mix SQL with Python/PySpark for advanced transformations. It's also easier to debug and test.&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Heavy transformations are usually done in the lakehouse (using PySpark/Spark SQL).&lt;/LI&gt;&lt;LI&gt;Final transformations in the warehouse are often handled via stored procedures for efficiency.&lt;/LI&gt;&lt;LI&gt;Notebooks are great for quick prototyping or handling complex logic.&lt;/LI&gt;&lt;/UL&gt;</description>
      <pubDate>Tue, 11 Feb 2025 15:26:13 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/Pros-and-cons-of-using-SQL-in-notebook-to-write-data-to/m-p/4405415#M7137</guid>
      <dc:creator>ArwaAldoud</dc:creator>
      <dc:date>2025-02-11T15:26:13Z</dc:date>
    </item>
  </channel>
</rss>

