Forum Discussion

RajMamidalaQ's avatar
RajMamidalaQ
Regular Visitor
3 months ago
Solved

Notebooks Not Reusing Spark Sessions Despite Same Session Tag

Scenario:

We have a Master pipeline calling Validate pipeline followed by the Transform pipeline. The Validation pipeline calls the Validation notebook and then Notification notebook. The Transform pipeline calls the Transform notebook. All 3 notebooks, Validation, Notification and Transform, use the same session tag.

Issue:

The Validation notebook takes from 3 minutes to 5 minutes to run, and the Notification notebook then runs faster within 1 minute. The Notification notebook is using the same session as Validation notebook, so it runs faster however the Transform notebook, which is in a different pipeline doesn't reuse the same session and takes 3 minutes to 5 minutes although all notebooks are indirectly triggered by the Master pipeline. Our design with 3 pipelines is modular, reusable and maintainable, so we are not looking to compromise on the design.

Expected Solution:

Notification notebook and Transform notebook having same session tag as Validation notebook should reuse the Validation notebook's session, so that the overall Master pipeline completes in less time.

  • Hi RajMamidalaQ,

     

    Keep your 3 pipelines as-is for standalone/reusable use. In the Master pipeline specifically, instead of using "Invoke Pipeline" activity for Validation, inline the three notebook activities directly in the Master pipeline (not as child pipelines), all sharing the same session tag.

    Your child pipelines (Validate, Transform) remain intact for independent use, the Master pipeline becomes a flat orchestrator with direct notebook calls and a shared session tag.

     

    Hope this helps! Don't forget to accept as solution and thumbs up 👍 in order to keep helping others 🙂 

     

    Best regards,

    Oussama (Data Consultant - Expert Fabric & Power BI)

3 Replies

  • Hi RajMamidalaQ,

     

    Keep your 3 pipelines as-is for standalone/reusable use. In the Master pipeline specifically, instead of using "Invoke Pipeline" activity for Validation, inline the three notebook activities directly in the Master pipeline (not as child pipelines), all sharing the same session tag.

    Your child pipelines (Validate, Transform) remain intact for independent use, the Master pipeline becomes a flat orchestrator with direct notebook calls and a shared session tag.

     

    Hope this helps! Don't forget to accept as solution and thumbs up 👍 in order to keep helping others 🙂 

     

    Best regards,

    Oussama (Data Consultant - Expert Fabric & Power BI)

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

    Hi RajMamidalaQ ,

     

    Thank you oussamahaimoud  for the response provided!

    Has your issue been resolved? If the response provided by the community member addressed your query, could you please confirm? It helps us ensure that the solutions provided are effective and beneficial for everyone.

    Thank you.

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

      Hi RajMamidalaQ ,

       

      I wanted to check if you had the opportunity to review the information provided. Please feel free to contact us if you have any further questions.

      Thank you.