<?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 Dnyanesh Bandbe on Medium]]></title>
        <description><![CDATA[Stories by Dnyanesh Bandbe on Medium]]></description>
        <link>https://medium.com/@dnyanesh.bandbe88?source=rss-6b4191a239f------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*GjMzH3dGWTvuuWp-Qmupxg.jpeg</url>
            <title>Stories by Dnyanesh Bandbe on Medium</title>
            <link>https://medium.com/@dnyanesh.bandbe88?source=rss-6b4191a239f------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 28 Nov 2026 03:16:34 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@dnyanesh.bandbe88/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[8 SQL functions for daily activities and Interviews]]></title>
            <link>https://medium.com/@dnyanesh.bandbe88/8-sql-functions-for-daily-activities-and-interviews-06825c7c61bf?source=rss-6b4191a239f------2</link>
            <guid isPermaLink="false">https://medium.com/p/06825c7c61bf</guid>
            <category><![CDATA[interview]]></category>
            <category><![CDATA[sql-functions]]></category>
            <category><![CDATA[data-engineering]]></category>
            <category><![CDATA[sql]]></category>
            <category><![CDATA[data]]></category>
            <dc:creator><![CDATA[Dnyanesh Bandbe]]></dc:creator>
            <pubDate>Thu, 14 Mar 2024 07:02:22 GMT</pubDate>
            <atom:updated>2024-03-14T07:02:22.654Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Af70SRtCPkS037bvCSWNqA.png" /></figure><p>Consider a table of student and scores. I have added NULL and repeated scores for understanding the functions better.</p><pre><strong>SOURCE TABLE: <br></strong>| id | name    | score |<br>|----|---------|-------|<br>| 1  | <strong>Alice</strong>   | <strong>85</strong>    |<br>| 2  | Bob     | <strong>90</strong>    |<br>| 3  | Charlie | 75    |<br>| 4  | David   | 80    |<br>| 5  | Eve     | 95    |<br>| 6  | <strong>NULL</strong>    | <strong>85</strong>    |<br>| 7  | Frank   | <strong>90 </strong>   |<br>| 8  | Gary    | <strong>NULL</strong>  |<br>| 9  | <strong>Alice </strong>  | 88    |</pre><h3>COALESCE():</h3><p>Returns the first non-null value in a list of expressions. Generally used to converting NULL values to a relatable text.</p><pre>SELECT COALESCE(name, &#39;Unknown&#39;) AS name<br>FROM sample_data;</pre><pre><strong>Output: <br></strong>| name    |<br>|---------|<br>| Alice   |<br>| Bob     |<br>| Charlie |<br>| David   |<br>| Eve     |<br>| <strong>Unknown</strong> |<br>| Frank   |<br>| Gary    |<br>| Alice   |</pre><ul><li>Memory Consumption: COALESCE() function does not significantly affect memory consumption as it only evaluates the provided expressions sequentially until it finds a non-null value.</li><li>Optimization Chances: Since COALESCE() evaluates expressions in order, ensure that the expressions are optimized to minimize resource usage. Avoid using heavy computations or complex functions inside COALESCE().</li></ul><h3>ROW_NUMBER():</h3><p>Assigns a unique integer to each row in the result set.</p><pre>SELECT ROW_NUMBER() OVER (ORDER BY id) AS row_num, name, score<br>FROM sample_data;</pre><pre><strong>Output:</strong><br>| row_num | name    | score |<br>|---------|---------|-------|<br>| 1       | Alice   | 85    |<br>| 2       | Bob     | 90    |<br>| 3       | Charlie | 75    |<br>| 4       | David   | 80    |<br>| 5       | Eve     | 95    |<br>| 6       | NULL    | 85    |<br>| 7       | Frank   | 90    |<br>| 8       | Gary    | NULL  |<br>| 9       | Alice   | 88    |</pre><ul><li>Memory Consumption: ROW_NUMBER() requires additional memory to store and manage the row numbers generated. The memory usage increases with the size of the result set.</li><li>Optimization Chances: Use appropriate indexing on the ORDER BY column to optimize the sorting process. Limit the use of ROW_NUMBER() if the result set is very large to avoid excessive memory consumption.</li></ul><h3>RANK():</h3><p>Assigns a rank to each row within a result set based on the specified ordering. It skips the rank in case of repeated values.</p><p>Here, it skips rank 3 and 6.</p><pre>SELECT RANK() OVER (ORDER BY score DESC) AS ranking, name, score<br>FROM sample_data;</pre><pre><strong>Output:</strong><br>| ranking | name    | score |<br>|---------|---------|-------|<br>| 1       | Eve     | 95    |<br>| 2       | Bob     | 90    |<br>| <strong>2</strong>       | Frank   | 90    |<br>| <strong>4</strong>       | Alice   | 88    |<br>| 5       | Alice   | 85    |<br>| <strong>5</strong>       | NULL    | 85    |<br>| <strong>7</strong>       | David   | 80    |<br>| 8       | Charlie | 75    |<br>| 9       | Gary    | NULL  |</pre><ul><li>Memory Consumption: Similar to ROW_NUMBER(), RANK() also requires additional memory to store and manage the ranks generated. Memory usage increases with the size of the result set.</li><li>Optimization Chances: Utilize appropriate indexing on the ORDER BY column to optimize sorting. Limit the use of RANK() if dealing with large result sets to avoid excessive memory usage.</li></ul><h3>DENSE_RANK():</h3><p>Assigns a rank to each row within a result set, without any gaps in the ranking sequence. It retains the rank in case of repeated values.</p><pre>SELECT DENSE_RANK() OVER (ORDER BY score DESC) AS dense_rank, name, score<br>FROM sample_data;</pre><pre><strong>Output:</strong><br>| dense_rank | name    | score |<br>|------------|---------|-------|<br>| 1          | Eve     | 95    |<br>| 2          | Bob     | 90    |<br>| <strong>2 </strong>         | Frank   | 90    |<br>| <strong>3</strong>          | Alice   | 88    |<br>| 4          | Alice   | 85    |<br>| <strong>4</strong>          | NULL    | 85    |<br>| <strong>5 </strong>        | David   | 80    |<br>| 6         | Charlie | 75    |<br>| 7         | Gary    | NULL  |</pre><ul><li>Memory Consumption: Memory usage for DENSE_RANK() is similar to RANK() and ROW_NUMBER(), as it also requires additional memory to store and manage the ranks generated.</li><li>Optimization Chances: Employ appropriate indexing on the ORDER BY column to optimize sorting. As with RANK(), limit the usage of DENSE_RANK() with large result sets to control memory consumption.</li></ul><h3>LEAD():</h3><p>Retrieves the value of a column from the next row in the result set.</p><pre>SELECT name, LEAD(name) OVER (ORDER BY id) AS next_name<br>FROM sample_data;</pre><pre><strong>Output:</strong><br>| name    | next_name |<br>|---------|-----------|<br>| Alice   | Bob       |<br>| Bob     | Charlie   |<br>| Charlie | David     |<br>| David   | Eve       |<br>| Eve     | NULL      |<br>| NULL    | Frank     |<br>| Frank   | Gary      |<br>| Gary    | Alice     |<br>| Alice   | NULL      |</pre><ul><li>Memory Consumption: LEAD() requires memory to store the retrieved values from subsequent rows. Memory usage increases with the size of the result set.</li><li>Optimization Chances: Ensure appropriate indexing on the ORDER BY column to optimize access to subsequent rows. Limit the usage of LEAD() if dealing with large result sets to control memory consumption.</li></ul><h3>LAG():</h3><p>Retrieves the value of a column from the previous row in the result set.</p><pre>SELECT name, LAG(name) OVER (ORDER BY id) AS prev_name<br>FROM sample_data;</pre><pre><strong>Output:</strong><br>| name    | prev_name |<br>|---------|-----------|<br>| Alice   | NULL      |<br>| Bob     | Alice     |<br>| Charlie | Bob       |<br>| David   | Charlie   |<br>| Eve     | David     |<br>| NULL    | Eve       |<br>| Frank   | NULL      |<br>| Gary    | Frank     |<br>| Alice   | Gary      |</pre><ul><li>Memory Consumption: Similar to LEAD(), LAG() requires memory to store the retrieved values from previous rows. Memory usage increases with the size of the result set.</li><li>Optimization Chances: Employ appropriate indexing on the ORDER BY column to optimize access to previous rows. Limit the usage of LAG() if dealing with large result sets to manage memory consumption.</li></ul><h3>PIVOT():</h3><p>Transforms data from rows into columns based on a specified column value.</p><p>If the column used for pivoting contains NULL values, those NULL values will be treated as a distinct category during the pivot operation.</p><p>Each distinct NULL value will result in a separate column in the pivot table, just like any other distinct value.</p><pre>SELECT *<br>FROM (<br>    SELECT name, score<br>    FROM sample_data<br>) AS source_table<br>PIVOT (<br>    MAX(score) FOR name IN ([Alice], [Bob], [Charlie], [David], [Eve], [NULL], [Frank])<br>) AS pivot_table;</pre><pre><strong>Output:</strong><br>| Alice   | Bob  | Charlie | David | Eve  | NULL | Frank |<br>|---------|------|---------|-------|------|------|-------|<br>| 85      | 90   | 75      | 80    | 95   | 85   | NULL  |<br>| 88      | NULL | NULL    | NULL  | NULL | NULL | NULL  |</pre><ul><li>Memory Consumption: PIVOT() can increase memory consumption significantly, especially if the result set has a large number of distinct values for pivoting.</li><li>Optimization Chances: Ensure proper indexing and query optimization techniques are applied to minimize the size of intermediate result sets. Limit the usage of PIVOT() with large datasets.</li></ul><h3>NTILE():</h3><p>Divides the result set into a specified number of groups, assigning a bucket number to each row.</p><pre>SELECT name, score, NTILE(2) OVER (ORDER BY score) AS bucket<br>FROM sample_data;</pre><pre><strong>Output:</strong><br>| name    | score | bucket |<br>|---------|-------|--------|<br>| Charlie | 75    | 1      |<br>| David   | 80    | 1      |<br>| Alice   | 85    | 1      |<br>| Frank   | 90    | 2      |<br>| Gary    | NULL  | 2      |<br>| Eve     | 95    | 2      |<br>| NULL    | 85    | 2      |<br>| Alice   | 88    | 2      |<br>| Bob     | 90    | 2      |</pre><ul><li>Memory Consumption: NTILE() requires memory to store and manage the generated bucket numbers. Memory usage increases with the size of the result set and the number of buckets specified.</li><li>Optimization Chances: Limit the number of buckets to control memory consumption. Use appropriate indexing on the ORDER BY column to optimize sorting.</li></ul><p>These functions and their associated queries can have varying impacts on memory consumption and optimization opportunities</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=06825c7c61bf" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Fine grained access control over Google Cloud Storage]]></title>
            <link>https://medium.com/@dnyanesh.bandbe88/fine-grained-access-control-over-google-cloud-storage-174d73e09d5b?source=rss-6b4191a239f------2</link>
            <guid isPermaLink="false">https://medium.com/p/174d73e09d5b</guid>
            <category><![CDATA[google-cloud-storage]]></category>
            <category><![CDATA[data-security]]></category>
            <category><![CDATA[access-control]]></category>
            <category><![CDATA[google-cloud-platform]]></category>
            <category><![CDATA[data-governance]]></category>
            <dc:creator><![CDATA[Dnyanesh Bandbe]]></dc:creator>
            <pubDate>Thu, 07 Mar 2024 07:02:19 GMT</pubDate>
            <atom:updated>2024-03-07T07:02:19.629Z</atom:updated>
            <content:encoded><![CDATA[<p>I am assuming you have lot of data stored on your Blob Storage services like Google Cloud Storage, Azure Blob Storage or Amazon S3. But how comfortable do you feel when I ask is all your data on these blob storage safe ?</p><p>If yes answer is “No or Not as much safe you would want to”, then this article is for you. But if you have already implemented a process, I would love connect and bounce more ideas.</p><p>Some of the biggest challenge we face today when managing blob storages are,</p><ul><li>Managing accesses across multiple groups and roles in an Organization</li><li>The versatility of blob storage to work with any files, also makes it difficult to manage it more efficiently</li><li>Balancing the need for data accessibility with stringent security requirements</li><li>Ensuring compliance with regulatory requirements such as GDPR, HIPAA, or CCPA</li><li>Ensuring that users and administrators understand access policies, roles, and responsibilities, and are adequately trained to adhere to security best practices, is essential but can be challenging to achieve comprehensively.</li></ul><p>If you are facing some of these challenges and finding it difficult, the below steps can help you start your journey in this area.</p><blockquote><strong>“Start in the most simplest manner possible and iterate for improvements”</strong></blockquote><p>Your Steps can be,</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6A_vfk1Cm4GmhrsXyw24Ww.png" /></figure><ul><li>Identify different groups that may need access to your blob storage</li><li>Analyze and decide what access levels required for each group</li><li>Create AD groups to manage them more efficiently</li><li>Assign access roles to these AD groups</li><li>To begin with, I would always suggest to use Standard Roles available within your cloud platform</li></ul><p>For example, Viewer Role for Business and BA community, Editor Role for your Ops team and Admin Role for your Dev team</p><p>I know, we all want to do things perfect from first go. But we must also consider, security is topic where</p><blockquote>Something is always better than Nothing</blockquote><p>Imagine having a open system vs having some level of access security which can at least filter out actions by unwanted characters.</p><p>After running this model for a few months. And collecting feedbacks and changes that might occur over this period of time, we would have a much better understanding and picture of how our setup needs to look like.</p><p>Now this is where the Real Game begins …</p><p>This is where we introduce our Protagonist, Fine Grained Access Policies with Role Based Access Controls</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FlbY9cP7khm16fssc00tSQ.png" /></figure><p>Consider the use case where you have different access needs within your Global Finance Team.</p><blockquote>Group 1 should have access to only contents within Country A Folder</blockquote><blockquote>Group 2 should have access to only contents within Country B Folder</blockquote><blockquote>Group 3 should have access to only contents within Region 1 Folder (Country A+B+C)</blockquote><blockquote>Group 4 should have access to only contents within Region 2 Folder (Country D+E)</blockquote><p>For implementing this Google Cloud Storage we will use the following steps,</p><ol><li>Make sure your Buckets and the Folders / Objects are created. In the screenshot below, we can see the Regions and Countries</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2gqZWDO_3aF8IwESK7gOnQ.png" /><figcaption>GCS buckets and folder objects created by Region &amp; Country</figcaption></figure><blockquote>Please remember, the access management is done at Bucket Level, but access grants can drill down to object level</blockquote><p>2. Navigate to the Permissions tab of the bucket.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/675/1*injs-cUla2lg_gMdLHQmrQ.png" /></figure><p>3. Click on “Grant Access”, it will pop up a side window as shown below.</p><ul><li>Select your required assigned group</li><li>Select the role you want to assign</li><li>Click on “<strong>ADD IAM CONDITION</strong>”</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/571/1*duZ52l8zUCqoYg70sNjTAg.png" /></figure><p>4. This is where you manage the fine grained access at folder levels.</p><ul><li>Give the relevant title and description to your IAM Condition</li><li>Assign the Condition Builder as shown below</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/925/1*MayLXdpDMELg-IpQklnngQ.png" /></figure><p>This can also be written as CEL expression</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_-5mPxCD7VRDgh7cwm5OJQ.png" /></figure><p>The CEL expression for Base folder and Nested folders can be written as shown below</p><pre>Your resource format should be<br><br><strong>projects/_/buckets/&lt;YOUR_BUCKET_NAME&gt;/objects/&lt;FOLDER_PATH&gt;</strong><br><br><br>For Access to Country A only: <br><strong>resource.type == &quot;storage.googleapis.com/Object&quot; &amp;&amp;<br>resource.name.startsWith(&quot;projects/_/buckets/st_finance/objects/Region_1/Country_A&quot;)<br></strong><br>For Access to Region 1 only: <br><strong>resource.type == &quot;storage.googleapis.com/Object&quot; &amp;&amp;<br>resource.name.startsWith(&quot;projects/_/buckets/st_finance/objects/Region_1/&quot;)</strong></pre><blockquote>Remember that GCS is Blob storage, so everything inside the bucket is a object. GCS does not understand difference between folders or files. So if we have nested folders like Region_1/Country_A, that is just the single Object Name for it.</blockquote><p>That’s it. As simple as this and you are good to go.</p><p>Now you can further tighten this policies by creating Custom Roles and restricting access for</p><ul><li>some group to only upload/create objects</li><li>some groups to only view objects</li><li>some group to have full read-write-delete access</li></ul><p>Hope this article helps you and if you have any questions or doubts, please feel free reach out.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=174d73e09d5b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Do you want to enforce Roles and Access controls in GCP, AWS or Azure but confused where to start ?]]></title>
            <link>https://medium.com/@dnyanesh.bandbe88/do-you-want-to-enforce-roles-and-access-controls-in-gcp-aws-or-azure-but-confused-where-to-start-dc9cac847ae6?source=rss-6b4191a239f------2</link>
            <guid isPermaLink="false">https://medium.com/p/dc9cac847ae6</guid>
            <category><![CDATA[gcp]]></category>
            <category><![CDATA[iam-roles]]></category>
            <category><![CDATA[data-governance]]></category>
            <category><![CDATA[data]]></category>
            <category><![CDATA[data-security]]></category>
            <dc:creator><![CDATA[Dnyanesh Bandbe]]></dc:creator>
            <pubDate>Mon, 26 Feb 2024 08:01:44 GMT</pubDate>
            <atom:updated>2024-02-26T08:01:44.061Z</atom:updated>
            <content:encoded><![CDATA[<h3>Do you want to enforce Roles and Access controls in GCP, AWS or Azure but confused where to start ?</h3><p>We all know the importance of data in today’s world . But more than often, I feel we are so focused on answering a question, that we forget our role to ask a question every now and then.</p><p>I was just curious about how often do we ask about “Is my data secure, not just from external entities, but also within my internal org ?”.</p><p>Well to answer this question, I thought why not use Google Trends to see how many people around the world thought on these lines.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hU5zW498FgC6SVgNQPSmJQ.png" /></figure><p>Now, I may have used Trends incorrectly or may be my interpretation isn’t accurate. But I do think the general consensus of everyone reading would be the same.</p><p>Honestly, I get why data analysis is a topic more popular then data security or access control. You might say, it is the responsibility of our Tech Team or our Data Governance to take care.</p><p>So for our Data team, if you are confused where to start or if you are stuck with a make shift mechanism implemented very early on, this post could come in handy.</p><h3>Where to start ?</h3><p>Always start in the most simplest manner possible and iterate for improvements.</p><h4>Role Based Access Control with Least Access Privilege Principle</h4><p>Simply put, only give the required access to the concerned people.</p><ul><li>Broadly, any organization should have below 5 group</li><li>Now please do not map these group to actual roles of people in your Organization</li><li>It would be practically illogical to create Roles and Access Groups for every position or person in an Organization</li><li>So depending on the needs of the role or position you can assign the respective group</li></ul><h4><strong>1. Data Engineer:</strong></h4><ul><li>Full Access: Manage pipelines and configurations.</li><li>Write Access: Create and modify datasets.</li><li>Execute Access: Schedule and run data processing jobs.</li></ul><h4><strong>2. Data Scientist:</strong></h4><ul><li>View Access: Read relevant datasets.</li><li>Execute Access: Run analytical tools and queries.</li><li>Limited Write Access: Store experiment results.</li></ul><h4><strong>3. Data Analyst:</strong></h4><ul><li>View Access: Read curated datasets.</li><li>Limited Write Access: Save query results.</li></ul><h4><strong>4. Data Steward:</strong></h4><ul><li>Full Access: Manage metadata and catalog.</li><li>Write Access: Define data schemas and tags.</li></ul><h4>5. Business User:</h4><ul><li>View Access: Read reports and visualizations.</li><li>Limited Write Access: Provide feedback.</li></ul><h3>Resource Labels and Tags</h3><p>Utilize resource labels and tags to categorize and organize resources based on business attributes. Remember “<strong>Business Attributes</strong>”, I know you will be tempted to add your techy tags, but please prioritize Business Attributes.</p><p>Apply IAM policies based on labels and tags to enforce access control dynamically and automate policy management</p><p>Use condition-based expressions in IAM policies to allow or deny access based on specific labels or tags.</p><p>For example, you can grant read access to all resources labeled with “environment: production” or deny delete permissions for resources tagged with “cost-center: finance.”</p><h3>Audit Logging and Monitoring</h3><p>Enable Cloud Audit Logs and Cloud Monitoring to track and monitor user activity and changes to IAM policies. Review audit logs regularly to detect suspicious activities, unauthorized access attempts, or policy violations.</p><h3>Automation and Templates</h3><p>Write IAM policies as code using Infrastructure as Code (IaC) tools such as Terraform, Google Cloud Deployment Manager, or Google Cloud Deployment Manager Templates (DMT).</p><p>Define IAM roles, permissions, bindings, and resource hierarchies in a declarative format.</p><p>If you’re using Terraform, start by installing the Terraform CLI and configuring your environment. Write Terraform configuration files (*.tf) to define IAM resources, such as projects, service accounts, roles, and policies. Use the google_project_iam_policy, google_project_iam_binding, google_organization_iam_policy, and other Terraform resources to manage IAM policies.</p><h3>Use IAM Custom Roles</h3><p>I wont suggest to start your access setup journey with Custom Roles, as it comes with an additional overhead of maintaining and managing the roles. You can think about creating custom roles once your journey in setting up your Organization Access Policies have reached certain maturity</p><p>You can create custom IAM roles tailored to your organization’s specific requirements and use cases. Define role permissions using predefined or custom permissions and assign these roles to users, groups, or service accounts.</p><p>In conclusion, access privileges and security are indispensable components of modern data management and protection strategies. By implementing robust access controls organizations can mitigate risks, achieve regulatory compliance, and build trust with stakeholders, safeguarding their most valuable asset: data.</p><p>Protect your data, safeguard your future!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=dc9cac847ae6" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Maximizing Automation & Efficiency: Leveraging GCP Cloud Functions with Google Cloud Storage…]]></title>
            <link>https://medium.com/@dnyanesh.bandbe88/maximizing-automation-efficiency-leveraging-gcp-cloud-functions-with-google-cloud-storage-60e688a23180?source=rss-6b4191a239f------2</link>
            <guid isPermaLink="false">https://medium.com/p/60e688a23180</guid>
            <category><![CDATA[dataops]]></category>
            <category><![CDATA[data]]></category>
            <category><![CDATA[solutions]]></category>
            <category><![CDATA[gcp]]></category>
            <category><![CDATA[data-engineering]]></category>
            <dc:creator><![CDATA[Dnyanesh Bandbe]]></dc:creator>
            <pubDate>Fri, 16 Feb 2024 06:31:58 GMT</pubDate>
            <atom:updated>2024-02-16T06:31:58.204Z</atom:updated>
            <content:encoded><![CDATA[<h3>Maximizing Automation &amp; Efficiency: Leveraging GCP Cloud Functions with Google Cloud Storage Triggers and GCP Pub/Sub</h3><p>Cloud Functions enable developers to execute single-purpose functions in response to various events without managing server infrastructure. These functions excel in event-driven scenarios such as processing logs, reacting to file uploads, or handling HTTP requests.</p><h3><strong>Key Features:</strong></h3><ul><li>Event-driven architecture</li><li>Pay-as-you-go pricing</li><li>Supports various triggers: HTTP, Pub/Sub, Cloud Storage, etc.</li><li>Cloud Functions can interact with other GCP services seamlessly.</li></ul><p>For any developer to start using Cloud Function, all they need to understand is,</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tJTOjJtk9lY1aVnPnJczJA.png" /><figcaption>Quick overview of why Cloud Functions can be used</figcaption></figure><p>In simple words, consider a cloud function to be executable code base that you can run fully managed environment on GCP instead of your local machine.</p><p>Let us consider a use case, where files uploaded by a group of members needs to be quality checked and processed for analytical purposes. With this use case we would cover,</p><ul><li>Triggering a Cloud function as soon as a file is placed in a GCS location within the <strong>same GCP Project (Step 4)</strong></li><li>Triggering a Cloud function as soon as a file is placed in a GCS location within the <strong>another GCP Project (Step 8)</strong></li></ul><p>Additionally, an external application can also be triggered as soon as a file is placed in a GCS location<strong> (Step 9)</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*J8G29vZHRSauFUqFMZqgGw.png" /><figcaption>Simplify, designs are meant for helping people understand not confuse</figcaption></figure><h3>Setting up services, permissions and agents</h3><ul><li>Enable the Pub/Sub API for the project that will receive notifications</li><li>Create a Pub/Sub topic that you wish to send notifications</li></ul><pre>gcloud pubsub topics create TOPIC_NAME</pre><ul><li>Get the email address of the Service Agent that connects to your Cloud Storage bucket. We can get that using</li></ul><pre>gcloud storage service-agent --project=YOUR_PROJECT_ID</pre><ul><li>The service agent from above steps should be granted “pubsub.publisher” role</li><li>Further Granular access control should be implemented on the landing RAW DATA BUCKET and ERROR DATA BUCKET to ensure only valid members have access to these GCS buckets</li></ul><h3><strong>IMPORTANT NOTE: Pub/Sub Notifications from Google Cloud console cannot be created using Console, it can only be created using CLI, Client Libraries and REST APIs.</strong></h3><p>First step should be to check list of notification triggers already created over a GCS Bucket</p><pre>gcloud storage buckets notifications list gs://GCS_BUCKET_NAME</pre><p>Next step would be to create the notification configuration for sending a notification to the Pub/Sub topic. This notification would be sent out as soon as file is placed / changed on the GCS location</p><pre>gcloud storage buckets notifications create gs://GCS_BUCKET_NAME--topic=PUBSUB_TOPIC_NAME</pre><p>Further arguments for GCS bucket notifications can be set using various arguments mentioned on <a href="https://cloud.google.com/sdk/gcloud/reference/storage/buckets/notifications/create#--event-types:~:text=POSITIONAL%20ARGUMENTS">this link</a></p><p><a href="https://cloud.google.com/sdk/gcloud/reference/storage/buckets/notifications/create#--event-types:~:text=POSITIONAL%20ARGUMENTS">gcloud storage buckets notifications create | Google Cloud CLI Documentation</a></p><p>In case if you need to delete the notification configuration, you can use</p><pre>gcloud storage buckets notifications delete projects/_/buckets/GCS_BUCKET_NAME/notificationConfigs/NOTIFICATION_ID</pre><p>In the above commands,</p><ul><li>GCS_BUCKET_NAME is the name of the bucket whose notification configuration you want to retrieve For example, my-bucket.</li><li>PUBSUB_TOPIC_NAME is the Pub/Sub Topic to which the notifications should be sent</li><li>NOTIFICATION_ID is the ID number of the desired configuration.</li></ul><p>Once we have configured Pub/Sub notifications over a specificed Topic. We can now create Subscriptions to trigger Cloud Functions.</p><p>As soon as file is placed on the specified GCS location, a notification is sent out to the Pub/Sub Topic. This notification payload looks like,</p><pre>{<br>  &quot;kind&quot;: &quot;storage#object&quot;,<br>  &quot;id&quot;: string,<br>  &quot;selfLink&quot;: string,<br>  &quot;mediaLink&quot;: string,<br>  &quot;name&quot;: string,<br>  &quot;bucket&quot;: string,<br>  &quot;generation&quot;: &quot;long&quot;,<br>  &quot;metageneration&quot;: &quot;long&quot;,<br>  &quot;contentType&quot;: string,<br>  &quot;storageClass&quot;: string,<br>  &quot;size&quot;: &quot;unsigned long&quot;,<br>  &quot;md5Hash&quot;: string,<br>  &quot;contentEncoding&quot;: string,<br>  &quot;contentDisposition&quot;: string,<br>  &quot;contentLanguage&quot;: string,<br>  &quot;cacheControl&quot;: string,<br>  &quot;crc32c&quot;: string,<br>  &quot;componentCount&quot;: integer,<br>  &quot;etag&quot;: string,<br>  &quot;kmsKeyName&quot;: string,<br>  &quot;temporaryHold&quot;: boolean,<br>  &quot;eventBasedHold&quot;: boolean,<br>  &quot;retentionExpirationTime&quot;: &quot;datetime&quot;,<br>  &quot;retention&quot;: {<br>    &quot;retainUntilTime&quot;: &quot;datetime&quot;,<br>    &quot;mode&quot;: string<br>  }<br>  &quot;timeCreated&quot;: &quot;datetime&quot;,<br>  &quot;updated&quot;: &quot;datetime&quot;,<br>  &quot;timeDeleted&quot;: &quot;datetime&quot;,<br>  &quot;timeStorageClassUpdated&quot;: &quot;datetime&quot;,<br>  &quot;customTime&quot;: &quot;datetime&quot;,<br>  &quot;metadata&quot;: {<br>    (key): string<br>  },<br>  &quot;acl&quot;: [<br>    objectAccessControls Resource<br>  ],<br>  &quot;owner&quot;: {<br>    &quot;entity&quot;: string,<br>    &quot;entityId&quot;: string<br>  },<br>  &quot;customerEncryption&quot;: {<br>    &quot;encryptionAlgorithm&quot;: string,<br>    &quot;keySha256&quot;: string<br>  }<br>}</pre><p>Using this payload information a corresponding cloud function can be invoked. The below use cases show 3 types of invocations</p><h4>Use Case 1: Triggering a Cloud function as soon as a file is placed in a GCS location within the <strong>same GCP Project</strong></h4><p>You can setup using Console as shown below</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/638/1*KbRPgfyxxfqdX0in6aJ8Mw.png" /><figcaption>Creating a Cloud Function that triggers automatically from a Pub/Sub Topic</figcaption></figure><p>or you can also use CLI</p><p>GEN2 cloud function</p><pre>gcloud functions deploy YOUR_FUNCTION_NAME \<br>--trigger-topic=YOUR_PUBSUB_TOPIC \<br>[--retry] \</pre><p>GEN1 cloud function</p><pre>gcloud functions deploy YOUR_FUNCTION_NAME \<br>--trigger-event=providers/cloud.pubsub/eventTypes/topic.publish \<br>--trigger-resource=YOUR_PUBSUB_TOPIC \</pre><h4>Use Case 2: Triggering a Cloud function in different GCP Project as soon as a file is placed in a GCS location</h4><p>For this use case, first the cloud function should be created with the trigger type as “HTTP”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JXk-bFmZCluh2Byj28NDPA.png" /><figcaption>A Cloud Function of type HTTP Trigger</figcaption></figure><p>Use this trigger information as endpoint URL for subscription to invoke this function</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/513/1*WrjOqN1BTVO-f-F3PY8slg.png" /><figcaption>Creating a Pub/Sub Subscription for Triggering a Cloud Function from different GCP Project</figcaption></figure><p>Please do not forget to add the subscription filter , as we only want file creation, copying or rewriting events to trigger the cloud function.</p><pre>attributes.eventType = &quot;OBJECT_FINALIZE&quot; </pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/633/1*C5ht4J9xQpuZfRYg8IU0mg.png" /><figcaption>Pub/Sub Subscription filter for limiting our triggers to only Cloud Storage Creation, Copy &amp; Rewrite events</figcaption></figure><p>more information on different types of events can be found here</p><p><a href="https://cloud.google.com/storage/docs/pubsub-notifications#events">Pub/Sub notifications for Cloud Storage | Google Cloud</a></p><p>And that is it. Good to GO.. :-)</p><p>I hope this article helps you simplify your data platform operations in an efficient and scalable way.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=60e688a23180" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Understanding Liquibase, a devops tool for database schema change management]]></title>
            <link>https://medium.com/@dnyanesh.bandbe88/understanding-liquibase-a-devops-tool-for-database-schema-change-management-37840027c0ca?source=rss-6b4191a239f------2</link>
            <guid isPermaLink="false">https://medium.com/p/37840027c0ca</guid>
            <category><![CDATA[data]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[data-engineering]]></category>
            <category><![CDATA[data-solutions]]></category>
            <category><![CDATA[database]]></category>
            <dc:creator><![CDATA[Dnyanesh Bandbe]]></dc:creator>
            <pubDate>Wed, 08 Nov 2023 13:31:57 GMT</pubDate>
            <atom:updated>2023-11-08T13:31:57.316Z</atom:updated>
            <content:encoded><![CDATA[<h4>This segment talks about how you can quickly setup liquibase on your machine or enterprise devops pipeline.</h4><figure><img alt="" src="https://cdn-images-1.medium.com/proxy/1*Z7UPxbQzhrtX6ONye1XrmA.png" /></figure><p>In the dynamic landscape of software development, managing database schema changes efficiently is crucial.</p><p>Liquibase, a versatile and open-source tool, simplifies this process by automating database schema evolution and version control.</p><p>In this comprehensive guide, we will understand Liquibase and its fundamental components, illustrating their usage through practical examples.</p><h3>Understanding Liquibase Components:</h3><h4>1. Changelog Files:</h4><p>Changelog files serve as the blueprint for database changes. This file has complete list of all changes deployed in your database.</p><p>The beauty of this file and liquibase is that it remembers which changesets have already been deployed and only deploys the newly added changesets.</p><p>Let’s create a changelog file named <strong><em>changelog.xml</em></strong>:</p><pre>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;<br>&lt;databaseChangeLog xmlns=&quot;http://www.liquibase.org/xml/ns/dbchangelog&quot;<br>                   xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot;<br>                   xsi:schemaLocation=&quot;http://www.liquibase.org/xml/ns/dbchangelog<br>                   http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.10.xsd&quot;&gt;<br><br>    &lt;include file=&quot;changesets/create-tables.xml&quot;/&gt;<br>    &lt;include file=&quot;changesets/modify-data.xml&quot;/&gt;<br><br>&lt;/databaseChangeLog&gt;</pre><h4>2. Changesets:</h4><p>Changesets are individual units of change within a changelog. Let’s create a changeset file named <strong><em>create-tables.xml</em></strong>:</p><pre>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;<br>&lt;databaseChangeLog xmlns=&quot;http://www.liquibase.org/xml/ns/dbchangelog&quot;<br>                   xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot;<br>                   xsi:schemaLocation=&quot;http://www.liquibase.org/xml/ns/dbchangelog<br>                   http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.10.xsd&quot;&gt;<br><br>    &lt;changeSet id=&quot;1&quot; author=&quot;JohnDoe&quot;&gt;<br>        &lt;sqlFile path=&quot;sql/create-tables.sql&quot;/&gt;<br>    &lt;/changeSet&gt;<br><br>&lt;/databaseChangeLog&gt;</pre><h4>3. SQL File (create-tables.sql):</h4><p>The SQL file contains the actual SQL statements for creating tables. For example <strong><em>create-tables.sql</em></strong>:</p><pre>-- create-tables.sql<br>CREATE TABLE users (<br>    id INT PRIMARY KEY,<br>    username VARCHAR(50) NOT NULL,<br>    email VARCHAR(100) NOT NULL<br>);</pre><h4>4. DataChangelog &amp; DataChangeloglock table:</h4><p>The <strong><em>DATABASECHANGELOG</em></strong> table is crucial for Liquibase to track the state of the database schema over time. It ensures that each changeset is applied only once, maintaining version control and enabling collaboration in database development projects.</p><pre>| Column Name    | Data Type | Description                                                                      |<br>|----------------|-----------|----------------------------------------------------------------------------------|<br>| ID             | VARCHAR   | Unique identifier for each changeset.                                            |<br>| AUTHOR         | VARCHAR   | Name or username of the changeset author.                                        |<br>| FILENAME       | VARCHAR   | Name of the XML file containing the changeset.                                   |<br>| DATEEXECUTED   | TIMESTAMP | Timestamp indicating when the changeset was executed.                            |<br>| ORDEREXECUTED  | INT       | Integer representing the order of changeset execution.                           |<br>| EXECTYPE       | VARCHAR   | Execution type of the changeset (e.g., &quot;EXECUTED&quot;).                              |<br>| MD5SU          | VARCHAR   | Checksum value generated from the changeset content.                             |<br>| DESCRIPTION    | VARCHAR   | Brief description of the changeset.                                              |<br>| COMMENTS       | VARCHAR   | Additional comments or notes related to the changeset.                           |<br>| TAG            | VARCHAR   | Indicates if the changeset is associated with a specific tag.                    |<br>| LIQUIBASE      | VARCHAR   | Version of Liquibase that executed the changeset.                                |<br>| CONTEXTS       | VARCHAR   | Contexts in which the changeset should be executed.                              |<br>| LABELS         | VARCHAR   | Labels used to group changesets based on common characteristics.                 |<br>| DEPLOYMENT_ID  | VARCHAR   | Identifier representing a specific deployment, useful in multi-node environments.|</pre><p>The <strong><em>DATABASECHANGELOGLOCK </em></strong>table plays a crucial role in preventing concurrent execution of Liquibase instances, ensuring the integrity of applied changesets. When a Liquibase instance wants to make changes, it checks this table to see if it can acquire the lock. If it can, it proceeds with applying changes. If not, it waits until the database is unlocked. This mechanism helps in avoiding conflicts and maintaining a consistent state of the database schema.</p><pre>| Column Name | Data Type | Description                                                                                          |<br>| - - - -- - -| - - - - --| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -|<br>| ID          | INT       | Unique identifier for the lock record.                                                               |<br>| LOCKED      | BOOLEAN   | Indicates if the database is currently locked. `1` means locked, `0` means unlocked.                 |<br>| LOCKGRANTED | TIMESTAMP | Timestamp indicating when the lock was granted.                                                      |<br>| LOCKEDBY    | VARCHAR   | Identifier of the Liquibase instance that acquired the lock. Typically, the hostname and process ID. |</pre><h3>Setting Up Liquibase:</h3><h4>1. Installation:</h4><ul><li>Install Liquibase using your preferred package manager or download the binary from the official website.</li></ul><p><a href="https://www.liquibase.org/DOWNLOAD">Download Liquibase | Liquibase.com</a></p><h4>2. Database Configuration:</h4><ul><li>Configure your database connection details (URL, username, password) in a <strong><em>liquibase.properties</em></strong> file.</li></ul><pre>url=jdbc:mysql://localhost:3306/mydatabase<br>username=myuser<br>password=mypassword</pre><ul><li>You can set multiple defaults and options in this properties file which can help you establish a set of standards across all deployments. The details of these options can be found in the link below</li></ul><p><a href="https://docs.liquibase.com/concepts/connections/creating-config-properties.html">Create and Configure a liquibase.properties File</a></p><h4>3. Applying Changes:</h4><ul><li>Run Liquibase using the <strong><em>UPDATE</em></strong> command to apply changes to the database.</li></ul><pre>liquibase --changeLogFile=changelog.xml update</pre><h3>How Liquibase Works:</h3><p>The below process quickly explains all the steps that are carried out to implement a change using liquibase</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*j8Ru2OtHHDQ4PcjMSavkxQ.png" /></figure><h3>Using Liquibase DevOps pipeline to automate deployments for Snowflake</h3><p><a href="https://medium.com/@dnyanesh.bandbe88/using-liquibase-devops-pipeline-to-automate-deployments-for-snowflake-c8c5e27f64da">Using Liquibase DevOps pipeline to automate deployments for Snowflake</a></p><h3>Conclusion:</h3><p>Liquibase empowers development teams to manage database schema changes seamlessly. By organizing SQL scripts into changesets and changelog files, Liquibase provides an organized, version-controlled approach to database evolution. This method ensures database changes are executed reliably, enhancing collaboration and mitigating risks. Embrace Liquibase in your projects to transform your database management experience and drive your applications toward a more efficient and organized future.</p><p>Have you worked on any other database schema change management tool ?</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=37840027c0ca" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Using Liquibase DevOps pipeline to automate deployments for Snowflake]]></title>
            <link>https://medium.com/@dnyanesh.bandbe88/using-liquibase-devops-pipeline-to-automate-deployments-for-snowflake-c8c5e27f64da?source=rss-6b4191a239f------2</link>
            <guid isPermaLink="false">https://medium.com/p/c8c5e27f64da</guid>
            <category><![CDATA[data]]></category>
            <category><![CDATA[snowflake]]></category>
            <category><![CDATA[liquibase]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[data-solutions]]></category>
            <dc:creator><![CDATA[Dnyanesh Bandbe]]></dc:creator>
            <pubDate>Fri, 27 Oct 2023 11:57:18 GMT</pubDate>
            <atom:updated>2023-10-27T11:58:02.780Z</atom:updated>
            <content:encoded><![CDATA[<h4>This segment explaining how Liquibase can be used for database deployments automation using DevOps pipeline approach for Snowflake (and BigQuery)</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Z7UPxbQzhrtX6ONye1XrmA.png" /></figure><p>With the increasing use of Cloud based databases many companies are now focusing on developing a scalable and secure DevOps solution to manage their databases deployment.</p><p>I would not indulge to explaining CI/CD and DevOps again, I am sure they are many blogs around this topic. But what I would like to focus is on how can we develop a DevOps solution for your database.</p><p>In this article, we would be focusing on developing a solution for Snowflake, but this same setup can be used for BigQuery or any other cloud bases database too.</p><p>Firstly, let’s understand how this setup can be beneficial for the Developer Community &amp; Organization’s dream to be data driven.</p><ul><li><strong><em>Reduce the overhead over the database admin teams to run the scripts manually</em></strong></li><li><strong><em>Avoid manual changes in the scripts due to different nomenclature and naming standards</em></strong></li><li><strong><em>Reducing the turn around time for deployment</em></strong></li><li><strong><em>Better security setup by avoiding admin roles being released across different team</em></strong></li><li><strong><em>Align rate of changes in the application and database</em></strong></li><li><strong><em>Tracking database code changes</em></strong></li></ul><p>Next, lets dive into the different components that will be used to design this solution.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uQUTtTTDzzIvZ2milXZy5g.png" /><figcaption>Design components</figcaption></figure><h4><strong>GitHub</strong></h4><p>GitHub is a code hosting platform for version control and collaboration. You can find more details and how to get started with it using this <a href="https://docs.github.com/en/get-started/quickstart/hello-world">quick guide</a>. (You can use any GIT tool like Azure DevOps, Gitlab etc of your choice too)</p><h4><strong>Jenkins / GitHub Actions</strong></h4><p>These are continuous integration and continuous delivery (CI/CD) platform that allows you to automate your build, test, and deployment pipeline.<strong> </strong>This will help you connect your deployment code to your database landscpae platform.</p><h4><strong>Liquibase</strong></h4><p>Liquibase is a database schema change management tool. Simply put, it is the deployment engine that handles versioning, roll-back etc.</p><h4><strong>Snowflake / BigQuery</strong></h4><p>These are the Enterprise data warehouse solutions that runs completely on cloud infrastructure.</p><h3><strong>Setting up tools:</strong></h3><p>Now that we know what all components are used in the design, let’s start with implementing each step.</p><p>In this setup, we will use our local machine as the host for all deployment.</p><p>At an Enterprise scale, some of the setup for these component would require a slight tweak in order to accommodate the scale and security.</p><h4><strong><em>Step 1:</em></strong></h4><p>Let’s start with setting up GitHub, we would need GitHub(or any GIT) repo to manage all code deployments and setup files. We should create the core branches of the repository matching the enterprise database landscape.</p><p>For example, if your database landscape consist of DEV-TEST-QA-PROD systems, then you will need to create these branches in your GitHub repo.</p><p>These branches will act as your core branches and should be protected with merge only via Pull Request Approvals</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9ioFY-nk65817yNAqLF6IQ.png" /></figure><h4>Step 2:</h4><p>Now each of these GitHub repo branches correspond to a jenkins pipeline. This setup is completed using Multi-Branch pipeline in jenkins.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jYAuEVuYonkwsPqqcsB_ug.png" /></figure><p>The detailed setup of how to connect GitHub with Jenkins multi-branch pipeline can be found in the post below.</p><p><a href="https://medium.com/@dnyanesh.bandbe88/how-github-can-be-used-to-trigger-multi-branch-jenkins-pipelines-b85af9f33608">How GitHub can be used to Trigger Multi Branch Jenkins pipelines</a></p><h4>Step 3.1:</h4><p>How Liquibase fits into the entire design.</p><p>Lets start with understanding how Liquibase works. Changeset is the fundamental block of the liquibase setup as every deployment or change is basically a changeset. These changesets together create changelog which help to track deployments in the database.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-6mfKIWEVGvvL4VUlwfDeA.png" /></figure><h4>Step 3.2:</h4><p>Next we need download the liquibase files and store them in a location which can be shared / accessible by the sql files.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*U4ve3dApLZjHd-Agncb7fQ.png" /></figure><h4>Step 4:</h4><p>All these setups are added to jenkins pipeline to trigger the changes to the target database. To summarize the steps,</p><p>1.] Download the GitHub repository with the sql files to be deployed</p><p>2.] The GitHub repo should store all the already deployed and to be deployed sql files. These file names are read by the pipeline</p><p>3.] Using these sql file names, we will create the CHANGELOG file used to deploy the changes in Snowflake</p><p>4.] Ensure all Liquibase files are available on the deploying agent</p><p>5.] For Snowflake, we need to use service account or separate system admin account to deploy the changes. The pipeline will set the Warehouse and Role context before deployment and release the roles after deployment to ensure governance and security</p><p>6.] The changelog helps to track which sql files have already been deployed and only new and changed sql files are deployed to Snowflake.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8IxH63uIzFF2vlZdMKSVXQ.png" /></figure><p>This framework is very flexible and robust to incorporate any enterprise needs and ensure all governance and security measures are followed.</p><p>We can also add certain governance steps like creating and closing a CHANGE REQUEST by calling a API endpoint through our DevOps pipeline.</p><p>For any additional information on what is Liquibase and how it works, please stay tuned, I am going to soon publish it soon.</p><p>#data #dataengineering #datasolutions #devops #solutionarchitecture #snowflake #bigquery #liquibase #github #git</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c8c5e27f64da" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The 3 brothers of Data Modelling: Kimball, Inmon & Data Vault]]></title>
            <link>https://medium.com/@dnyanesh.bandbe88/the-3-brothers-of-data-modelling-kimball-inmon-data-vault-5788863e98c8?source=rss-6b4191a239f------2</link>
            <guid isPermaLink="false">https://medium.com/p/5788863e98c8</guid>
            <category><![CDATA[solution-architect]]></category>
            <category><![CDATA[data-engineering]]></category>
            <category><![CDATA[data]]></category>
            <category><![CDATA[data-architecture]]></category>
            <category><![CDATA[data-modeling]]></category>
            <dc:creator><![CDATA[Dnyanesh Bandbe]]></dc:creator>
            <pubDate>Wed, 04 Oct 2023 13:01:41 GMT</pubDate>
            <atom:updated>2023-10-04T13:01:41.043Z</atom:updated>
            <content:encoded><![CDATA[<p>Data modeling is the cornerstone of any robust data architecture. But, when it comes to choosing the right approach, it can feel like standing at a crossroads. Kimball, Inmon, and Data Vault are three popular methodologies, each with its unique strengths.</p><p>Let’s try to understand how they differ from each other</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0iEsX5A5GWc1fPLO_7Km3Q.png" /></figure><h3>1. Kimball Modeling — Building Data Marts</h3><p>Kimball is like crafting pieces of a puzzle that fit together perfectly. It focuses on creating data marts, which are subsets of a data warehouse. Each data mart serves a specific business area, making it nimble and tailored.</p><p><strong>Use Case Example </strong>— Sales Data: Imagine you work for a retail giant. Using Kimball, you’d build separate data marts for sales, inventory, and customer data. This enables your sales team to access and analyze their data swiftly, without worrying and wasting time on unnecessary information.</p><p>This is a more traditional approach where operational needs of specific teams were provisioned well.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*sOLvxI4Gc7_ZngXn5clQsg.png" /><figcaption>General Approach for Kimball model</figcaption></figure><h3>2. Inmon Modeling — A Centralized Approach</h3><p>Inmon, on the other hand, is like constructing a grand library. It centralizes data into a massive data warehouse, ensuring a single version of the truth. This approach is ideal when your organization needs consistency and a holistic view.</p><p><strong>Use Case Example </strong>— Financial Analysis: In a financial institution, Inmon modeling would consolidate all data related to accounts, transactions, and customer profiles into a single warehouse. This unified data source helps the finance team ensure regulatory compliance and analyze financial health comprehensively.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NFJIcSCehpnjuUih6Y8mTA.png" /><figcaption>General Approach for Inmon model</figcaption></figure><h3>3. Data Vault Modeling — Agility and Scalability</h3><p>Data Vault is akin to building a modular skyscraper. It’s designed for agility and scalability. Data is stored in its raw form, making it easy to add new sources and adapt to changing business needs.</p><p><strong>Use Case Example</strong> — Healthcare Analytics: In a healthcare organization, patient data can come from various sources like hospitals, clinics, and wearable devices. Data Vault allows you to integrate these diverse data sources quickly and build analytics on top, ensuring timely insights for better patient care.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ylyk8B34sBLhNDG4_Qdbzg.png" /><figcaption>General Approach for Data Vault model</figcaption></figure><h3>So, How Do You Choose?</h3><ul><li>Kimball shines when you need rapid access to tailored data for specific business units.</li><li>Inmon is the choice for organizations requiring a single source of truth and strong data governance.</li><li>Data Vault excels in scenarios where flexibility and scalability are paramount, making it ideal for rapidly evolving industries.</li></ul><p>Remember, there’s no one-size-fits-all solution. Your choice depends on your organization’s unique needs and objectives. Sometimes, a hybrid approach that combines the strengths of these methodologies may be the best path forward.</p><p>#data #datasolutions #dataengineering #dataengineer #dataarchitecture</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5788863e98c8" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[        …]]></title>
            <link>https://medium.com/@dnyanesh.bandbe88/-618d7af27cb8?source=rss-6b4191a239f------2</link>
            <guid isPermaLink="false">https://medium.com/p/618d7af27cb8</guid>
            <category><![CDATA[knowledge-sharing]]></category>
            <category><![CDATA[podcast]]></category>
            <category><![CDATA[inspiration]]></category>
            <category><![CDATA[innovation]]></category>
            <category><![CDATA[personal-development]]></category>
            <dc:creator><![CDATA[Dnyanesh Bandbe]]></dc:creator>
            <pubDate>Tue, 19 Sep 2023 15:20:43 GMT</pubDate>
            <atom:updated>2023-09-19T15:20:43.738Z</atom:updated>
            <content:encoded><![CDATA[<h3>𝐌𝐲 𝐣𝐨𝐮𝐫𝐧𝐞𝐲 𝐨𝐟 𝐟𝐢𝐧𝐝𝐢𝐧𝐠 𝐈𝐧𝐬𝐩𝐢𝐫𝐚𝐭𝐢𝐨𝐧 𝐢𝐧 𝐭𝐡𝐞 𝐰𝐨𝐫𝐥𝐝 𝐨𝐟 𝐏𝐨𝐝𝐜𝐚𝐬𝐭𝐬 🎧</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/768/1*hrLirpy4Jdnk5BeShLS_MQ.jpeg" /></figure><p>In the fast-paced world of technology, staying inspired and finding new ideas can be a real challenge. We’re often caught up in our day-to-day activities, leaving little room for exploration and growth. Many times, I’ve found myself wanting to start something new, but not quite sure where to begin or seek guidance. Sound familiar?</p><p>Around the end of last year, I decided to break free from this cycle. I embarked on a journey of exploration, and it led me to an incredible source of inspiration: 🌟𝐏𝐎𝐃𝐂𝐀𝐒𝐓𝐒🌟</p><p>Benefits that I found when using podcast:<br>𝟏. 𝗖𝗼𝗻𝘃𝗲𝗻𝗶𝗲𝗻𝗰𝗲: Podcasts fit seamlessly into your daily life. You can download them and listen while commuting, working out, or even during those mundane tasks that usually feel like waste of time.</p><p>𝟐. 𝗗𝗶𝘃𝗲𝗿𝘀𝗲 𝗖𝗼𝗻𝘁𝗲𝗻𝘁: Podcasts cover a vast array of topics, making it easy to find something that aligns with your interests. Whether you’re into tech, business, personal development, or something entirely different, there’s a podcast for you.</p><p>𝟑. 𝗘𝘅𝗽𝗲𝗿𝘁 𝗜𝗻𝘀𝗶𝗴𝗵𝘁𝘀: Imagine having access to the brightest minds in tech and business, sharing their knowledge and experiences. Podcasts bring you closer to industry leaders and visionaries.</p><p>𝟒. 𝗜𝗻-𝗗𝗲𝗽𝘁𝗵 𝗘𝘅𝗽𝗹𝗼𝗿𝗮𝘁𝗶𝗼𝗻: Unlike short social media posts, podcasts dive deep into subjects. They offer a thorough exploration of ideas, trends, and innovations.</p><p>To get you started, here are a few podcasts I highly recommend:<br>𝟏. 𝐚𝟏𝟔𝐳: For tech and culture trends, news, and insights into the future.</p><p>𝟐. 𝐇𝐁𝐑 𝐈𝐝𝐞𝐚𝐂𝐚𝐬𝐭: Listen to leading names in business and management. Gain valuable insights into leadership, strategy, and innovation.</p><p>𝟑. 𝐘𝐨𝐮𝐫 𝐔𝐧𝐝𝐢𝐯𝐢𝐝𝐞𝐝 𝐀𝐭𝐭𝐞𝐧𝐭𝐢𝐨𝐧: This one’s all about the incredible power that technology holds over our lives and how we can harness it for a more humane future. A must-listen for anyone in the digital age.</p><p>𝟒. 𝐀𝐖𝐒: Stay up-to-date with the latest developments in the AWS platform. Perfect for tech enthusiasts and cloud enthusiast.</p><p>I personally use Google Podcast and find it very good. A light application with features like download for offline listening and automatically delete the offline content after 30 days.</p><p>So, next time you find yourself unsure of what to do or simply tired of the same old social media routine, consider tuning in to a podcast. You’ll be amazed at the inspiration and ideas waiting for you there. 🎙️</p><p><a href="https://www.linkedin.com/feed/hashtag/?keywords=data&amp;highlightedUpdateUrns=urn%3Ali%3Aactivity%3A7109898950916157440">#data</a> <a href="https://www.linkedin.com/feed/hashtag/?keywords=podcasts&amp;highlightedUpdateUrns=urn%3Ali%3Aactivity%3A7109898950916157440">#podcasts</a> <a href="https://www.linkedin.com/feed/hashtag/?keywords=personalgrowth&amp;highlightedUpdateUrns=urn%3Ali%3Aactivity%3A7109898950916157440">#personalgrowth</a> <a href="https://www.linkedin.com/feed/hashtag/?keywords=innovation&amp;highlightedUpdateUrns=urn%3Ali%3Aactivity%3A7109898950916157440">#innovation</a> <a href="https://www.linkedin.com/feed/hashtag/?keywords=knowledgesharing&amp;highlightedUpdateUrns=urn%3Ali%3Aactivity%3A7109898950916157440">#knowledgesharing</a> <a href="https://www.linkedin.com/feed/hashtag/?keywords=inspiration&amp;highlightedUpdateUrns=urn%3Ali%3Aactivity%3A7109898950916157440">#inspiration</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=618d7af27cb8" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How I navigated through different Data Governance Policies & where to implement them]]></title>
            <link>https://medium.com/@dnyanesh.bandbe88/how-i-navigated-through-different-data-governance-policies-where-to-implement-them-82616109daf8?source=rss-6b4191a239f------2</link>
            <guid isPermaLink="false">https://medium.com/p/82616109daf8</guid>
            <category><![CDATA[solution-architect]]></category>
            <category><![CDATA[data]]></category>
            <category><![CDATA[data-engineering]]></category>
            <category><![CDATA[data-governance]]></category>
            <category><![CDATA[framework]]></category>
            <dc:creator><![CDATA[Dnyanesh Bandbe]]></dc:creator>
            <pubDate>Tue, 05 Sep 2023 08:32:00 GMT</pubDate>
            <atom:updated>2023-09-05T08:32:00.365Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HX81qpx__YD6eWfgj4XU8w.jpeg" /></figure><h3>My journey towards understanding where different Data Governance policies apply across the Data Platform</h3><p>Does this sound similar ??… You face a problem or incident in your PRODUCTION system and after a long and tiring RCA find out that all that could have been avoided only if there were certain frameworks in place to guide, control and govern the processes ?</p><p>The obvious response to such incidents is to find avenues to improve the process or implement a framework in not present at all. It is during this time, we realize that we cannot just a single framework, but it is a inter-dependent web of frameworks that need to be implemented together in order to assist each other.</p><p>For example, consider a security incident where certain datasets where accesses by some unauthorized individuals. Now, first response would be to assess the current <strong>Data Access Control Framework</strong> but this is time when I realized we also need <strong>Data Classification and Handling Framework</strong> to help us identify Classified or General Public data.</p><p>So to overcome such hurdles, I ventured into identifying areas &amp; examples to help myself understand various Data Governance Frameworks and also associate a working example to each one of them to create a mental map of how each policy works.</p><p>Here are my notes,</p><h3>Data Security and Compliance Policies:</h3><p><strong>1.Data Classification and Handling Policy:</strong> Classify data into categories based on sensitivity (e.g., public, internal, confidential). Define how each category should be handled, ensuring appropriate security measures are in place.</p><p><em>Example:</em> Classify customer data as confidential, requiring encryption during transmission and restricted access only to authorized personnel.</p><p><strong>2. Data Access Control Policy:</strong> Establish access controls to restrict data access based on roles and responsibilities. Implement authentication mechanisms and define authorization levels.</p><p><em>Example:</em> Only HR managers can access employee salary information, and only finance personnel can view financial reports.</p><p><strong>3. Data Retention and Archiving Policy:</strong> Set guidelines for data retention periods and archiving practices. Define how long data should be retained based on legal and business requirements.</p><p><em>Example:</em> Customer purchase history data is retained for 7 years to comply with tax regulations.</p><p><strong>4. Data Privacy Policy:</strong> Define how personal and sensitive data should be collected, stored, processed, and shared in compliance with privacy regulations like GDPR.</p><p><em>Example:</em> Obtain explicit consent from users before collecting and using their personal data for marketing purposes.</p><p><strong>4. Data Security Policy:</strong> Lay out security measures like encryption, firewalls, and regular security assessments to safeguard data from unauthorized access and breaches.</p><p><em>Example:</em> Implement end-to-end encryption for data transmission and conduct regular vulnerability assessments.</p><p><strong>5. Data Compliance and Legal Policy:</strong> Outline how the organization will adhere to legal requirements, regulations, and industry standards related to data management.</p><p><em>Example:</em> Develop a process for responding to legal requests for data disclosure in accordance with local laws.</p><h3>Data Quality and Accuracy Policies:</h3><p><strong>1.Data Quality Policy:</strong> Define data quality standards and metrics, specifying accuracy, completeness, consistency, and timeliness requirements for data.</p><p><em>Example:</em> Customer addresses must be accurate and complete, with less than 1% error rate.</p><p><strong>2. Data Change Management Policy:</strong> Set guidelines for making changes to data, outlining the process, approvals, and documentation required.</p><p><em>Example:</em> Any changes to customer contact information must be approved by a supervisor and documented in the system.</p><p><strong>3. Data Incident Response Policy:</strong> Establish procedures to follow in case of data breaches or incidents, including notification steps and corrective actions.</p><p><em>Example:</em> If a data breach occurs, the IT team must isolate affected systems, notify affected parties within 48 hours, and initiate forensic investigation.</p><p><strong>4. Data Integration and Interoperability Policy:</strong> Define protocols for integrating data from different sources, ensuring consistency and accuracy during the integration process.</p><p><em>Example:</em> When integrating customer data from different departments, ensure that duplicate records are identified and merged.</p><h3>Organizational Governance and Communication Policies:</h3><p><strong>1.Data Sharing and Collaboration Policy:</strong> Outline guidelines for sharing data within and outside the organization, including data format standards and secure sharing methods.</p><p><em>Example:</em> Sales and marketing teams can access customer data through a secure cloud-based platform using role-based access controls.</p><p><strong>2. Data Ownership and Stewardship Policy:</strong> Clarify roles and responsibilities for data ownership and stewardship, ensuring accountability for data quality and security.</p><p><em>Example:</em> The marketing department owns customer demographic data, and the IT department is responsible for ensuring its security.</p><p><strong>3. Data Governance Communication Policy:</strong> Define how data governance practices and updates will be communicated across the organization to maintain awareness and understanding.</p><p><em>Example:</em> Regular email newsletters and quarterly town hall meetings will inform employees about data governance initiatives and changes.</p><p><strong>4. Data Lifecycle Management Policy:</strong> Establish guidelines for the entire data lifecycle, from creation to archival or deletion, ensuring compliance and efficiency.</p><p><em>Example:</em> Customer data will be archived after 5 years of inactivity, and archived data will be deleted after 10 years.</p><p><strong>5. Data Governance Steering Committee Policy:</strong> Create a committee responsible for overseeing data governance initiatives, outlining their roles, responsibilities, and decision-making authority.</p><p><em>Example:</em> The Data Governance Steering Committee will consist of representatives from IT, legal, compliance, and business units, meeting quarterly to review and approve data governance policies.</p><p><strong>6. Data Training and Awareness Policy:</strong> Develop training programs to educate employees about data governance policies, data handling best practices, and the importance of data security and accuracy.</p><p><em>Example:</em> New employees will undergo mandatory data governance training during their onboarding process, and annual refresher training will be provided to all employees.</p><p><strong>7. Data Policy Review and Audit Policy:</strong> Define a process for regularly reviewing and auditing data governance policies to ensure they remain up to date and effective.</p><p><em>Example:</em> Data governance policies will be reviewed annually by the Data Governance Steering Committee and audited by an external party every two years.</p><p><strong>8. Data Ethics and Accountability Policy:</strong> Lay out ethical guidelines for data usage, outlining how data should be used responsibly and ethically to maintain trust with stakeholders.</p><p><em>Example:</em> Customer data will only be used for legitimate business purposes and will not be sold or shared without explicit consent.</p><p>My list might not be exhaustive or completely relatable for every scenario, but I have tried to simply it as much as I could. However, I am still new in this big arena of Data Governance, so would love to hear your experience and examples.</p><p>We can only grow together !!</p><p>#datagovernance #data # dataengineering #datasolutions #framework #governanceframework #solutiondesign</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=82616109daf8" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[ Implementing Data Governance Policies: Your Roadmap to Success ️]]></title>
            <link>https://medium.com/@dnyanesh.bandbe88/implementing-data-governance-policies-your-roadmap-to-success-%EF%B8%8F-22881ed10bdb?source=rss-6b4191a239f------2</link>
            <guid isPermaLink="false">https://medium.com/p/22881ed10bdb</guid>
            <category><![CDATA[data-engineering]]></category>
            <category><![CDATA[data-architecture]]></category>
            <category><![CDATA[data-governance]]></category>
            <category><![CDATA[solution-architecture]]></category>
            <category><![CDATA[data]]></category>
            <dc:creator><![CDATA[Dnyanesh Bandbe]]></dc:creator>
            <pubDate>Tue, 29 Aug 2023 08:32:27 GMT</pubDate>
            <atom:updated>2023-08-29T08:32:27.258Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DWm9yGyiu6rczzZ5vc719A.png" /><figcaption>Quick guide to get started with implementing Data Governance Policies in your Organization</figcaption></figure><h3>Quick guide to get started with implementing Data Governance Policies in your Organization</h3><p>Data governance policies empower organizations to navigate the data landscape with confidence. Overcoming implementation challenges ensures a data-driven journey that reaps long-term rewards. 🚀📊</p><p>Now they might seem like a maze, but they’re the compass that guides your organization to success. 🌐 Why are they so crucial? Let’s dive in!🚀</p><h3>Why Are Data Governance Policies Important?</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qRr3Hek_6UpV0eLwl42Ajw.png" /><figcaption>Why Are Data Governance Policies Important?</figcaption></figure><p>🔒 <strong>Data Protection:</strong> With policies in place, sensitive information stays shielded from prying eyes, ensuring compliance with regulations like GDPR and CCPA.</p><p>🎯 <strong>Informed Decisions:</strong> Quality data drives informed decisions. Policies maintain data accuracy and consistency, ensuring reliable insights.</p><p>🚀 <strong>Efficiency:</strong> Streamlined processes driven by policies eliminate redundancy, saving time and resources.</p><p>🤝 <strong>Collaboration:</strong> Policies foster seamless data sharing within and outside the organization, boosting teamwork and innovation.</p><h3>Challenges Organizations Face</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7eEsLTI3Chh04g494XgrDQ.png" /><figcaption>Challenges Organizations Face</figcaption></figure><p>🔍 <strong>Complexity:</strong> Crafting and implementing policies demands understanding complex regulations and aligning with diverse departments.</p><p>⚙️ <strong>Technical Hurdles:</strong> Integrating policies into tech systems can be tricky, especially across varied data platforms.</p><p>📢 <strong>Communication Gap:</strong> Employees might not grasp policy importance. Clear communication is key.</p><p>⏰ <strong>Sustainability:</strong> Policies must evolve with tech advancements and changing regulations, demanding constant updates.</p><h3>Crafting Your Data Governance Strategy</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ipjIwlbftOH3grlgMy1YiQ.png" /><figcaption>Crafting Your Data Governance Strategy</figcaption></figure><p>📚 <strong>Education:</strong> Equip yourself with knowledge about your industry’s regulations and your organization’s unique data landscape.</p><p>🔍 <strong>Assessment:</strong> Identify gaps and vulnerabilities in your current data management practices.</p><p>🤝 <strong>Stakeholder Engagement:</strong> Collaborate with cross-functional teams to align policy goals with organizational objectives.</p><h3>The Policy Framework</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-Qwq7Wr1-SZBtlwkuX4EFw.png" /><figcaption>The Policy Framework</figcaption></figure><p>📜 <strong>Policy Creation:</strong> Draft clear, concise policies for data security, quality, access, and more, ensuring they’re easily understandable.</p><p>🎯 <strong>Prioritization:</strong> Begin with foundational policies, then build on them to create a comprehensive framework.</p><p>🌐 <strong>Customization:</strong> Tailor policies to your organization’s specific needs, considering industry regulations and unique challenges.</p><h3>Rolling Out Policies</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Jdgv7Xs_YEcYUZ5O035gEw.png" /><figcaption>Rolling Out Policies</figcaption></figure><p>🚀 <strong>Communication:</strong> Spread awareness about policies, their importance, and the impact they’ll have on daily operations.</p><p>👩‍💻 <strong>Integration:</strong> Collaborate with IT teams to seamlessly integrate policies into existing data platforms and processes.</p><p>📊 <strong>Monitoring and Adaptation:</strong> Continuously review and update policies as regulations and technology evolve.</p><p>Remember, successful implementation is an ongoing journey. It’s about embedding data governance practices into your organizational culture and reaping the rewards of informed decisions, reduced risks, and streamlined processes. 🌟 Let’s steer your data towards success! 🛣️📈</p><p>#datagovernance #datasolutions #dataengineering #data #analytics #solutionarchitecture #dataarchitect</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=22881ed10bdb" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>