<?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 Viraj Chavan on Medium]]></title>
        <description><![CDATA[Stories by Viraj Chavan on Medium]]></description>
        <link>https://medium.com/@virajchavan4321?source=rss-c0e32aab345a------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/proxy/1*TGH72Nnw24QL3iV9IOm4VA.png</url>
            <title>Stories by Viraj Chavan on Medium</title>
            <link>https://medium.com/@virajchavan4321?source=rss-c0e32aab345a------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 03 Dec 2026 12:58:24 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@virajchavan4321/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[Questions on AWS]]></title>
            <link>https://medium.com/@virajchavan4321/questions-on-aws-f8707b8f840f?source=rss-c0e32aab345a------2</link>
            <guid isPermaLink="false">https://medium.com/p/f8707b8f840f</guid>
            <dc:creator><![CDATA[Viraj Chavan]]></dc:creator>
            <pubDate>Wed, 15 Mar 2023 05:45:23 GMT</pubDate>
            <atom:updated>2023-03-15T05:45:23.906Z</atom:updated>
            <content:encoded><![CDATA[<ol><li><strong>Different Types of EC2 Instances on AWS</strong></li></ol><p>Amazon Elastic Compute Cloud (EC2) is a web service that provides resizable compute capacity in the cloud. There are different types of EC2 instances available on AWS to cater to various use cases and workloads. Here are the different types of EC2 instances available on AWS:</p><p>i)General Purpose Instances: These instances provide a balance of CPU, memory, and networking resources and are suitable for a wide range of workloads.</p><p>ii)Compute Optimized Instances: These instances are designed for compute-intensive workloads and are optimized for high-performance computing. They have a higher ratio of CPU to memory and are ideal for applications that require a lot of processing power.</p><p>iii)Memory Optimized Instances: These instances are optimized for memory-intensive workloads and are suitable for applications that require a large amount of memory. They are ideal for databases, in-memory analytics, and other memory-intensive workloads.</p><p>iv)Storage Optimized Instances: These instances are optimized for storage-intensive workloads and are ideal for applications that require high storage capacity, such as data warehouses and distributed file systems.</p><p>v)GPU Instances: These instances are optimized for graphics-intensive workloads and are ideal for applications that require high-performance graphics processing, such as machine learning, video rendering, and gaming.</p><p>vi)FPGA Instances: These instances are optimized for custom hardware acceleration and are ideal for applications that require specialized processing, such as genomics, financial analysis, and data compression.</p><p>vii)ARM Instances: These instances are powered by ARM-based processors and are designed for workloads that are optimized for ARM architecture. They offer a balance of compute, memory, and networking resources and are ideal for applications that are built for ARM-based systems.</p><p>Each instance type comes in different sizes and configurations, allowing users to choose the best instance type for their specific workload requirements.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f8707b8f840f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to Quickly Generate Fake Data in SQL server Using Faker]]></title>
            <link>https://medium.com/@virajchavan4321/how-to-quickly-generate-fake-data-in-sql-server-using-faker-91374b44c9ab?source=rss-c0e32aab345a------2</link>
            <guid isPermaLink="false">https://medium.com/p/91374b44c9ab</guid>
            <dc:creator><![CDATA[Viraj Chavan]]></dc:creator>
            <pubDate>Wed, 15 Mar 2023 02:50:12 GMT</pubDate>
            <atom:updated>2023-03-15T02:50:12.472Z</atom:updated>
            <content:encoded><![CDATA[<p>Generating fake data is a common task for software developers, data analysts, and data scientists. Fake data is often used for testing, creating demo datasets, or generating sample data for analysis. One of the most popular tools for generating fake data is the Python Faker library. In this article, we will explain how to quickly generate fake data in SQL server using Python Faker library.</p><p>I. Introduction</p><p>When generating fake data for SQL server, developers usually write SQL scripts that generate random data. However, this process can be time-consuming, especially if the developer needs to generate large datasets. Python Faker library offers an easier and faster solution for generating fake data. With Python Faker, developers can easily generate fake data for SQL server tables by using Python scripts.</p><p>II. Overview of Python Faker library</p><p>Python Faker library is an open-source library that generates fake data such as names, addresses, phone numbers, and dates. The library is built on top of the Python programming language and provides an easy-to-use API for generating fake data. Python Faker library is actively maintained and has a large community of users.</p><p>III. Installation and Setup of Python Faker library</p><p>Installing Python Faker library is straightforward. You can install it using pip, a Python package manager. Once you have installed the library, you can start using it in your Python scripts.</p><p>Install faker library by using following command in CMD</p><pre>pip install faker</pre><p>IV. Generating fake data using Python Faker library</p><p>To generate fake data using Python Faker library, you need to write a Python script that uses the library’s API. In this script, you can define the types of data you want to generate, such as names, addresses, or phone numbers. You can also specify the number of records you want to generate.</p><p>Here’s an example of how to generate fake data for a SQL server table using Python Faker library:</p><pre>from faker import Faker<br>import pyodbc<br><br>fake = Faker()<br><br># Connect to the SQL server database<br>conn = pyodbc.connect(&#39;DRIVER={SQL Server};SERVER=SERVERNAME;DATABASE=DBNAME;UID=USERNAME;PWD=PASSWORD&#39;)<br><br># Create a cursor object<br>cursor = conn.cursor()<br><br># Define the number of records to generate<br>num_records = 1000<br><br># Loop over the number of records and insert fake data into the table<br>for i in range(num_records):<br>    # Generate fake data using Python Faker library<br>    name = fake.name()<br>    address = fake.address()<br>    phone_number = fake.phone_number()<br>    date_of_birth = fake.date_of_birth()<br><br>    # Insert fake data into the SQL server table<br>    cursor.execute(&quot;INSERT INTO dbo.Person (Name, Address, Phone_Number, Date_Of_Birth) VALUES (?, ?, ?, ?)&quot;,<br>                   (name, address, phone_number, date_of_birth))<br><br># Commit the changes<br>conn.commit()<br><br># Close the cursor and the connection<br>cursor.close()<br>conn.close()</pre><p>In this script, we first import the Python Faker library and the pyodbc library for connecting to the SQL server database. We then create a connection to the database and define a cursor object. We also define the number of records we want to generate.</p><p>We then loop over the number of records and generate fake data using the Python Faker library. In this example, we generate fake data for the Person table, which has columns for Name, Address, Phone_Number, and Date_Of_Birth. We insert the fake data into the table using a SQL insert statement.</p><p>Finally, we commit the changes and close the cursor and the connection.</p><p>V. Conclusion</p><p>Python Faker library is a powerful tool for generating fake data in SQL server. It offers an easy-to-use API and a wide range of data types. With Python Faker, developers can quickly generate large datasets for testing, analysis, or demo purposes. If you’re working with SQL server and need to generate fake data</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=91374b44c9ab" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Implementing SCD-2 in snowflake using streams and merge]]></title>
            <link>https://medium.com/@virajchavan4321/implementing-scd-2-in-snowflake-using-streams-and-merge-7d6601575b3f?source=rss-c0e32aab345a------2</link>
            <guid isPermaLink="false">https://medium.com/p/7d6601575b3f</guid>
            <dc:creator><![CDATA[Viraj Chavan]]></dc:creator>
            <pubDate>Mon, 13 Mar 2023 03:58:56 GMT</pubDate>
            <atom:updated>2023-03-14T04:51:46.508Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Introduction</strong></p><p>In the world of data warehousing, slowly changing dimensions (SCDs) play an essential role in keeping track of changes over time. As data grows and evolves, businesses need to be able to maintain historical records while also keeping their data up to date. SCD-2, one of the most commonly used SCD types, allows businesses to keep track of changes to data by creating new records for each change. In this article, we’ll explore how to implement SCD-2 in Snowflake, a cloud-based data warehousing platform, using stream and merge.</p><p><strong>Understanding SCD-2</strong></p><p>SCD-2 is a type of slowly changing dimension that creates a new record for each change in data. This allows businesses to maintain historical records while also keeping their data up to date. SCD-2 is particularly useful for tracking changes in data that occur over time, such as customer addresses, employee promotions, or product prices. By creating new records for each change, businesses can track the history of these changes and analyze trends over time.</p><p><strong>Stream in Snowflake</strong></p><p>Stream is a feature in Snowflake that allows users to capture changes to a table in real-time. This feature is particularly useful for SCD-2 implementation because it allows businesses to capture changes as they happen and create new records in real-time. To create a stream in Snowflake, users must define the table they wish to capture changes for and specify the schema of the stream.</p><p><strong>Stream result look like</strong></p><p>— INSERT<br>SELECT * FROM MY_STREAM<br>WHERE metadata$action = ‘INSERT’<br>AND metadata$isupdate = ‘FALSE’;</p><p>— UPDATE<br>SELECT * FROM MY_STREAM<br>WHERE metadata$action = ‘INSERT’<br>AND metadata$isupdate = ‘TRUE’;</p><p>and</p><p>SELECT * FROM MY_STREAM<br>WHERE metadata$action = ‘DELETE’<br>AND metadata$isupdate = ‘TRUE’;</p><p>— DELETE<br>SELECT * FROM MY_STREAM<br>WHERE metadata$action = ‘DELETE’<br>AND metadata$isupdate = ‘FALSE’;</p><p><strong>Merge in Snowflake</strong></p><p>Merge is another feature in Snowflake that is useful for SCD-2 implementation. Merge allows users to update a table with data from another table based on a specified condition. This feature is particularly useful for SCD-2 implementation because it allows businesses to update existing records with new data and create new records for changes that cannot be updated.</p><h3><strong>Hands on by example:</strong></h3><p>Tables structure</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/637/1*LH24u-tLVtTflRVkWAY6rA.png" /></figure><p>Below records have been loaded into source table per demonstration -</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*L62ZyBw0XxELHPR2soocGw.png" /></figure><p>First of all create a stream on source table to capture changes only</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/689/1*7R0-_VqCKGRXhjRrHRRhwg.png" /></figure><p>Stream looks like this</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dBj3Lgr4iOr3Z2v-PDc4tw.png" /></figure><p>Then Run the below query to see the change in the table</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IXlC06aK7YhMUzeKXqovCA.png" /></figure><p>Then we can see the result in Target table</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5HjFtlWRQJY83rGKBPJGPg.png" /></figure><p><strong>Conclusion:</strong> Implementing SCD-2 in Snowflake using streams and merge is an effective technique to track changes in data over time and maintain a historical record of the changes. By using streams to capture changes in real-time and merge to update the historical records, users can maintain an accurate and consistent view of the data over time. With Snowflake’s powerful data warehousing platform and features like streams and merge, users can easily implement SCD-2 and other data warehousing techniques to meet their business needs.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7d6601575b3f" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>