<?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 Dian Germishuizen on Medium]]></title>
        <description><![CDATA[Stories by Dian Germishuizen on Medium]]></description>
        <link>https://medium.com/@diangermishuizen?source=rss-ebf4c94d2049------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*YoovIGFTLH8JsG7HyEwOGg.png</url>
            <title>Stories by Dian Germishuizen on Medium</title>
            <link>https://medium.com/@diangermishuizen?source=rss-ebf4c94d2049------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 01 Dec 2026 06:45:34 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@diangermishuizen/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[Get your life back on track with this Notion template!]]></title>
            <link>https://medium.com/@diangermishuizen/get-your-life-back-on-track-with-this-notion-template-fe86177e47e0?source=rss-ebf4c94d2049------2</link>
            <guid isPermaLink="false">https://medium.com/p/fe86177e47e0</guid>
            <category><![CDATA[organisation]]></category>
            <category><![CDATA[apps]]></category>
            <category><![CDATA[notion-template]]></category>
            <category><![CDATA[notion]]></category>
            <category><![CDATA[task-management]]></category>
            <dc:creator><![CDATA[Dian Germishuizen]]></dc:creator>
            <pubDate>Sun, 22 Oct 2023 17:18:57 GMT</pubDate>
            <atom:updated>2023-10-22T17:18:57.676Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/686/1*57W3KvHc-Hqh4hziDz-lqw.png" /></figure><p>If you are like me and and can’t remember what you had for breakfast, then you NEED this Notion template.</p><p>If you are one of the un-initiated, Notion is a magical app that can do oh-so-many-things. It is a note taker, wiki creator, task manager, life organiser etc. etc. etc.</p><p>I have been using Notion for YEARS and will probably never move to another notes/task app ever, because nothing can compete.</p><p>And being the friendly neighbourhood nerd I thought i’d share my Notion setup with you strangers on the internet.</p><p>I keep the template up to date with new features Notion releases, so once you have the link, feel free to come back now and then to see what new goodies I have added !</p><h3>What does the template do, exactly ?</h3><p>A fine question my dear Watson.</p><p>In short,</p><ul><li>List the important areas in your life like Family, Finance, Pets, Work, House &amp; Home and keep all your information on those areas in one place.</li><li>Create new pages for each project in your life like your Reading List, your Grocery List, the itinerary for your next vacation, your medical history records etc.</li><li>Tasks… because we live in the 21st century and need to remember to do things</li><li>A dedicated Work page for all your notes you need at work like Meeting Notes, projects at work, key information like when you get your pay check etc.</li></ul><h3>Cool new things I added to the template recently</h3><p>I was bored today so I added a couple things to the template</p><ul><li>A default meeting note template in the Work area that has a linked view to the tasks database for quick post meeting actions capturing</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/965/1*MK7CBm5VMFFb4YCDk-R-Ew.png" /></figure><ul><li>A contacts database so you can store notes about the people in your life</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*eqLFMxnfTYS62SKa7nb9hw.png" /></figure><ul><li>A resume page that you can be creative in and share your awesomeness to potential employers (you can share a public link to that page to anyone and they can view it in their web browser — pretty cool right ?!)</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*49TM1mYNZn6kDCSbzcl8iw.png" /></figure><ul><li>And lastly, a Financial History database for you to track your StarBucks Pumpkin Spiced Latte addiction to see how badly it is affecting your credit score, because #capitalism</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*R3TQjMnDuXn9X8LSkMhP7w.png" /></figure><h3>More pictures, less words</h3><p>Other features include:</p><p>Tasks in a kanban board view so you can see everything you are ignoring</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*o2Y3AEePsPLTJbk8KkQzaQ.png" /></figure><p>Groceries list with an impossibly good looking spread of veggies</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/779/1*hAnBKvMtzdXP5hsRNXIoNQ.png" /></figure><p>A dedicated area for all your work notes, important information and projects you need to somehow do but it actually takes 3 people to do</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*a4dkPpHVyjIs2xkD66OcJg.png" /></figure><p>Ok thats all you get. To see what other magic it can do, check it out here &gt;</p><h3><a href="https://ko-fi.com/s/fcc1fbb8c7">Notion Template — Ultimate Personal Life Management System using P.A.R.A.T.</a></h3><p><em>If you really love Notion the way I do, consider signing up using my </em><a href="https://notion.grsm.io/dian-germishuizen"><em>Referral Link</em></a><em>, it helps alot :)</em></p><p>Thank you for reading my ramblings, if you want to you can buy me a coffee here: <a href="https://ko-fi.com/diangermishuizen">Support Dian Germishuizen on Ko-fi! ❤️</a></p><p><strong>My Socials</strong></p><p>My Blog: <a href="https://diangermishuizen.com/">diangermishuizen.com</a></p><p>Linked In: <a href="https://www.linkedin.com/in/dian-germishuizen/">Dian Germishuizen | LinkedIn</a></p><p>Twitter: <a href="https://twitter.com/D_Germishuizen">Dian Germishuizen (@D_Germishuizen) / Twitter</a></p><p>Credly: <a href="https://www.credly.com/users/dian-germishuizen/badges">Dian Germishuizen — Badges — Credly</a></p><h3>Tags</h3><p>#notion, #prodoctivity, #template</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fe86177e47e0" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Date Table Generation Notebook for Databricks Unity Catalog]]></title>
            <link>https://medium.com/@diangermishuizen/date-table-generation-notebook-for-databricks-unity-catalog-4c3e47886489?source=rss-ebf4c94d2049------2</link>
            <guid isPermaLink="false">https://medium.com/p/4c3e47886489</guid>
            <category><![CDATA[data]]></category>
            <category><![CDATA[databricks]]></category>
            <category><![CDATA[analytics]]></category>
            <dc:creator><![CDATA[Dian Germishuizen]]></dc:creator>
            <pubDate>Sun, 27 Aug 2023 16:14:16 GMT</pubDate>
            <atom:updated>2023-08-27T16:14:16.189Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/713/1*bAhdmDW0Dpqdxpnr1XZUaw.png" /></figure><p>In this episode of “How do I create a date table from nothing in my chosen platform”? I am covering Databricks.</p><p>No lengthy life story of what bubble tea I was drinking when creating this or childhood memories like some food bloggers. The code is linked below, look at the comments in the notebook if you have questions.</p><p><strong>Features of the date table</strong></p><ul><li><strong>Gregorian fields</strong> — Year, Month, Day, Weekday etc.</li><li><strong>Fiscal Period Fields</strong> — This is configurable to start at any month of the year. There is now day level shift to have the fiscal period start at e.g. the 25th. Only a month level shift.</li><li><strong>Boolean fields</strong> — these are to be used in reporting platforms for easy filtering of special date ranges such as current and last month, previous 12 months, current day etc.</li><li><strong>Retail calendar </strong>— many times companies want to bucket weeks into perfectly comparable fields so that day of week to previous weeks can be compared more accurately.</li><li><strong>Public holidays and special days</strong></li></ul><h3>Pics or it didn’t happen</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1eXDX9MM_XT3YA1vEyJViw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*eZpmtpeL1sf67a9OjHafsw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*g25jQZJH3--BqtY0L-J-lQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*C24Gty21Ij2Z-37sCIA_-A.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jpUFRoY419Y4gKFTpxG4yg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Dw27Iel-vPRD0VQPxByofA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*eyXtuAxw3lhuhXVV9gBOXQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XnVg9BybCmEDHjf2E7xHnQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZBzti7rSKBfDDq0LMpnfYQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3uJ-S2CgBCuTq_dIJYnpVw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ywUTIZBC5yeiLhicW8neRQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xGF9JKmG6O9bQVo7KXQodQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PT8qnTIAUVbT3QWqUIclPQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mOLpJ-gjXgBogtm7nYl92g.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*iFjHBS6-1keP0Yq91gtmBg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ByqfDpoJOB732KcRIAmS2g.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tNlaatePBFuFrgE8HHof7g.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*55BExtk6N_F2OrwuIK5WZQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tWypte3Jujcc9wfCq8AGBQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kCz8kNks9FGF5lUIly3hFQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*m7GtYY45Du7j_LLn4DkAFQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MeKl3sBBY0sywCiXxPSCfw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bPJyyUYlQIYJ_c4f2Nrwjw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rP52uOCeLUN9jpf2kZuRFw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PC4tFQmxeXCz1fr4bP9ZJQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/934/1*L_TtaUiPpp-cRcLBL_yhqQ.png" /></figure><h3>File Download Link</h3><p>Hit up my <a href="https://github.com/DianGermishuizen/diang_blog_code/tree/main/2023-08-27%20-%20Date%20Table%20Generation%20Notebook%20for%20Databricks%20Unity%20Catalog">GitHub</a> to get your paws on the <a href="https://github.com/DianGermishuizen/diang_blog_code/tree/main/2023-08-27%20-%20Date%20Table%20Generation%20Notebook%20for%20Databricks%20Unity%20Catalog">notebook</a></p><p>Thank you for reading my ramblings, if you want to you can buy me a coffee here: <a href="https://ko-fi.com/diangermishuizen">Support Dian Germishuizen on Ko-fi! ❤️</a></p><p><strong>My Socials</strong></p><p>My Blog: <a href="https://diangermishuizen.com/">diangermishuizen.com</a></p><p>Linked In: <a href="https://www.linkedin.com/in/dian-germishuizen/?source=about_page">Dian Germishuizen | LinkedIn</a></p><p>Twitter: <a href="https://twitter.com/D_Germishuizen?source=about_page">Dian Germishuizen (@D_Germishuizen) / Twitter</a></p><p>Credly: <a href="https://www.credly.com/users/dian-germishuizen/badges?source=about_page">Dian Germishuizen — Badges — Credly</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4c3e47886489" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Project Management Like A Boss with Notion]]></title>
            <link>https://medium.com/@diangermishuizen/project-management-like-a-boss-with-notion-4610a92d642b?source=rss-ebf4c94d2049------2</link>
            <guid isPermaLink="false">https://medium.com/p/4610a92d642b</guid>
            <category><![CDATA[notion]]></category>
            <category><![CDATA[project-management]]></category>
            <category><![CDATA[startup]]></category>
            <category><![CDATA[organisation]]></category>
            <category><![CDATA[template]]></category>
            <dc:creator><![CDATA[Dian Germishuizen]]></dc:creator>
            <pubDate>Wed, 04 Jan 2023 08:33:28 GMT</pubDate>
            <atom:updated>2023-01-04T08:33:28.905Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/512/1*AMwbUtj5nDZ70Ox9o8Mt3g.jpeg" /></figure><p>There are many project management tools out there, but for small companies or start-ups they are all either too expensive or too complicated for your needs, or are just plain bad.</p><p>Notion can serve as a project management / company management tool for you if you have basic needs and want a tool that is easy to use and share with your team with low cost.</p><p><strong>I have put together a template that should get you started, then you can expand it as your needs evolve.</strong></p><h3>Features</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/422/1*V-sUFMyHF1qz60CRbAIgTQ.png" /><figcaption>Template Features List</figcaption></figure><p>The template features most things you would need to start out with including tasks, people, expenses, invoices, projects etc.</p><p>Each database has a default template to ensure the properties of your new entries are at the correct standard (and have nice icons assigned to make sure your workspace stays beautiful).</p><h3>People Database</h3><p>To ensure your people stay on top of what they need to be focussing on, each Person page in the People database serves as an HQ for that person.</p><ul><li>It includes all the items assigned to them, whether it be a task, a meeting, leave request, project allocations and more.</li><li>Each person need only go to their personal page and see everyone on their plate for the day and week.</li><li>You as their manager or project manager can also get a view of what they are working on without needing to ask them.</li><li>You can even use it to track the skills each person has to know who to assign to which project.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/481/1*JsETcDb6VRJC4NYSTQcEFw.png" /><figcaption>Person Page Example</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-B6gQgVCS5KOJc5czI2Mbw.png" /><figcaption>Views available to each person on their page</figcaption></figure><h3>Tasks</h3><p>Notion has many features that make it the ultimate task management tool. <br>This includes :</p><h4>Parent and Sub Tasks</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/702/1*LbWCRS95Hn986vDOnJyKeQ.png" /><figcaption>Parent and Sub Tasks</figcaption></figure><h4>Predecessor and Successor Tasks</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/963/1*OdkA93rBWQ3KHkSJBnDyDQ.png" /><figcaption>Predecessor and Successor Tasks</figcaption></figure><h4>Various views on your tasks</h4><p>Including By Priority, By Health, By Due Date etc.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xKoz3XeMJ59Q6AjRDda8ww.png" /><figcaption>Tasks by Priority and Project</figcaption></figure><h4>How to share with your team</h4><p>Notion has advanced permissions management to ensure only the correct people have access to the applicable pages. <br>You can share content using the Share Menu on any given page in many ways, such as:</p><ul><li>To everyone in your workspace — such as for your workspace landing page with news and company wide info</li><li>To specific Team Spaces — such as projects and pages meant for the eyes of specific teams only</li><li>To specific Groups — such as those for specific groups only e.g. Executives, Finance, Management</li><li>To individuals only</li></ul><h3>Give it a try today!</h3><p>Notion can scale with your business while giving you the power to enhance and alter how it looks and works to suit your needs.</p><p>Click the link below to buy the template today and manage your business like a BOSS!</p><p><a href="https://ko-fi.com/s/b8c71756ab"><strong>Link To Template</strong></a></p><p>If you want to roll out this template to your team, use the link below to sign up to Notion and get your people online and productive.</p><p><a href="https://affiliate.notion.so/dian-germishuizen"><strong>Sign Up For Notion TODAY!</strong></a></p><p><em>“For full disclosure, I’m a Notion Partner, so when you sign up with my link, you also help support me and my content!”</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*u8DmW6-ft1cnvIicRWHJ0A.png" /></figure><h3>Other Notion Templates</h3><p>I also have a <a href="https://www.notion.so/templates/ultimate-personal-life-management">personal life management Notion template</a> available as explained in <a href="https://medium.com/@diangermishuizen/how-i-use-notion-to-manage-my-work-and-life-25d115ea5324">this post</a>.</p><h3>Tags</h3><p>#notion, #template, #kanban, #devops, #projectmanagement, #startup, #smallbusiness</p><p>Thank you for reading my ramblings, if you want to you can buy me a coffee here: <a href="https://ko-fi.com/diangermishuizen">Support Dian Germishuizen on Ko-fi! ❤️</a></p><p><strong>My Socials</strong></p><p>My Blog: <a href="https://diangermishuizen.com/">diangermishuizen.com</a></p><p>Linked In: <a href="https://www.linkedin.com/in/dian-germishuizen/?source=about_page">Dian Germishuizen | LinkedIn</a></p><p>Twitter: <a href="https://twitter.com/D_Germishuizen?source=about_page">Dian Germishuizen (@D_Germishuizen) / Twitter</a></p><p>Credly: <a href="https://www.credly.com/users/dian-germishuizen/badges?source=about_page">Dian Germishuizen — Badges — Credly</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4610a92d642b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Persist the List of Files in an External Stage in Snowflake]]></title>
            <link>https://medium.com/@diangermishuizen/persist-the-list-of-files-in-an-external-stage-in-snowflake-2a0e54ab3a30?source=rss-ebf4c94d2049------2</link>
            <guid isPermaLink="false">https://medium.com/p/2a0e54ab3a30</guid>
            <category><![CDATA[data]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[azure]]></category>
            <category><![CDATA[snowflake]]></category>
            <category><![CDATA[analytics]]></category>
            <dc:creator><![CDATA[Dian Germishuizen]]></dc:creator>
            <pubDate>Sun, 21 Aug 2022 09:27:40 GMT</pubDate>
            <atom:updated>2022-08-21T09:31:12.743Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NcF7_1pFAkHiYr5JADNcHg.png" /><figcaption>Snowflake Logo</figcaption></figure><p>In Snowflake, you can access files external to the Snowflake instance using something called a <a href="https://docs.snowflake.com/en/sql-reference/sql/create-stage.html">STAGE</a>. A STAGE is a named object that points to a location such as AWS S3, Azure Storage Account or Google Cloud Storage Buckets, and contains the required authentication credentials to access the files in that storage location.</p><p>To programmatically view what files are available in the stage, you can use the <a href="https://docs.snowflake.com/en/sql-reference/sql/list.html">LIST</a> command.</p><p>The problem is that the LIST command output cannot natively be persisted into a table for later viewing. It can only be executed and viewed via ad-hoc queries triggered by a user session.</p><p>Honestly, this is probably a simple thing for Snowflake to implement as a native feature, but here we are, yet again, trying to figure out workarounds to do the simplest thing in a cloud service. When will this madness ever end…</p><h3>The Workaround</h3><p>Snowflake provides a <a href="https://docs.snowflake.com/en/sql-reference/stored-procedures-javascript.html#using-result-scan-to-retrieve-the-result-from-a-stored-procedure">workaround</a> for this in the form of utilizing the RESULT_SCAN function. In the linked article, they explain the various pieces needed to create the solution below. I have simply taken those pieces and combined them in an easy-to-use set of two stored procedures.</p><p><strong>The gist of it is</strong></p><p>1. Run a JavaScript stored procedure that will execute the list command against the stage. This will return the list of files metadata as a CSV string.</p><p>2. The second stored procedure will call the first procedure, the use the RESULT_SCAN function to extract the results of the first procedure. It will then deconstruct the CSV list and save the records to a table.</p><h3>Procedure 1 — PROCEDURE_LIST_FILES_IN_STAGE</h3><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/9ad01d16ba21eb841a6ae17578d5dbe3/href">https://medium.com/media/9ad01d16ba21eb841a6ae17578d5dbe3/href</a></iframe><h3>Procedure 2 — PROCEDURE_PERSIST_FILES_IN_STAGE</h3><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/bda906150ba48fcf8dcf796ace12f6a6/href">https://medium.com/media/bda906150ba48fcf8dcf796ace12f6a6/href</a></iframe><h3>Use the procedures</h3><p>To use the code, execute the second procedure as follows:</p><blockquote><em>CALL “PROCEDURE_PERSIST_FILES_IN_STAGE”(‘AWS_S3_STAGE’);</em></blockquote><h3>Prerequisites</h3><p>The stage will need to exist before you are able to run these stored procedures. Your user will also need to have permission to use the stage. Please contact your system administrator to arrange these permissions.</p><h3>Tags</h3><p>#data, #analytics, #snowflake, #aws, #azure, #gcp, #external-stage, #internal-stage, #stage</p><p>Thank you for reading my ramblings, if you want to you can buy me a coffee here: <a href="https://ko-fi.com/diangermishuizen">Support Dian Germishuizen on Ko-fi! ❤️</a></p><p><strong>My Socials</strong></p><p>My Blog: <a href="https://diangermishuizen.com/">diangermishuizen.com</a></p><p>Linked In: <a href="https://www.linkedin.com/in/dian-germishuizen/?source=about_page">Dian Germishuizen | LinkedIn</a></p><p>Twitter: <a href="https://twitter.com/D_Germishuizen?source=about_page">Dian Germishuizen (@D_Germishuizen) / Twitter</a></p><p>Credly: <a href="https://www.credly.com/users/dian-germishuizen/badges?source=about_page">Dian Germishuizen — Badges — Credly</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2a0e54ab3a30" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Notion Agile Project Management Kanban Board Template]]></title>
            <link>https://medium.com/@diangermishuizen/notion-agile-project-management-kanban-board-template-fa428814c161?source=rss-ebf4c94d2049------2</link>
            <guid isPermaLink="false">https://medium.com/p/fa428814c161</guid>
            <category><![CDATA[planning]]></category>
            <category><![CDATA[productivity]]></category>
            <category><![CDATA[project-management]]></category>
            <category><![CDATA[notion]]></category>
            <category><![CDATA[agile]]></category>
            <dc:creator><![CDATA[Dian Germishuizen]]></dc:creator>
            <pubDate>Sat, 16 Jul 2022 10:13:03 GMT</pubDate>
            <atom:updated>2022-09-01T18:31:26.776Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pIN2hd_zjW1rNOyOXEaqXA.png" /></figure><p>If you want a project to be successful and deliver what is required on time and within budget, your team has to follow the correct processes using adequate technology in order to track the progress of the project and ensure you have visibility on the status of all tasks and dependencies.</p><p>There are many tools available today that do just that. But most of them require costly monthly subscriptions that small teams or start-ups just can’t afford.</p><p>Luckily, companies out there know how important it is to give small teams and start-ups the tools they need to change the world.</p><h3>My Contribution To Helping Start-Ups Manage Their Projects</h3><p>My contribution to this mindset is a <a href="https://notion.grsm.io/dian-germishuizen">Notion </a>template that can be used to manage your projects and their associated epics, features, requirements, tasks, bugs and issues of a project.</p><p>Any type of project can utilize this agile task management and project delivery tracking mechanism. It is most often implemented in software development projects. You can also associate R.A.I.D. (Risks, Assumptions, Issues, Decisions, Dependencies) items to your projects to ensure proper project governance.</p><p>Since this is a once-off template purchase you can use on Notion for free, you will not need to buy costly subscriptions to enterprise Kanban board software or websites.</p><p>The open and accessible commenting system ensures your team can communicate asynchronously to ensure maximum effectiveness.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/961/1*fibgc8wh5_z_HAhNp3Vy-A.png" /><figcaption>Agile Project Management Kanban Board Notion Template Overview</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/961/1*W4nYQxnxKNqfcVbz2VRzZw.png" /><figcaption>Sample Project Attributes</figcaption></figure><h3>Similar Monthly Subscription-Based Products</h3><p>Other software vendors that implement a similar style of project/task management:</p><ul><li>Azure DevOps Boards</li><li>GitLab Issue Boards</li><li>Atlassian Jira</li><li>Monday.com</li><li>JetBrains YouTrack</li><li>GitHub Project Boards</li></ul><h3>How To Get The Template</h3><p>You can find the template here on the official <a href="https://www.notion.so/templates/agile-project-management">Notion Template Gallery</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Pd9-WEkAbqOHzBAKTYAP1A.png" /><figcaption>Notion Template Gallery Page</figcaption></figure><h3>Other Notion Templates</h3><p>I also have a <a href="https://www.notion.so/templates/ultimate-personal-life-management">personal life management Notion template</a> available as explained in <a href="https://medium.com/@diangermishuizen/how-i-use-notion-to-manage-my-work-and-life-25d115ea5324">this post</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pv9haouQs5g03rYlMURMDQ.png" /><figcaption>Notion Template Gallery Page</figcaption></figure><p><em>If you really love Notion the way I do, consider signing up using my </em><a href="https://notion.grsm.io/dian-germishuizen"><em>Referral Link</em></a></p><h3>Tags</h3><p>#agile, #notion, #template, #kanban, #devops, #projectmanagement</p><p>Thank you for reading my ramblings, if you want to you can buy me a coffee here: <a href="https://ko-fi.com/diangermishuizen">Support Dian Germishuizen on Ko-fi! ❤️</a></p><p><strong>My Socials</strong></p><p>My Blog: <a href="https://diangermishuizen.com/">diangermishuizen.com</a></p><p>Linked In: <a href="https://www.linkedin.com/in/dian-germishuizen/?source=about_page">Dian Germishuizen | LinkedIn</a></p><p>Twitter: <a href="https://twitter.com/D_Germishuizen?source=about_page">Dian Germishuizen (@D_Germishuizen) / Twitter</a></p><p>Credly: <a href="https://www.credly.com/users/dian-germishuizen/badges?source=about_page">Dian Germishuizen — Badges — Credly</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fa428814c161" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Get the Iteration of a Weekday in a Month on a Virtual Calendar]]></title>
            <link>https://medium.com/@diangermishuizen/get-the-iteration-of-a-weekday-in-a-month-on-a-virtual-calendar-b3bba43ce99e?source=rss-ebf4c94d2049------2</link>
            <guid isPermaLink="false">https://medium.com/p/b3bba43ce99e</guid>
            <category><![CDATA[calendar]]></category>
            <category><![CDATA[code]]></category>
            <category><![CDATA[analytics]]></category>
            <category><![CDATA[sql]]></category>
            <category><![CDATA[data]]></category>
            <dc:creator><![CDATA[Dian Germishuizen]]></dc:creator>
            <pubDate>Thu, 16 Jun 2022 10:16:03 GMT</pubDate>
            <atom:updated>2022-06-16T10:20:38.418Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/836/1*rP-L-x7RUhcPvOf-a61Usg.png" /><figcaption>SQL Server Calendar Icon</figcaption></figure><p>There are many situations where you need to identify the iteration of a weekday within a given month. Most commonly though is for the identification of public holidays e.g., the 4th Thursday in November — Thanksgiving in USA.</p><p>There are no built-in methods to get this information in any SQL-based platform I have used thus far — if you know of one, please let me know.</p><p>So, I created a table-valued function to extract this information from a given Year and Month. However, in order to do this, we need a base calendar table to work with. So, as a bonus, I have included a table-valued function to generate a virtual calendar table we can use for this purpose.</p><p><strong>Final output you can expect</strong></p><p>The below image shows the output of the function when you call it for 2022 January to get all the Mondays that occur.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/525/1*wMOmn1tzq8yZVrnBmVzLaw.png" /><figcaption>Sample Output for 2022-January Mondays</figcaption></figure><h3>Virtual Calendar Table</h3><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/acb3b5e6c803d2c7b6fb57b8cae3443d/href">https://medium.com/media/acb3b5e6c803d2c7b6fb57b8cae3443d/href</a></iframe><h4>Key aspects of the virtual date table</h4><ol><li>It will generate a list of dates between the given start date and end date.</li></ol><p>2. It uses a succession of cross joins to generate the list of rows and then calculates the dates from that. The original idea for this row number generation came from itprotoday — <a href="https://www.itprotoday.com/sql-server/packing-intervals-priorities">https://www.itprotoday.com/sql-server/packing-intervals-priorities</a></p><ul><li>It starts by creating a 2-row table from hardcoding a SELECT that unions with another SELECT</li><li>From there it CROSS JOINs the table to itself to increase the number of rows by an exponent of 2.</li><li>This pattern repeats 6 times to generate a large list of rows.</li></ul><h3>Get All Iterations Of Weekday In Year Month Code</h3><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/46fba9002c792685e265474e30e08e07/href">https://medium.com/media/46fba9002c792685e265474e30e08e07/href</a></iframe><h4>Key Aspects Of The Function</h4><p>1. The output table provides all instances of the weekday in the month e.g. the First, Second, Third, Fourth, Fifth and Last iteration as a single row table.</p><p>2. If the weekday only occurs four times, the Fifth column returns null.</p><p>3. You need to provide the Year and Month range.</p><p>4. You need to provide the weekday name to extract e.g. Monday, Tuesday etc.</p><p>5. This function relies on the virtual date table above. However, if you have a calendar table already, it can be adapted to read from that instead.</p><h3>Tags</h3><p>#data, #analytics, #sqlserver, #calendar, #sql, #t-sql</p><p>Thank you for reading my ramblings, if you want to you can buy me a coffee here: <a href="https://ko-fi.com/diangermishuizen">Support Dian Germishuizen on Ko-fi! ❤️</a></p><p><strong>My Socials</strong></p><p>My Blog: <a href="https://diangermishuizen.com/">diangermishuizen.com</a></p><p>Linked In: <a href="https://www.linkedin.com/in/dian-germishuizen/?source=about_page">Dian Germishuizen | LinkedIn</a></p><p>Twitter: <a href="https://twitter.com/D_Germishuizen?source=about_page">Dian Germishuizen (@D_Germishuizen) / Twitter</a></p><p>Credly: <a href="https://www.credly.com/users/dian-germishuizen/badges?source=about_page">Dian Germishuizen — Badges — Credly</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b3bba43ce99e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How I use Notion to manage my work and life]]></title>
            <link>https://medium.com/@diangermishuizen/how-i-use-notion-to-manage-my-work-and-life-25d115ea5324?source=rss-ebf4c94d2049------2</link>
            <guid isPermaLink="false">https://medium.com/p/25d115ea5324</guid>
            <category><![CDATA[template]]></category>
            <category><![CDATA[notion]]></category>
            <category><![CDATA[notion-template]]></category>
            <category><![CDATA[productivity]]></category>
            <dc:creator><![CDATA[Dian Germishuizen]]></dc:creator>
            <pubDate>Sun, 29 May 2022 14:37:22 GMT</pubDate>
            <atom:updated>2022-12-16T12:58:57.412Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pIN2hd_zjW1rNOyOXEaqXA.png" /><figcaption>Notion Logo</figcaption></figure><blockquote><strong><em>Last updated the template December 16, 2022</em></strong></blockquote><p>I have been searching for the perfect tool to manage my tasks for my personal life and work-life for years. I tried so many tools — Microsoft ToDo, TickTick, Any.do, Google Tasks etc. I had to move on from all of them eventually because they could never give me what I needed. I have been using Notion for about 2 years now, and I am never going back.</p><h3>What is Notion</h3><p><a href="https://notion.grsm.io/dian-germishuizen">Notion </a>is an online note-taking, task-tracking, wiki-docs managing, team collaboration unicorn of a productivity tool.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bG_AtvixI_51eBhpNczeGA.png" /><figcaption>Notion Page Example</figcaption></figure><p>Think of it as a <a href="https://www.notion.so/product">living document</a> that you can use in your personal life, or as part of a team in an organisation, to store all your notes, tasks, &amp; documentation information.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/1*tc7eqW9wCKeq0ae_oEb3CA.png" /><figcaption>Meeting Notes Example</figcaption></figure><p>You can customize your workflow to the nth degree so it is as easy or as advanced as you need it to be. Start with only a single page and make a to-do list, or create a collection of interrelated databases to manage your entire life.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kDvBIQJBvh3pPP4nTY5l0g.png" /><figcaption>Kanban Board Example</figcaption></figure><p>With the built-in first-party templates and community created templates, there is endless inspiration for your next page.</p><p>Some of the more popular templates out there include</p><ul><li>Company Home</li><li>Product Development Roadmap</li><li>Meeting Notes List</li><li>Wiki Documents</li><li>Content creation calendar</li><li>Task tracking system</li><li>New hire onboarding system</li></ul><p>The list is ENDLESS!</p><h3>Building Blocks</h3><h4>Pages</h4><p>Notion is made up of pages which contain one or more blocks.</p><p>As per the <a href="https://www.notion.so/help/what-is-a-block">notion website</a>:</p><blockquote><em>Think of Notion as a bottomless bin of building blocks. Build whatever you want, however you want! Every page you create in Notion will be composed of many “blocks,” in the same way a LEGO castle is composed of many LEGO bricks</em></blockquote><p>A block can be a piece of plain text, an image, a table, a link etc.</p><p>Here is an illustration from Notion’s guide on <a href="https://www.notion.so/help/what-is-a-block">What is a block</a>?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XHrEMZrMnf4YIWONuHZ4Zw.png" /><figcaption>Block Types</figcaption></figure><p>Blocks can easily be transformed from one type into another, and even drag-and-drop re-arranged as follows:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JeyrR1aqye7GrqlNNZKPlQ.png" /><figcaption>Dragging a block to a new location</figcaption></figure><h4>Databases</h4><p><a href="https://www.notion.so/help/category/databases">Databases</a> in Notion are how you can truly extract the most out of the tool.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*txLIwalaspv7wQSuDQprww.png" /><figcaption>Database View</figcaption></figure><p>Databases are a mechanism to structure your pages in a way where you can easily organise, categorise, filter, label and search the pages however you need it.</p><p>You can use the <a href="https://www.notion.so/cdn-cgi/image/format=auto,width=1920,quality=100/https:/images.ctfassets.net/spoqsaf9291f/5ohPxpMKz89CXIN9n8gKdP/26f7b7ee17a392075f4d51ab6be1a2dc/View_Layout.png">views</a> mechanism to show the same set of pages either as a table, a list, a timeline, a Kanban board, a calendar or a gallery.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Z-9wKiS3-1iNuQZy8fn5DQ.png" /><figcaption>Database View Types</figcaption></figure><h4>Database Templates</h4><p>A <a href="https://www.notion.so/help/database-templates">database template</a> is a way you can create a generic version of the page layout once, then each time you need a new instance you can instantiate it using the template and just fill in the gaps.</p><p>Go from a blank page to multiple pre-created blocks that create a layout to enable you to get going as soon as possible.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9sW2o0TTtshgVVeCZGDVxA.png" /><figcaption>Database Template Button</figcaption></figure><h4>Integrations</h4><p>For the advanced users, you can utilise <a href="https://www.notion.so/integrations">Integrations</a> to amplify and automate your workspace even more.</p><p><em>“View the content and status of Jira tasks, Slack threads, GitHub issues, and more — without leaving Notion.”</em></p><p>Automate your workflow using Zapier, Make or Tray.io. These tools hook into your workspace, so when you create a new page in the database, that page can get synced to other tools like GitHub, Google Calendar, Google Drive, Jira, Trello etc. to keep your other tools up to date as well.</p><h3>How I use Notion</h3><p>The biggest benefit of <a href="https://notion.grsm.io/dian-germishuizen">Notion</a> is also its biggest weakness — it’s an open playground where you can do whatever you want. This can very quickly devolve into an unorganized mess of disconnected pages where you can’t find anything anymore.</p><p>To fix this issue in my own workspace, I implemented the P.A.R.A. methodology.</p><p>It stands for Projects, Areas, Resources, Archive.</p><p>I first heard of this methodology from Tiago Forte on his website <a href="https://fortelabs.co/blog/para/">Forte Labs</a>.</p><p>I made it my own slightly by adding a T to the acronym for Tasks.</p><ul><li><strong>Areas</strong> are the spheres of activity in your life with a standard you need to maintain over a long period of time. E.g. Your House, Your Career, Your Family, Your Hobbies, Your Car etc.</li><li><strong>Projects</strong> are sub-sections of your areas where you can group information into more concise formats such as a project for each hobby you have, a project for each pet you have, a project for each client you work with at work etc.</li><li><strong>Resources</strong> are topics, themes, articles, books, notes and whatever else that are not time bound and can relate to more than one project or area over time. Here is where you would save articles you found online you would like to refer back to later. Or notes on the books you are reading. Lists of applications you always install on a new laptop etc.</li><li><strong>Archive</strong> is a place or mechanism to place or tag inactive items from the other categories without deleting them entirely (I personally just delete stuff, so this doesn’t feature in my own workspace)</li><li><strong>Tasks</strong> are small pieces of actionable items you have to complete on a specific date. E.g. send an email to my boss to tell them I will come in late tomorrow, take out the trash, pay my electricity bills etc.</li></ul><h3>Template</h3><p>Putting this in place can be quite daunting, so I have put together a template that you can duplicate to your own Notion workspace to get you started. You don’t have to buy the template. If you follow the Forte Labs link I posted above you will get all the same resources I had when I created the template for myself. If you are a little lazy like me ;) , check out the template to jumpstart your productivity here &gt;</p><p><a href="https://ko-fi.com/s/fcc1fbb8c7">Notion Template — Ultimate Personal Life Management System using P.A.R.A.T.</a></p><p><em>If you really love Notion the way I do, consider signing up using my </em><a href="https://notion.grsm.io/dian-germishuizen"><em>Referral Link</em></a></p><h4>Template Features Change Log</h4><p><strong><em>Initial Release</em></strong></p><ul><li>Areas database to categorize all the areas of your life (House and Home, Finances, Family, Work etc.)</li><li>Projects database to store related information by area (Vacations, admin, information about your pets etc.)</li><li>Tasks database to keep on top of your to-do list</li><li>Meeting notes database to take notes in so you always remember your action items from the meeting</li><li>Resources database to store links, notes, articles, recipes or whatever else you need to store long term</li><li>Inbox database to send articles to from your phone for later viewing and classification</li><li>Work page that can serve as your dashboard for all tasks and projects related to your daily 9–5</li><li>Habit Tracker to ensure you achieve your goals</li></ul><p><strong><em>August 28, 2022</em></strong></p><ul><li>Added a default template to the tasks database so it has an icon by default.</li><li>Added the Status Text field to the tasks database. So you can see a short description of the status in the board view.</li><li>Added new default views to the tasks linked view in the work page such as Calendar.</li><li>Added a Grocery list project to the House and Home Area</li><li>Added a Recurring Finance Checks project with a Bills database so you can capture the bills that need to be paid monthly. It will also show you the total amount you spent on those bills over time.</li><li>Added a “Mobile Tasks View” page showing a condensed version of the tasks database for easy viewing on your phone</li><li>Added a medical history project and database to keep track of procedures performed over time.</li></ul><p><strong><em>December 16, 2022</em></strong></p><ul><li>Added the Parent to Sub-Item view in the table view for tasks</li><li>Added the new Dependencies view for tasks in the Timeline view</li><li>Added an informational section to show you how to use the Repeating Tasks Template option now available.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*NFlXBV0H15bV1v9DeM-oXA.png" /></figure><h3>Tags</h3><p>#notion, #prodoctivity, #template</p><p>Thank you for reading my ramblings, if you want to you can buy me a coffee here: <a href="https://ko-fi.com/diangermishuizen">Support Dian Germishuizen on Ko-fi! ❤️</a></p><p><strong>My Socials</strong></p><p>My Blog: <a href="https://diangermishuizen.com/">diangermishuizen.com</a></p><p>Linked In: <a href="https://www.linkedin.com/in/dian-germishuizen/?source=about_page">Dian Germishuizen | LinkedIn</a></p><p>Twitter: <a href="https://twitter.com/D_Germishuizen?source=about_page">Dian Germishuizen (@D_Germishuizen) / Twitter</a></p><p>Credly: <a href="https://www.credly.com/users/dian-germishuizen/badges?source=about_page">Dian Germishuizen — Badges — Credly</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=25d115ea5324" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Dynamic SQL in Databricks and SQL Server]]></title>
            <link>https://medium.com/learning-sql/dynamic-sql-in-databricks-and-sql-server-5a99120b6d61?source=rss-ebf4c94d2049------2</link>
            <guid isPermaLink="false">https://medium.com/p/5a99120b6d61</guid>
            <category><![CDATA[azure-synapse-analytics]]></category>
            <category><![CDATA[dynamic-sql]]></category>
            <category><![CDATA[analytics]]></category>
            <category><![CDATA[databricks]]></category>
            <category><![CDATA[sql]]></category>
            <dc:creator><![CDATA[Dian Germishuizen]]></dc:creator>
            <pubDate>Sun, 22 May 2022 15:48:00 GMT</pubDate>
            <atom:updated>2023-12-03T19:08:15.239Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BF-55OtBjAiWAqSI-OoSfw.png" /><figcaption>SQL Logo — Image via Microsoft’s Analytics In A Day Workshop Presentation — <a href="https://partner.microsoft.com/en-us/asset/collection/analytics-in-a-day#/">Analytics In A Day (microsoft.com)</a></figcaption></figure><h3>What is dynamic SQL?</h3><p>Dynamic SQL is a programming technique where you write a general purpose query and store it in a string variable, then alter key words in the string at runtime to alter the type of actions it will perform, the data it will return or the objects it will perform these actions on before it is actually executed.</p><p>Some form of dynamic SQL execution exists on all technologies that support the SQL language.</p><p>In this article, I will focus on Microsoft SQL Server (On-Premises or Azure) and Databricks.</p><h3>Use Cases</h3><ol><li>In <strong>Azure Synapse Analytics</strong> (Serverless and Dedicated Pool) you can <strong>dynamically generate an external table</strong> pointing to a location in the data lake which is determined at runtime. This is ideal when you want the external table to only point to the latest file available in a lake, not all historical files.</li><li><strong>Maintenance </strong>— you can perform the same maintenance task on a large set of objects when you make the maintenance code dynamic in terms of the object it interacts on. These actions can be to maintain indexes, drop tables not needed, clear the cache of databases etc.</li><li><strong>Pivot and Unpivot</strong> — you can create a stored procedure to pivot or unpivot a table structure based on the column names sent in as parameters. This means you never have to google how to do the actual pivot or unpivot again — joy!</li><li><strong>JSON Normalization</strong> — you can dynamically normalize a JSON object or array by dynamically getting all the attributes from the JSON string and generating the code to persist the normalized structure.</li><li><strong>Optimized data retrieval</strong> — this is very useful for databases that get requests from multiple users at a time. You can create a dynamic query that will filter a column based on the value sent in from a front end application at runtime. This means a reduced set of data is returned, increasing performance and security.</li></ol><p>These are but a few, I am not going to list all the use cases, I do have a life you know…</p><h3>Benefits</h3><p>The main benefit is you can <strong>increase the level of automation</strong> of your application by having code be generated dynamically, saving your developers the time of writing it all out manually. Especially if the majority of the structure of the query is the same with only minor differences here and there.</p><h3>Considerations</h3><ol><li><strong>Dynamic SQL can be hard to debug</strong>. I typically print out the SQL statement generated first before ever adding the EXEC statement at all so I can investigate the code generated and run it manually before letting SQL run it for me.</li><li>It is <strong>vulnerable to SQL Injection attacks</strong>, especially if you rely on input from users and not input from secure backend sources the users don’t interact with.</li><li>It can be <strong>slower to execute due to the execution plans</strong> the SQL engine uses to perform the actions the code instructs having to be generated anew each time — depending on the degree to which the query statement is altered as part of your dynamic-ness.</li></ol><h3>SQL Server Example</h3><p>In this example, the query will filter the table based on a dynamic value passed in at runtime.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/26d5009f5fa2f30a18dafedd2cbe64a5/href">https://medium.com/media/26d5009f5fa2f30a18dafedd2cbe64a5/href</a></iframe><p>When we execute this piece of code as part of a stored procedure and pass in the value 123, the final resulting code will look like the below.</p><pre>SELECT *<br>FROM [dbo].[Customers]<br>WHERE [Customers].[CustomerID] = 123</pre><h3>Databricks Example</h3><p>In Databricks, there are situations where using SQL is the better choice over Python or Scala to perform certain actions, e.g. when working with Delta tables and merging new data into it.</p><p><strong>Some pre-requisites for the below example:</strong></p><ol><li>You need to have a dataframe already defined earlier in the notebook and have it saved as a temporary view called sourceTemporaryView</li><li>The dataframe must have a field called ProductCategory to apply the partitioning on. This line can actually also be made dynamic to pass in a dynamic field name to partition on.</li><li>You must have a linked data lake where the data for this delta table will be stored. This location is defined by the vDeltaTablePath variable value. This should ideally be the path to a mounted data lake location.</li></ol><p>Here is an example of python code where you can dynamically generate a new Delta table using SQL based on the data in a pre-defined dataframe.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/65d362b189e4a3061315bff735f7e6fe/href">https://medium.com/media/65d362b189e4a3061315bff735f7e6fe/href</a></iframe><p>The final sql query generated and executed can look something like this</p><pre>CREATE TABLE IF NOT EXISTS silver.Product <br>USING DELTA <br>LOCATION &#39;/mnt/silver/WorldWideImporters/Batch/Product/&#39; <br>PARTITIONED BY ( ProductCategory )<br>AS<br>SELECT * FROM sourceTemporaryView</pre><h3>Closing Arguments</h3><p>This article only gave a very high-level overview of the potential that dynamic SQL holds.</p><p>But remember, with great power, comes great responsibility.</p><p>Only use dynamic SQL when necessary as it comes with a cost — see the considerations above.</p><p>Ok, good luck, have fun, and don’t accidentally drop the production database using this information, I take no responsibility.</p><h3>Tags</h3><p>#analytics, #automation, #data, #databricks, #synapse-analytics, #synapse-analytics-serverless, #t-sql</p><p>Thank you for reading my ramblings, if you want to you can buy me a coffee here: <a href="https://ko-fi.com/diangermishuizen">Support Dian Germishuizen on Ko-fi! ❤️</a></p><p><strong>My Socials</strong></p><p>My Blog: <a href="https://diangermishuizen.com/">diangermishuizen.com</a></p><p>Linked In: <a href="https://www.linkedin.com/in/dian-germishuizen/?source=about_page">Dian Germishuizen | LinkedIn</a></p><p>Twitter: <a href="https://twitter.com/D_Germishuizen?source=about_page">Dian Germishuizen (@D_Germishuizen) / Twitter</a></p><p>Credly: <a href="https://www.credly.com/users/dian-germishuizen/badges?source=about_page">Dian Germishuizen — Badges — Credly</a></p><p><strong>Go from SELECT * to interview-worthy project. </strong><a href="https://learning-sql.ck.page/aa03293372"><strong>Get our free 5-page guide</strong></a><strong>.</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5a99120b6d61" width="1" height="1" alt=""><hr><p><a href="https://medium.com/learning-sql/dynamic-sql-in-databricks-and-sql-server-5a99120b6d61">Dynamic SQL in Databricks and SQL Server</a> was originally published in <a href="https://medium.com/learning-sql">Learning SQL</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Calculate Easter Sunday Dynamically using SQL]]></title>
            <link>https://medium.com/@diangermishuizen/calculate-easter-sunday-dynamically-using-sql-447235cb8906?source=rss-ebf4c94d2049------2</link>
            <guid isPermaLink="false">https://medium.com/p/447235cb8906</guid>
            <category><![CDATA[easter]]></category>
            <category><![CDATA[sql-server]]></category>
            <category><![CDATA[holidays]]></category>
            <category><![CDATA[azure-synapse-analytics]]></category>
            <category><![CDATA[sql]]></category>
            <dc:creator><![CDATA[Dian Germishuizen]]></dc:creator>
            <pubDate>Sun, 22 May 2022 15:41:31 GMT</pubDate>
            <atom:updated>2022-05-22T15:41:31.233Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BF-55OtBjAiWAqSI-OoSfw.png" /><figcaption>SQL Logo</figcaption></figure><p>In any data warehousing or analytics solution, you will eventually need to generate a calendar table in order to perform time intelligence analytics.</p><p>One key aspect that most businesses will require is to view KPIs by working days only i.e. days when the business was operating normally. Each business will have their own unique rule sets as to what constitutes a work day, but there are a few standard rules that should apply to the vast majority (perhaps excluding retail).</p><p><strong>Namely:</strong> Any day is a working day except</p><ul><li>Weekends — Saturday &amp; Sunday</li><li>Public Holidays</li></ul><p>Weekends are pretty easy to identify, but public holidays not as much. Most public holidays are associated with fixed dates e.g. Christmas is always December 25th. But the most elusive one is Easter Sunday, because it does not occur on a fixed date each year.</p><p>In this post, I will demonstrate a technique to dynamically calculate the date of Easter Sunday so that you can allocate that public holiday dynamically on your calendar table in an SQL relational database system without the need for a manually curated list of public holidays.</p><h3>Quick Maths</h3><p>According to <a href="https://en.wikipedia.org/wiki/Date_of_Easter">Wikipedia </a>:</p><blockquote>Easter is celebrated on the first Sunday after the Paschal full moon, which is the first full moon on or after 21 March (a fixed approximation of the March equinox). Determining this date in advance requires a correlation between the lunar months and the solar year, while also accounting for the month, date, and weekday of the Julian or Gregorian calendar.[4] The complexity of the algorithm arises because of the desire to associate the date of Easter with the date of the Jewish feast of Passover which, Christians believe, is when Jesus was crucified.</blockquote><p>There are a few algorithms to calculate Easter Sunday taking the above into account. One such algorithm is the Meeus’s Julian algorithm.</p><p>Fellow SQL Nerd <a href="http://sqlsunday.com/">sqlsunday.com</a> posted this article called “<a href="https://sqlsunday.com/2014/07/06/calculating-easter/comment-page-1/">Calculating The Date Of Easter Sunday</a>” on 2014–07–05.</p><p>He essentially took the Meeus’s Julian algorithm and SQL’ified it.</p><p>I then decided to alter his code to my own flavour of syntax to produce the below Scalar User Defined Function.</p><h3>Scalar User Defined Function Version</h3><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/cdde8648c6a6376317c661589129e0a6/href">https://medium.com/media/cdde8648c6a6376317c661589129e0a6/href</a></iframe><p>The code above should work in any SQL based system that supports user defined scalar functions e.g. Microsoft SQL Server.</p><p>However, there are some SQL systems out there that do not. Hence…</p><h3>Inline Table Valued User Defined Function Version</h3><p>This Inline Table Valued User Defined Function was purposefully designed because Azure Synapse Analytics Serverless does not support Scalar User Defined Function Versions (for some stupid reason, ugh).</p><p>Thus, I took the same logic that was used in the Scalar Function and made it return as a Inline Table Valued User Defined Function instead.</p><p>The only difference is in how you would call this function — see the example in the comment section at the top of the function definition.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/2f6039956995a602cfd0b6eb2c6dd0c1/href">https://medium.com/media/2f6039956995a602cfd0b6eb2c6dd0c1/href</a></iframe><h3>On the next episode of Dragonball Z</h3><p>These functions are nifty, but need to be incorporated into larger Calendar generation procedures.</p><p>Look out for future posts that show just how to do that.</p><h3>Tags</h3><p>#analytics, #calendar, #public-holiday, #sqlserver, #synapse-analytics-serverless, #t-sql</p><p>Thank you for reading my ramblings, if you want to you can buy me a coffee here: <a href="https://ko-fi.com/diangermishuizen">Support Dian Germishuizen on Ko-fi! ❤️</a></p><p><strong>My Socials</strong></p><p>My Blog: <a href="https://diangermishuizen.com/">diangermishuizen.com</a></p><p>Linked In: <a href="https://www.linkedin.com/in/dian-germishuizen/?source=about_page">Dian Germishuizen | LinkedIn</a></p><p>Twitter: <a href="https://twitter.com/D_Germishuizen?source=about_page">Dian Germishuizen (@D_Germishuizen) / Twitter</a></p><p>Credly: <a href="https://www.credly.com/users/dian-germishuizen/badges?source=about_page">Dian Germishuizen — Badges — Credly</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=447235cb8906" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Function to mount a storage account container to Azure Databricks]]></title>
            <link>https://medium.com/@diangermishuizen/function-to-mount-a-storage-account-container-to-azure-databricks-7c025d283932?source=rss-ebf4c94d2049------2</link>
            <guid isPermaLink="false">https://medium.com/p/7c025d283932</guid>
            <category><![CDATA[azure]]></category>
            <category><![CDATA[automation]]></category>
            <category><![CDATA[azure-data-lake]]></category>
            <category><![CDATA[analytics]]></category>
            <category><![CDATA[databricks]]></category>
            <dc:creator><![CDATA[Dian Germishuizen]]></dc:creator>
            <pubDate>Sun, 22 May 2022 15:35:08 GMT</pubDate>
            <atom:updated>2022-05-22T15:35:08.959Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/717/1*V0YMKb4L0Wn9FWFs5bJcRw.png" /><figcaption>Databricks and PySpark Logo</figcaption></figure><h3>What does it mean to mount a storage account to Azure Databricks</h3><p>Databricks has a built in “Databricks File System (DBFS)”. It is a distributed file system mounted onto your Databricks workspace. It is mounted directly to your cluster and is only accessible while the cluster is running. It is an abstraction on object storage. The benefits of this approach include:</p><ul><li>You can mount external data storage mediums to DBFS to enable seamless access to the data without re-specifying the access credentials every time you want to access the data</li><li>It allows you to interact with files using directory and file path semantics instead of cumbersome URLs that are unique to the storage account service you are using</li><li>It allows you to persist data after processing it.</li></ul><h3>DBFS root</h3><p>The default storage location in DBFS is known as the DBFS root. Databricks stores its internal working objects here. It is advised to not work in this area and rather mount your own custom storage medium instead as an additional mount point. The DBFS root is not intended for production customer data.</p><h3>Mount object storage to DBFS</h3><p>Manually writing the code to correctly mount your Azure Storage Account to Databricks can become cumbersome.</p><p>Here is a function you can use to ease this burden.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/1b594a45bf4c21e5114ac1dd7593633d/href">https://medium.com/media/1b594a45bf4c21e5114ac1dd7593633d/href</a></iframe><h3>Prerequisites</h3><ol><li>You must have a Azure Key Vault secret scope linked to your Databricks workspace (recommended). Or alternatively you should have your secrets stored in a Databricks Backed Secret Scope. This is where the sensitive values used for authentication are stored.</li><li>You must already have an Azure Storage Account created which has Hierarchical Namespaces enabled — this is what makes it a Data Lake and influences what endpoints can be used to connect to the storage account.</li><li>You must have a Service Principle created in your Active Directory. This is the account that will be used for authentication and authorization.</li><li>The Service Principle must have Storage Blob Data Contributor rights on the storage account.</li><li>The secret scope and secret names are hardcoded, so you should either setup your environment to match this code, or edit the function to match your environment.</li></ol><h3>Usage</h3><p>This function can now be called at any point in time to mount a container from your storage account to Databricks.</p><p><em>Tip, store this in a separate notebook and run the %run magic command in other notebooks where you need this function.</em></p><p>Note, it cannot mount a nested directory, only a container. For this to work you need to edit the path specified in the function on line 35 to add the directory name at the end after the final.</p><h3>Tags</h3><p>#data, #databricks, #datalake, #pyspark</p><p>Thank you for reading my ramblings, if you want to you can buy me a coffee here: <a href="https://ko-fi.com/diangermishuizen">Support Dian Germishuizen on Ko-fi! ❤️</a></p><p><strong>My Socials</strong></p><p>My Blog: <a href="https://diangermishuizen.com/">diangermishuizen.com</a></p><p>Linked In: <a href="https://www.linkedin.com/in/dian-germishuizen/?source=about_page">Dian Germishuizen | LinkedIn</a></p><p>Twitter: <a href="https://twitter.com/D_Germishuizen?source=about_page">Dian Germishuizen (@D_Germishuizen) / Twitter</a></p><p>Credly: <a href="https://www.credly.com/users/dian-germishuizen/badges?source=about_page">Dian Germishuizen — Badges — Credly</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7c025d283932" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>