<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Shivani S Gole on Medium]]></title>
        <description><![CDATA[Stories by Shivani S Gole on Medium]]></description>
        <link>https://medium.com/@shivani.s.gole?source=rss-bd22214130af------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*kdekrGwBTliMSHiVsvDZ6w.jpeg</url>
            <title>Stories by Shivani S Gole on Medium</title>
            <link>https://medium.com/@shivani.s.gole?source=rss-bd22214130af------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 06 Dec 2026 16:41:32 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@shivani.s.gole/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Writing data from an Azure Databricks notebook to an Azure Blob Container: The Fix that actually…]]></title>
            <link>https://medium.com/@shivani.s.gole/writing-data-from-an-azure-databricks-notebook-to-an-azure-blob-container-the-fix-that-actually-522fb0307282?source=rss-bd22214130af------2</link>
            <guid isPermaLink="false">https://medium.com/p/522fb0307282</guid>
            <category><![CDATA[medallion-architecture]]></category>
            <category><![CDATA[data-engineering]]></category>
            <category><![CDATA[spark]]></category>
            <category><![CDATA[azure]]></category>
            <category><![CDATA[azure-databricks]]></category>
            <dc:creator><![CDATA[Shivani S Gole]]></dc:creator>
            <pubDate>Sun, 01 Jun 2025 18:06:26 GMT</pubDate>
            <atom:updated>2025-06-01T18:06:26.430Z</atom:updated>
            <content:encoded><![CDATA[<h3>Writing data from an Azure Databricks notebook to an Azure Blob Container: The Fix that actually works</h3><p>I was recently working on an Azure-based data engineering project focused on Medallion Architecture. I spent more time than I care to admit wrestling with what should’ve been a relatively simple task: writing a Spark DataFrame from my Azure Databricks notebook back to an Azure Blob Storage container.</p><p><strong>My Setup:</strong></p><p>My Databricks notebook was doing exactly three things:</p><ol><li>Reading JSON data from an API. (Raw Data)</li><li>Converting it into CSV.</li><li>Transforming it using PySpark and converting it in Parquet format.</li><li>Writing the final DataFrame back to a different folder in another container as parquet files.</li></ol><p>Here’s the catch: <strong>the read worked perfectly</strong>. The <strong>write didn’t. </strong>I was able to achieve the first three parts easily, as there are enough resources online and I was able to extract the data as well as convert it and read it in parquet format. However, my code was unable to write this data back to Azure Data Lake Storage. This was frustrating as I spent hours to figure out the mounting/permissions and what not.</p><p>I am sharing the wrong v/s right approach through this example.</p><p><strong>THE WORNG APPROACH:</strong></p><p>The approach that was giving me an error was as follows:-</p><ul><li>Mount the Azure blob storage container to the Databricks file system (DBFS)</li></ul><pre>container_name = &#39;{azure-blob-container-name}&#39;<br>storage_name = &#39;{azure-blob-storage-instance-name}&#39;<br>mount_name = &#39;/mnt/financial_survey_data&#39; # This path can be used to access the contents of the blob container <br>sas_key = &#39;{access-key-from-azure-portal}&#39;<br><br>dbutils.fs.mount(<br>  source = &quot;wasbs://%s@%s.blob.core.windows.net&quot; % (container_name, storage_name),<br>  mount_point = mount_name,<br>  extra_configs = {&quot;fs.azure.sas.%s.%s.blob.core.windows.net&quot; % (container_name, storage_name) : sas_key })</pre><ul><li>Get the final form of the wrangled data into a Spark dataframe</li><li>Write the dataframe into parquet format to the mounted blob container</li></ul><pre>    # Create a DataFrame<br>    if detailed_results:<br>        print(detailed_results)<br>        df = spark.createDataFrame(detailed_results)<br>        display(df)<br>        df.write.format(&quot;parquet&quot;).mode(&quot;overwrite&quot;).save(&quot;/mnt/bronze/npi_extract/&quot;)<br>        df.write.format(&quot;delta&quot;).mode(&quot;overwrite&quot;).saveAsTable(&quot;npi_extract&quot;)<br><br>    else:<br>        print(&quot;No detailed results found.&quot;)<br>else:<br>    print(f&quot;Failed to fetch data: {response.status_code} - {response.text}&quot;)</pre><p>Right above is the code block which — when run — was running fine except it never wrote the parquet files in the blob container. I spent tons of time tweaking the code-snippet above based on samples I saw online, but none of them got me anywhere. I also read a lot about giving all sorts of permissions to different functions and that too wasn’t working.</p><p>Now, let’s move on to the final part of this post, which is also the one you’ve been looking forward to — hopefully.</p><p><strong>THE RIGHT APPROACH:</strong></p><p>The solution that finally did the trick was to <strong>bypass the DBFS mount entirely</strong> and write <strong>straight to the Azure Blob Storage container using its </strong><strong>wasbs:// URL</strong>. This direct method eliminates the need to mount the storage account in Databricks.</p><p>Here’s the code snippet that shows how to write a Spark DataFrame as a parquet file directly to the Azure Blob Storage container from an Azure Databricks notebook:</p><pre><br># Configure blob storage account access key globally<br>spark.conf.set(<br>  &quot;fs.azure.account.key.%s.blob.core.windows.net&quot; % storage_name,<br>  sas_key)<br><br>#Define path<br>output_container_path = &quot;wasbs://%s@%s.blob.core.windows.net&quot; % (output_container_name, storage_name)<br>output_blob_folder = &quot;%s/wrangled_data_folder&quot; % output_container_path<br><br># Write DataFrame as single Parquet file<br>(df<br>.coalesce(1)<br>.write<br>.mode(&quot;overwrite&quot;)<br>.option(&quot;header&quot;, &quot;true&quot;)<br>.format(&quot;parquet&quot;)<br>.save(output_blob_folder))<br><br># Get part file and rename<br>files = dbutils.fs.ls(output_blob_folder)<br>part_file = [x for x in files if x.name.startswith(&quot;part-&quot;)][0]<br>final_output_path = f&quot;{output_container_path}/npi_extract/npi_extract_{current_date}.parquet&quot;<br>dbutils.fs.mv(part_file.path, final_output_path, True)<br><br>print(&quot; NPI extract written successfully to Azure Blob Storage.&quot;)<br>    else:<br>        print(&quot;No detailed results found.&quot;)<br>else:<br>    print(f&quot;Failed to fetch data: {response.status_code} - {response.text}&quot;)</pre><p>I hope this helps someone else spend much less time in the frustration of trying to figure this out than I did.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=522fb0307282" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Why and how will ‘studying’ become a hobby? (Part 2)]]></title>
            <link>https://medium.com/@shivani.s.gole/why-and-how-will-studying-become-a-hobby-part-2-775d77f8c088?source=rss-bd22214130af------2</link>
            <guid isPermaLink="false">https://medium.com/p/775d77f8c088</guid>
            <dc:creator><![CDATA[Shivani S Gole]]></dc:creator>
            <pubDate>Wed, 24 May 2023 17:10:57 GMT</pubDate>
            <atom:updated>2023-05-24T17:10:57.770Z</atom:updated>
            <content:encoded><![CDATA[<h3>He who knows himself knows the world!</h3><p>Holla Amigos!</p><p>Since we discussed last week on why should the skill of studying be an important aspect of your life, I thought why not I share my own journey of ‘Self Awareness’.</p><p>You must have heard it a lot that when life throws lemons at you, you make a lemonade. But nobody ever bothered to mention as to how to even make that lemonade!! Uff…</p><p>Well not everyone but most of us need that tight slap to wake up one fine day and realize that all this while you were swimming in mud. And I was in somewhat of a same situation some time back in my life. Hence, the journey of building a curious mindset begins with an ultimate intention to understand yourself.</p><p>I came across a lot of Instagram content of this idea of understanding yourself and becoming self aware. For the longest time, I followed many quotes and pages with the content full of positivity and impact only to realize that I was in fact increasing self denial in my life than bringing any self awareness. The truth of you can not be found in any motivational quote, but only within yourself. To help yourself get there, here are a few things that you can try and test for yourself.</p><p>1. Start Reading</p><p>You can literally start reading anything as reading is a very personal experience. Following somebody else’s way of reading only ‘self help’ or non fiction or a particular kind is not going to be of any help. Reading any big or intense books is also of no use really. Just pick up whatever you feel like reading. My personal recommendation is to start with some short stories but feel free to explore anything and everything.</p><p>Reading is for sure going to expand your thinking and understanding in a way that you will be surprised. It might not make you smarter but it will for sure make you aware that you’re dumb. Here are my top five random recommendations to read.</p><ul><li>The Day I stopped drinking Milk by Sudha Murthy</li><li>Persepolis by Marjane Satrapi (its a graphic novel)</li><li>India Uncut by Amit Varma (this is a blog)</li><li>Aftermath on Marriage and Separation by Rachel Cusk</li><li>A Suitable Boy by Vikram Seth</li></ul><p>2. Start Meditating</p><p>Again this is a very personal experience and doesn’t have to be fancy at all. You can start with as basic as 5 minutes. But giving your mind a few moments of silence shall be of great help.</p><p>To get started you can use some guided meditation and courses by Headspace as this is the one app that has helped me sustain meditation regularly since a good nine months.</p><p>3. Start Journaling</p><p>To really study things and study yourself, writing down is very important. From one word to 5 pages is your choice. The only rule here is let it be absolutely unfiltered. Doesnt have to be any positivity quotes, reasons for gratitude or anything. If you feel nothing, write that down; if you feel shit, write shit and if you feel great then write the same. No need to proofread, grammar check or even thinking about what if someone reads it.</p><p>If you are really unable to pen thoughts down, just get some papers and pen and write till you don’t know what to write. Even if you write, ‘I don’t know what to write, I don’t know what to write, I don’t know what to write….. like 100 times and then you know what to write, that’s perfect. And even after this you still don’t know what to write, then atleast you know that you don’t have anything to write at the moment! Bravo!</p><p>These are few things that if and once you start doing in your life you can see some real change in the way you ‘know’ and understand things around you. You add a flavor of wisdom to yourself!!</p><p>If you like what I speak, then please comment and subscribe to this blog for more content! Thanks :)</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=775d77f8c088" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Why should ‘Studying’ be a hobby?]]></title>
            <link>https://medium.com/@shivani.s.gole/why-should-studying-be-a-hobby-8c81ffeeb3d8?source=rss-bd22214130af------2</link>
            <guid isPermaLink="false">https://medium.com/p/8c81ffeeb3d8</guid>
            <dc:creator><![CDATA[Shivani S Gole]]></dc:creator>
            <pubDate>Wed, 24 May 2023 17:08:35 GMT</pubDate>
            <atom:updated>2023-05-24T17:08:35.002Z</atom:updated>
            <content:encoded><![CDATA[<h3>No, this article doesn’t encourage you to be a ‘Sharmaji ka beta!’</h3><p>‘<em>Curiosity and questions will get you further than confidence and answers.</em>’</p><p>I wish I was the one who wrote it, but I am not. But anyway, if the above question even remotely makes you intrigued then hear me out.</p><p>Going back to the the origins of the actual Indian Education System , Indians were taught traditional Indian subjects like the Indian Religions (notice that I said religions and not promotion of one religion) , Indian Mathematics and Indian Logic to life like Yoga and Ayurveda. Fast forward to the Education System today in India, we must have heard many people and speeches ranting about the system, many TED Talks about coming out of this system and exploring new ways of learning and what not. And the reason is also not new to us. As it was rightly said by Einstein that “Everybody is a genius but if you judge a fish by its ability to climb a tree, it will live its whole life believing that it is stupid” .This is what currently prevails in the education system of the country too.</p><p>So then why am should we exactly talk about ‘developing’ the habit of ‘Studying?’. Well some Sadhus and Rishimunis once said that death is when one stops learning. Again, we must have heard and read this many times, but sometime ago in my life, I had experienced this.</p><p>I experienced an unawareness. The unawareness of everything. From what I am doing as my career, to what I am eating as my food to the unawareness about what I consume as content and majorly, an unawareness about my beliefs about this world. If you ask a curious child about what his beliefs about the world are, he or she would have clarity. Clarity of knowing it or not knowing it. This is the clarity I missed and it troubled me for the largest time.</p><p>So in this age of social media, where we have the information of everything, what do you actually know? Do we really know anything about the people we are connected to us on Instagram as ‘friends’? Do we really know what’s actually happening in the world? Do we really know what is the correct ‘healthy’ way of living? And above all, do we and how much do we really ourselves? But the mystery doesn’t end here. We have the information of everything and everybody’s opinion out there. So do we know whether we know something or anything to its entirety?</p><p>When we actually look closer to this information, we find conflict. Conflict between the sources of the information and conflict between the minds behind them. And some Sadhu and Rishimunis have again said that with information comes conflict and with wisdom clarity. And hence proved, to develop clarity, we need to study what we believe and study what we claim to know.</p><p>This ‘hobby’ and the urge to deeply understand anything and everything will definitely one day or the other lead you to the necessity of studying yourself!</p><p>In the next part, I shall be talking more above how to develop the inquisitiveness to understand the world around you. Thanks!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8c81ffeeb3d8" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Adulting and the career of choice!]]></title>
            <link>https://medium.com/@shivani.s.gole/adulting-and-the-career-of-choice-4c43b261c28b?source=rss-bd22214130af------2</link>
            <guid isPermaLink="false">https://medium.com/p/4c43b261c28b</guid>
            <dc:creator><![CDATA[Shivani S Gole]]></dc:creator>
            <pubDate>Wed, 24 May 2023 17:06:10 GMT</pubDate>
            <atom:updated>2023-05-24T17:06:10.016Z</atom:updated>
            <content:encoded><![CDATA[<h3>To be or not to be, and really, what to be?</h3><p>To be or not to be; that is the question! And moreover as we grow up, what to be is an even more difficult question.</p><p>In the 21st century era of social media, I would also like to pretend to have an opinion and present it to the world. Remember the time you were asked ‘hello baby, what do you want to become when you grow up?’ and the collective favorite answer of all 90s kids was ‘I wanna be an astronaut.’ Honestly, I don’t know why did I even have an answer to this, because flying up in the space was least of my concerns back then. I just said that so that I can procrastinate on thinking about what I actually wanted to become while my elders thought that I am ambitious and studious enough to take me seriously. But that’s not the point. Today if you ask the same question to a child, the answer would most probably be that they want to become a Youtuber or a Social Media Influencer.</p><p>And in the fast pace everchanging world, an average adult would have to go through the atrocities of making a choice in everything! But, is the big choice of career really that easy especially when you actually have the choice of it?</p><p>What if possibly all the careers around the world are not enough to know what you really want to do? Is giving the power of choice actually a smart way of being left with no choice?</p><p>I experienced most of this in my engineering college days. Needless to say that sometimes the uncertainty of what we are actually going to do in life was comforting. Most of us needed those four years to figure out what we really want do? And yet most of us yet do not have it figured out.</p><p>So here it is, I am Shivani; just another engineering graduate next door. Just like how we all feel that we are not limited to our careers, limited to that one thing that we’re supposed to do for the whole goddam life, I feel the same too. Life can never be just about that one profession, that one hobby, that one passion, or that one interest that defines that. Then why limit our curiosity to that one thing only? And hence, this blog is meant to do so. Explore anything and everything from cultures, food and music to technology, self development and careers.</p><p>If you like what I write then please do follow this blog. Thanks!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4c43b261c28b" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>