<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Ashish Mishra</title>
    <description>The latest articles on DEV Community by Ashish Mishra (@arglee).</description>
    <link>https://dev.to/arglee</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1017537%2F7cdbf876-5d8f-4470-8d55-35eec76d4436.jpeg</url>
      <title>DEV Community: Ashish Mishra</title>
      <link>https://dev.to/arglee</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/arglee"/>
    <language>en</language>
    <item>
      <title>Chrome Extensions using Vite + Typescript + React: Stepwise Process</title>
      <dc:creator>Ashish Mishra</dc:creator>
      <pubDate>Tue, 24 Oct 2023 02:32:35 +0000</pubDate>
      <link>https://dev.to/arglee/chrome-extensions-using-vite-typescript-react-stepwise-process-2ddp</link>
      <guid>https://dev.to/arglee/chrome-extensions-using-vite-typescript-react-stepwise-process-2ddp</guid>
      <description>&lt;p&gt;Chrome extensions come in really handy when it comes to blocking ads, improving productivity, managing cluttered tabs, and of course improving the readability of code on GitHub for developers.❤️&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Fc9XKCRf--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn-images-1.medium.com/max/1024/0%2AsWqccE_AfTucc7Z8.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Fc9XKCRf--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn-images-1.medium.com/max/1024/0%2AsWqccE_AfTucc7Z8.png" alt="" width="800" height="450"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Image Courtesy: singlequote.blog&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;In this blog, let’s create a Chrome extension in an easy 4-step process using &lt;a href="https://react.dev/"&gt;React&lt;/a&gt;, &lt;a href="https://www.typescriptlang.org/"&gt;Typescript&lt;/a&gt;, and &lt;a href="https://vitejs.dev/guide/why.html"&gt;Vite bundler&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Let us assume that nodejs is pre-installed, if not then you can follow this &lt;a href="https://singlequote.blog/chrome-extension-using-node-rollup-plugin-stepwise-process/(opens%20in%20a%20new%20tab)"&gt;setup nodejs and dependencies on the development/local machine&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Now, since we are all set, Let’s begin!!&lt;/p&gt;
&lt;h3&gt;
  
  
  Step 1: Initialise a new Project
&lt;/h3&gt;

&lt;p&gt;Create a new project using Vite.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npm create vite@latest
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This command will prompt for a few inputs from the user:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Project Name:&lt;/strong&gt; Project name that you want to give to your project.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Select a Framework:&lt;/strong&gt; Choose ‘React’ as that is what we are going with in this tutorial.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Select a variant&lt;/strong&gt; : Choose ‘Typescript’ there to keep up with this tutorial.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--MNMOBOo5--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn-images-1.medium.com/max/558/0%2ATx52vye-FcK2X1aM.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--MNMOBOo5--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn-images-1.medium.com/max/558/0%2ATx52vye-FcK2X1aM.png" alt="" width="558" height="224"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Image Courtesy: singlequote.blog&lt;/em&gt;&lt;/p&gt;
&lt;h3&gt;
  
  
  Step 2: Install Dependencies &amp;amp; Run Application on Local
&lt;/h3&gt;

&lt;p&gt;Now change the directory to the created/initialized folder and install the dependencies.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;gt; cd vite-ts-react-test
&amp;gt; npm install
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now to test if everything worked fine. Run the following command in the terminal.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npm run dev
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This will prompt a new message on the command line similar to below screenshot:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--5-irgMUx--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn-images-1.medium.com/max/684/0%2AUCdwuiNdCVvVxbaF.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--5-irgMUx--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn-images-1.medium.com/max/684/0%2AUCdwuiNdCVvVxbaF.png" alt="" width="684" height="302"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Image Courtesy: singlequote.blog&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;This signifies that everything is running fine up to this point. Once you open the above shown — &lt;a href="http://localhost:5173/"&gt;http://localhost:5173/&lt;/a&gt; on the browser, you will a see Vite welcome page, something like this:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s---ZTO2PQD--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn-images-1.medium.com/max/918/0%2AU_PnruXEZpWBnkim.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s---ZTO2PQD--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn-images-1.medium.com/max/918/0%2AU_PnruXEZpWBnkim.png" alt="" width="800" height="481"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Image Courtesy: singlequote.blog&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Next exit from the vite localhost prompt using ‘CTRL+C’ and run the command to build the project&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npm run build
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--kALPUZwo--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn-images-1.medium.com/max/924/0%2AnnZ1RvP6rQTkmj5I.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--kALPUZwo--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn-images-1.medium.com/max/924/0%2AnnZ1RvP6rQTkmj5I.png" alt="" width="800" height="365"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Image Courtesy: singlequote.blog&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;An output something like the above will come up on the terminal/cmd.&lt;/p&gt;
&lt;h3&gt;
  
  
  Step 3: Create a Chrome Extension and Validate it
&lt;/h3&gt;

&lt;p&gt;At the end of step 2, the boilerplate will be ready inside the project directory. You will see a lot of stuff inside the directory but don’t worry we are only interested in a few of these:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Dist:&lt;/strong&gt; The “&lt;em&gt;build&lt;/em&gt;” command creates this folder dynamically by copying a few files from other folders or as instructed in the config file. For this tutorial default configuration will work. So, we are not going to touch anything inside it.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Public:&lt;/strong&gt; We will add all of our project files and static files in this folder and the “&lt;em&gt;build&lt;/em&gt;” command will add those to the dist folder, once the build is successful.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Src:&lt;/strong&gt; This is where magic happens. This is where we write typescript code, you will also some typescript written in this blog.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--GdfHzgG7--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn-images-1.medium.com/max/451/0%2A0OKcuFLdYTYhRPp4.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--GdfHzgG7--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn-images-1.medium.com/max/451/0%2A0OKcuFLdYTYhRPp4.png" alt="" width="451" height="408"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Image Courtesy: singlequote.blog&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Now go to &lt;strong&gt;&lt;em&gt;public&lt;/em&gt;&lt;/strong&gt; folder and create a new file &lt;strong&gt;&lt;em&gt;manifest.json&lt;/em&gt;&lt;/strong&gt; :&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;{
    "manifest_version": 3,
    "name": "vite-ts-react-test",
    "version": "1.0",
    "description": "",
    "action": {
        "default_popup": "index.html"
    },
    "permissions": [
        "scripting",
        "tabs",
        "activeTab"
    ],
    "host_permissions": [
        "https://*/*",
        "http://*/*"
    ],
    "icons": {
        "16": "images/16x16.png",
        "32": "images/32x32.png"
    }
  }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Run the below command to build the project:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npm run build
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now go to chrome://extension, and enable developer mode if not already set. Click on “Load Unpacked” to pick &lt;strong&gt;&lt;em&gt;dist&lt;/em&gt;&lt;/strong&gt; folder from the local file system.&lt;/p&gt;

&lt;p&gt;Voila!! Our Chrome Extension is ready to try.&lt;/p&gt;

&lt;p&gt;If you are still following up to this point, then a new extension will be available on your extension list. You can go ahead and click on the extension on the Chrome menu bar, you will see the Vite welcome page as mentioned &lt;a href="https://singlequote.blog/chrome-extension-using-vite-typescript-react-stepwise-process/#Vite-Welcome-page-singlequoteblog"&gt;above on this page&lt;/a&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 4: Scripting in Chrome Extension
&lt;/h3&gt;

&lt;p&gt;In this step, let’s try to do some scripting to see if it works. Let’s go to the &lt;em&gt;“src”&lt;/em&gt; folder to write some typescript code.&lt;/p&gt;

&lt;p&gt;In this script, we will write a code using Chrome API to change the background color of the web page.&lt;/p&gt;

&lt;p&gt;let’s install the Chrome API using the below command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npm install -D @types/chrome
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now look for src/App.tsx file in the project directory and change the code as below:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// import { useState } from 'react'
import reactLogo from './assets/react.svg'
import viteLogo from '/vite.svg'
import './App.css'

function App() {
  // const [count, setCount] = useState(0) 
  const onClick = async () =&amp;gt; {
    let [tab] = await chrome.tabs.query({ active: true, currentWindow: true });
    chrome.scripting.executeScript({
      target: { tabId: tab.id! },
      func: () =&amp;gt; {
        document.body.style.backgroundColor = 'green';
      }
    });
  }
  return (
    &amp;lt;&amp;gt;
      &amp;lt;div&amp;gt;
        &amp;lt;a href="https://vitejs.dev" target="_blank"&amp;gt;
          &amp;lt;img src={viteLogo} className="logo" alt="Vite logo" /&amp;gt;
        &amp;lt;/a&amp;gt;
        &amp;lt;a href="https://react.dev" target="_blank"&amp;gt;
          &amp;lt;img src={reactLogo} className="logo react" alt="React logo" /&amp;gt;
        &amp;lt;/a&amp;gt;
      &amp;lt;/div&amp;gt;
      &amp;lt;h1&amp;gt;Vite + React&amp;lt;/h1&amp;gt;
      &amp;lt;div className="card"&amp;gt;
        &amp;lt;button onClick={() =&amp;gt; changeColorOnClick()}&amp;gt;
         Change Color
        &amp;lt;/button&amp;gt;
        &amp;lt;p&amp;gt;
          Edit &amp;lt;code&amp;gt;src/App.tsx&amp;lt;/code&amp;gt; and save to test HMR
        &amp;lt;/p&amp;gt;
      &amp;lt;/div&amp;gt;
      &amp;lt;p className="read-the-docs"&amp;gt;
        Click on the Vite and React logos to learn more
      &amp;lt;/p&amp;gt;
    &amp;lt;/&amp;gt;
  )
}
export default App
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;if you look closely most of the code is already available. The only new addition is a function “ &lt;strong&gt;&lt;em&gt;changeColorOnClick&lt;/em&gt;&lt;/strong&gt; “.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const changeColorOnClick = async () =&amp;gt; {
    let [tab] = await chrome.tabs.query({ active: true, currentWindow: true });
    chrome.scripting.executeScript({
      target: { tabId: tab.id! },
      func: () =&amp;gt; {
        document.body.style.backgroundColor = 'green';
      }
    });
  }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now don’t forget to build it again and refresh the extension from chrome://extensions.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npm run build
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;and it’s done!!&lt;/p&gt;

&lt;p&gt;Give it a try by visiting any website with a considerably white background like &lt;a href="http://singlequote.blog/"&gt;singlequote.blog&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--zm2fJuU6--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_800/https://cdn-images-1.medium.com/max/600/0%2AyfNDERWCqPu6OJa8.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--zm2fJuU6--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_800/https://cdn-images-1.medium.com/max/600/0%2AyfNDERWCqPu6OJa8.gif" alt="" width="600" height="383"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Tips and Tricks&lt;/strong&gt; : Running the &lt;strong&gt;&lt;em&gt;build&lt;/em&gt;&lt;/strong&gt; command after every change could be tiresome and error-prone. If you forgot to refresh and are wondering why the changes are not coming up — Rollup is here to rescue us. Read about &lt;a href="https://singlequote.blog/chrome-extension-using-node-rollup-plugin-stepwise-process/(opens%20in%20a%20new%20tab)"&gt;Chrome Extension using Node + Rollup plugin: Stepwise Process&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>javascripttips</category>
      <category>vitejs</category>
      <category>chromeextension</category>
    </item>
    <item>
      <title>Terminal/Commandline Trick: Multiprocessing Progress Bar — Python atpbar</title>
      <dc:creator>Ashish Mishra</dc:creator>
      <pubDate>Sat, 02 Sep 2023 14:43:20 +0000</pubDate>
      <link>https://dev.to/arglee/terminalcommandline-trick-multiprocessing-progress-bar-python-atpbar-4fl5</link>
      <guid>https://dev.to/arglee/terminalcommandline-trick-multiprocessing-progress-bar-python-atpbar-4fl5</guid>
      <description>&lt;h3&gt;
  
  
  Terminal/Commandline Trick: Multiprocessing Progress Bar — Python atpbar
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--N8MPK9d7--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn-images-1.medium.com/max/1024/0%2An68QjylBz7DwaYv-.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--N8MPK9d7--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn-images-1.medium.com/max/1024/0%2An68QjylBz7DwaYv-.jpeg" alt="" width="800" height="478"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Courtesy: Unspash&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;In this blog, we will discuss a simple yet very useful library for python terminal/command line usecases. Very often we work with command line python scripts to process a significantly high volume of data or files. Expectation is to have a way to track how many files are processing and what’s the speed of every process.&lt;/p&gt;

&lt;p&gt;The command line progress bars are here to rescue us.There are multiple progress bars available in the market and you can &lt;a href="http://singlequote.blog"&gt;read more about open source python commandline progress bars&lt;/a&gt;.&lt;/p&gt;
&lt;h3&gt;
  
  
  How to create a progress bar on the command line in Python?
&lt;/h3&gt;

&lt;p&gt;In this blog, we will discuss &lt;a href="https://pypi.org/project/atpbar/"&gt;atpbar&lt;/a&gt;. Python multiprocessing enabled progress bar for terminal. Atpbar provides following features:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Easy to install.&lt;/li&gt;
&lt;li&gt;Minimalistic progress bar without any fancy UX thus quite simple to implement.&lt;/li&gt;
&lt;li&gt;Compatible with multi-processing and multi-threading.&lt;/li&gt;
&lt;li&gt;Can add name to every subprocess in multiprocessing and multithreading.&lt;/li&gt;
&lt;li&gt;Python terminal progress bars simultaneously grow to show the progress of iterations of loops in &lt;a href="https://docs.python.org/3/library/threading.html"&gt;threading&lt;/a&gt; or &lt;a href="https://docs.python.org/3/library/multiprocessing.html"&gt;multiprocessing&lt;/a&gt; tasks.&lt;/li&gt;
&lt;li&gt;Compatible with &lt;a href="https://jupyter.org/"&gt;Jupyter Notebook&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;On TTY devices where progress bar is not compatible, it can show the status with numbers without progress bar.&lt;/li&gt;
&lt;li&gt;The object atpbar is an iterable that can wrap another iterable and shows the progress bars for outer and inner iterations.&lt;/li&gt;
&lt;li&gt;Break and exception exit the code and progress bar will stop right there.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--q0iD-BvZ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn-images-1.medium.com/max/1024/0%2Ae6tHuV0vP-MO1bm3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--q0iD-BvZ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn-images-1.medium.com/max/1024/0%2Ae6tHuV0vP-MO1bm3.png" alt="" width="800" height="134"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;atpbar by singlequote.blog&lt;/em&gt;&lt;/p&gt;
&lt;h3&gt;
  
  
  How to install python atpbar for commandline progress bar?
&lt;/h3&gt;

&lt;p&gt;Create virtualenv, if not present, using the following command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;virtualenv -p python3.9 
venv source venv/bin/activate 
python3 --version
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now install atpbar using below command for multi-processing python terminal/command line progress bar.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;pip install -U atpbar
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  How to use atpbar?
&lt;/h3&gt;

&lt;p&gt;you can find more details on exact implementation on&lt;a href="https://pypi.org/project/atpbar/"&gt;python foundation website&lt;/a&gt; or on &lt;a href="https://github.com/alphatwirl/atpbar"&gt;github page of atpbar&lt;/a&gt;. In this article I will explain the functionality in brief.&lt;/p&gt;

&lt;h4&gt;
  
  
  One loop
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import time, random
from atpbar import atpbar
n = random.randint(1000, 10000)
for i in atpbar(range(n)):
    time.sleep(0.0001)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A python terminal progress bar will look something like this&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--JXAU3Ru4--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn-images-1.medium.com/max/1024/0%2Ax-JS9unlMPDCnOkg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--JXAU3Ru4--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn-images-1.medium.com/max/1024/0%2Ax-JS9unlMPDCnOkg.png" alt="" width="800" height="53"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Single loop: Singlequote.blog&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;In order for atpbar to show a progress bar, the wrapped iterable needs to have a length. If the length cannot be obtained by len(), atpbar won't show a progress bar.&lt;/p&gt;
&lt;h4&gt;
  
  
  Nested loops
&lt;/h4&gt;

&lt;p&gt;atpbar can show progress bars for nested loops as shown in the below example.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;for i in atpbar(range(4), name='outer'):
    n = random.randint(1000, 10000)
    for j in atpbar(range(n), name='inner {}'.format(i)):
        time.sleep(0.0001)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In this example, outer loop will iterate 4 times while inner loops are processing.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--b8FO6uo0--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn-images-1.medium.com/max/1024/0%2AR4yBejQC74OWfsPg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--b8FO6uo0--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn-images-1.medium.com/max/1024/0%2AR4yBejQC74OWfsPg.png" alt="" width="800" height="115"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Nest loop: Singlequote.blog&lt;/em&gt;&lt;/p&gt;
&lt;h4&gt;
  
  
  Threading
&lt;/h4&gt;

&lt;p&gt;atpbar can show multiple progress bars for loops concurrently iterating in different threads.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;from atpbar import flush
import threading

def run_with_threading():
    nthreads = 5
    def task(n, name):
        for i in atpbar(range(n), name=name):
            time.sleep(0.0001)
    threads = []
    for i in range(nthreads):
        name = 'thread {}'.format(i)
        n = random.randint(5, 100000)
        t = threading.Thread(target=task, args=(n, name))
        t.start()
        threads.append(t)
    for t in threads:
        t.join()
    flush()

run_with_threading()
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;As shown in below screenshot, tasks are running concurrently and python terminal progress bar will show the staus of each tasks simultaneously.&lt;/p&gt;

&lt;p&gt;One important thing to notice here is flush() function that returns when loops have finished and informs main thread or main program to finish updating progress bars.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--HSoljNUG--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn-images-1.medium.com/max/1024/0%2ARBC20GaPAY2GoTV_.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--HSoljNUG--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn-images-1.medium.com/max/1024/0%2ARBC20GaPAY2GoTV_.png" alt="" width="800" height="137"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Threading atpbar&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;As a task completes, the progress bar for the task moves up. The progress bars for active tasks are at the bottom.&lt;/p&gt;

&lt;h4&gt;
  
  
  Multiprocessing
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import multiprocessing
multiprocessing.set_start_method('fork', force=True)

from atpbar import register_reporter, find_reporter, flush

def run_with_multiprocessing():
    def task(n, name):
        for i in atpbar(range(n), name=name):
            time.sleep(0.0001)
    def worker(reporter, task, queue):
        register_reporter(reporter)
        while True:
            args = queue.get()
            if args is None:
                queue.task_done()
                break
            task(*args)
            queue.task_done()
    nprocesses = 4
    ntasks = 10
    reporter = find_reporter()
    queue = multiprocessing.JoinableQueue()
    for i in range(nprocesses):
        p = multiprocessing.Process(target=worker, args=(reporter, task, queue))
        p.start()
    for i in range(ntasks):
        name = 'task {}'.format(i)
        n = random.randint(5, 100000)
        queue.put((n, name))
    for i in range(nprocesses):
        queue.put(None)
        queue.join()
    flush()

run_with_multiprocessing()
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;With multiprocessing enabled with atpbar, two more functions come into play:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;find_reporter()&lt;/strong&gt; — This function is required to be called into main thread or main process. This intimate main thread of atpbar to look for subprocesses.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;register_reporter()&lt;/strong&gt; — This function is required to be called inside every new subprocesses. Every call from subprocess will be tracked by main thread and a new python terminal progress bar will be created.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Simultaneously growing python terminal-based progress bars will look something like this.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--U19H0HOL--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn-images-1.medium.com/max/1024/0%2A9bvNpl4Kcr_nbFYA.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--U19H0HOL--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn-images-1.medium.com/max/1024/0%2A9bvNpl4Kcr_nbFYA.png" alt="" width="800" height="242"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;multiprocessing atpbar&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;[AUTHOR’S CORNER]&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;This article is part one of the&lt;/em&gt; &lt;a href="http://singlequote.blog"&gt;&lt;em&gt;progress bar in Python series&lt;/em&gt;&lt;/a&gt;&lt;em&gt;. Stay tuned for more such articles on&lt;/em&gt; &lt;a href="http://singlequote.blog"&gt;&lt;em&gt;singlequote.blog&lt;/em&gt;&lt;/a&gt;&lt;em&gt;.If you find this exercise helpful then motivate me to write more such posts for you. Share this with your friends, family, and colleagues.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Originally published at&lt;/em&gt; &lt;a href="https://singlequote.blog/terminal-commandline-tricks-multiprocessing-progress-bar-python-atpbar/"&gt;&lt;em&gt;https://singlequote.blog&lt;/em&gt;&lt;/a&gt; &lt;em&gt;on September 2, 2023.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>pythontricks</category>
      <category>progressbar</category>
      <category>commandlineinterface</category>
      <category>python</category>
    </item>
    <item>
      <title>Personal Growth: Journey From Burnout to Breakthrough</title>
      <dc:creator>Ashish Mishra</dc:creator>
      <pubDate>Fri, 01 Sep 2023 14:21:24 +0000</pubDate>
      <link>https://dev.to/arglee/personal-growth-journey-from-burnout-to-breakthrough-30gj</link>
      <guid>https://dev.to/arglee/personal-growth-journey-from-burnout-to-breakthrough-30gj</guid>
      <description>&lt;p&gt;Personal Growth — How to Reclaim Your Energy and Purpose in life to achieve more.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--PproyVw_--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn-images-1.medium.com/max/1024/0%2AtfxP3MyA2zuFZXZB" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--PproyVw_--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn-images-1.medium.com/max/1024/0%2AtfxP3MyA2zuFZXZB" alt="" width="800" height="449"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Photo by Nubelson Fernandes on Unsplash&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;In the last blog, I discussed the &lt;a href="https://singlequote.blog/be-5-times-more-productive-stepwise-guide/"&gt;steps to achieve maximum output by investing significantly less time&lt;/a&gt; and&lt;a href="https://singlequote.blog/be-5-times-more-productive-stepwise-guide/"&gt;how to improve your productivity at work&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;In this blog, we will discuss the next topic for productivity and personal growth. That is “burnout”.&lt;/p&gt;

&lt;h3&gt;
  
  
  What is burnout?
&lt;/h3&gt;

&lt;p&gt;“ &lt;strong&gt;Burnou&lt;/strong&gt; t” — Is it a real thing or is it another excuse for &lt;em&gt;Absenteeism&lt;/em&gt;?&lt;/p&gt;

&lt;p&gt;According to a study, Approximately 28% of workers say they burnout “very often” or “always” at work and 24% of workers report that they “rarely” or “never” feel burnout at work.&lt;/p&gt;

&lt;p&gt;There are a few days when we feel productive and energetic even after working for long hours and on the other hand, there are also a few drenched days when we feel burned out even before lunchtime. This happens to all of us. Agreed?&lt;/p&gt;

&lt;p&gt;Burning out directly impacts our productivity and personal growth. I have published a productivity tips blog on &lt;a href="https://singlequote.blog/be-5-times-more-productive-stepwise-guide/"&gt;How to increase your productivity at least 5 times without any extra effort&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;In this blog, I am not considering frequent burning out due to health issues. This blog is for people who tend to burnout very easily due to overwhelming tasks either professionally or personally.&lt;/p&gt;

&lt;h3&gt;
  
  
  What are the burnout coping strategies?
&lt;/h3&gt;

&lt;p&gt;Let’s try to understand this using an example of 4 candidates(Sandra, Dave, John, and Laura) working in a corporate/company. All 4 candidates work in the same environment and have similar facilities. Their performance is also competitive. Now let’s observe how they behave whenever they face burnout or frustration during their work.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--v9f9ABo1--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn-images-1.medium.com/max/1024/0%2ACc3Zody3bw0dY-pB.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--v9f9ABo1--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn-images-1.medium.com/max/1024/0%2ACc3Zody3bw0dY-pB.png" alt="" width="800" height="400"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Image by Ashish Mishra on singlequote.blog&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Sandra&lt;/strong&gt; tries to escape from work and go for a run or the gym and this helps her think straight and now she feels more energetic and motivated once she is back to work.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Dave&lt;/strong&gt; indulges with more people outside the work who are in a similar field and tries to seek help by discussing the situation.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;John,&lt;/strong&gt; on the other hand, tries to discuss the situation with his team and tries to understand the problem better from his current team.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Laura&lt;/strong&gt; escapes from all distractions, gets herself a silent corner, and thinks about the situation.&lt;/p&gt;

&lt;p&gt;Every working professional suffers from burning out from time to time. The key is how to cope. People adopted multiple coping strategies to avoid burnout. The above examples depict the coping strategies of each individual.&lt;/p&gt;

&lt;p&gt;According to an article published in Gallup’s on &lt;a href="https://www.gallup.com/cliftonstrengths/en/472067/fighting-burnout-strengths.aspx"&gt;Fighting Burnout with Strengths&lt;/a&gt;: People have different types of coping strategies when it comes to dealing with burnout. A survey was conducted on 3000 such employees to figure out their coping strategies. These coping strategies were categorized into 4 themes, also known as CliftonStrengths:&lt;/p&gt;

&lt;h4&gt;
  
  
  Executing Theme:
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;In order to cope with burnout or frustration, People tend to return to work as quickly as possible or do some physical activity (exercise). Anything that could give them a sense of accomplishment. People in this category take immense satisfaction in being busy or productive.&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  Influencing Theme:
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;People who tend to spend more time with their family or friends outside of work or talk about their work with them to seek help on how their work can contribute to their future goals. People with dominating influencing themes also try to speak up for others and make sure they are heard. Talking more about the future gives them a sense of a bright future and they tend to make a bright future their strength and work towards that.&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  Relationship-Building Theme:
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;People with dominating Relationship-building themes show awareness of how involving others can create good relationships among team members. These people try to take some time to think about how others will feel at the same time. They take pride in including more people in the conversation.&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  Strategic Thinking Theme:
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;Strategic thinkers tend to allow themselves the space to think through their frustration when burned out. They are more likely than others to stop and take time to think through their situation or take more breaks during the workday to relax.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Which coping strategy is suitable for personal growth?
&lt;/h3&gt;

&lt;p&gt;No wonder people have various coping strategies. However, as per another research, there were a few more interesting facts:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The most common coping strategies were not most effective for them, and still, people preferred to stick with these ineffective approaches.&lt;/li&gt;
&lt;li&gt;This becomes more interesting with the fact that people were aware of the “not so effective” nature of the approach and yet they went ahead with that.&lt;/li&gt;
&lt;li&gt;The same person was not choosing the same theme for all the situations. At multiple times, they tend to choose 1 strength in 4 themes.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Now, if you look closely at the survey result below, you will find no matter what the coping whim of each theme, but people always tend to do one common thing “Stop and take time to think through their situation”.&lt;/p&gt;

&lt;p&gt;Hence, There are multiple techniques to cope with the burnout. You just need to follow one of the strategies to overcome. There is no good or bad theme, and the choice does not reflect the personality of a person. So, next time whenever you are having a burnout attack, take your time and go for any of the strategies that you feel is right and viable option.&lt;/p&gt;

&lt;h3&gt;
  
  
  Conclusion
&lt;/h3&gt;

&lt;p&gt;So, when was the last time, you considered thinking about the burnout you are having? If you are reading this blog then you are planning something to overcome this issue or you are on your path for personal growth. I have curated a &lt;a href="https://singlequote.blog/be-5-times-more-productive-stepwise-guide/"&gt;handmade plan for personal development and time management&lt;/a&gt;. This will help you create a plan and analyze the issues with your daily schedule.&lt;/p&gt;

&lt;p&gt;An important point — The above plan is not a silver bullet that can resolve everything. It needs your full attention. A line from the song &lt;a href="https://genius.com/Sons-of-the-east-nothing-comes-easy-lyrics"&gt;Nothing comes easy&lt;/a&gt; rightly describes it&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;“And nothing comes easy, no nothing at all. But if we believe it, we’re a hundred foot tall”&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Sons of the East&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;[AUTHOR’S CORNER]&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I &lt;em&gt;think, I am more of an “Influencing Theme” person, and most of the time, I tend to discuss the situation with a person outside the work to get an unbiased view, quite a few times, I am also an “executing theme” person as I like going for the gym or for a run during such situations.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Few bonus articles to read:&lt;/em&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="http://no-nonsense%20guide%20to%20measuring%20productivity/"&gt;&lt;em&gt;No-Nonsense Guide to Measuring Productivity&lt;/em&gt;&lt;/a&gt; &lt;em&gt;by&lt;/em&gt; &lt;a href="https://hbr.org/1988/01/no-nonsense-guide-to-measuring-productivity"&gt;&lt;em&gt;Harward Business Review&lt;/em&gt;&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.simplypsychology.org/maslow.html"&gt;&lt;em&gt;Maslow’s Hierarchy of needs&lt;/em&gt;&lt;/a&gt; &lt;em&gt;is one of the best models for understanding personal development and growth.&lt;/em&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Courtesy&lt;/strong&gt; : &lt;a href="https://www.gallup.com/cliftonstrengths/en/472067/fighting-burnout-strengths.aspx"&gt;Gallup.com&lt;/a&gt; for survey results, videos, and text suggestions.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Originally published at&lt;/em&gt; &lt;a href="https://singlequote.blog/personal-growth-journey-from-burnout-to-breakthrough/"&gt;&lt;em&gt;https://singlequote.blog&lt;/em&gt;&lt;/a&gt; &lt;em&gt;on September 1, 2023.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>motivation</category>
      <category>personalgrowth</category>
      <category>burnout</category>
      <category>successfulpeople</category>
    </item>
    <item>
      <title>Be 5 times more Productive: Stepwise Guide &amp; Tips — Single Quote</title>
      <dc:creator>Ashish Mishra</dc:creator>
      <pubDate>Sat, 20 May 2023 13:43:54 +0000</pubDate>
      <link>https://dev.to/arglee/be-5-times-more-productive-stepwise-guide-tips-single-quote-1302</link>
      <guid>https://dev.to/arglee/be-5-times-more-productive-stepwise-guide-tips-single-quote-1302</guid>
      <description>&lt;h3&gt;
  
  
  Be 5 times more Productive: Stepwise Guide &amp;amp; Tips — Single Quote
&lt;/h3&gt;

&lt;p&gt;The project delivery deadline is a few days away and you are racing against time. Each and every second has become highly valuable. During these overwhelming times, we often ask ourselves:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How can I deliver more in less time? What can I do to improve my productivity at work? How can I improve my decision-making power?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--eI9xc4eZ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn-images-1.medium.com/max/1024/0%2AGp-k5JUcW96Ypwzb" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--eI9xc4eZ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn-images-1.medium.com/max/1024/0%2AGp-k5JUcW96Ypwzb" alt="" width="800" height="534"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Photo by Jo Szczepanska on Unsplash&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Don’t we…?&lt;/p&gt;

&lt;p&gt;What if I say, This is possible and I have a few productivity tips and answers to all the above questions. A very simple 4-step exercise can help you to become at least 5 times more productive. But in order to achieve this I need your full attention for 10 days while we are doing this exercise.&lt;/p&gt;

&lt;h3&gt;
  
  
  How has this productivity tip helped me?
&lt;/h3&gt;

&lt;p&gt;I have been practicing this exercise for last past couple of years. This helped me systematically design my life to give me almost desired productivity without impacting the balance between my personal and professional life.&lt;/p&gt;

&lt;p&gt;Prior to this exercise, very often I used to feel overwhelmed with work. This often forced me to skip lunch or not give enough time to my family or friends and even lead to sleep deprivation. During that time, I knew, that if I want to spend my life with satisfaction and peace, then somehow I need to manage things without falling into a pit of these unhealthy habits.&lt;/p&gt;

&lt;p&gt;I started doing research, and unsurprisingly, there is a common name for such a situation: “ &lt;strong&gt;Urgency Trap&lt;/strong&gt;  “.&lt;/p&gt;

&lt;h3&gt;
  
  
  How this productivity tip can help you?
&lt;/h3&gt;

&lt;p&gt;Very often we are overwhelmed with work, and new work already becomes high priority task even before we could finish the last one. This is called the “Urgency Trap” and this creates huge problems in our decision-making in day-to-day life.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;&lt;em&gt;Urgency Trap&lt;/em&gt;&lt;/strong&gt; &lt;em&gt;is a paradox because it limits the very thing that could help us be more innovative, efficient, and effective:&lt;/em&gt; &lt;strong&gt;Our critical thinking&lt;/strong&gt; &lt;em&gt;.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.harvardbusiness.org/to-improve-critical-thinking-dont-fall-into-the-urgency-trap/"&gt;&lt;em&gt;Harward Business Review&lt;/em&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Thus, the target for this exercise is to keep yourself free from this “Urgency Trap”.&lt;/p&gt;

&lt;p&gt;Now a bit of back story about this exercise. This exercise is originally based on Eisenhower’s Method of decision-making. I have made a few modifications to the original Eisenhower method to make it more user-friendly and easy to use. Let’s dive deep into the stepwise process.&lt;/p&gt;

&lt;h3&gt;
  
  
  Stepwise Guide/Tips to improve productivity
&lt;/h3&gt;

&lt;h3&gt;
  
  
  Step 1: Download the Eisenhower Matrix Excel Template
&lt;/h3&gt;

&lt;p&gt;On the internet, there are multiple Excel templates available. We will discuss a few of them which I find good. Both of the templates mentioned below are compatible with Microsoft Excel and Google Sheets. Gumroad SingleQuote Excel Template is cheaper:&lt;/p&gt;

&lt;p&gt;Once you click on the above link you will land on the Gumroad screen which will look something like the image below. At the bottom right, fill amount in the price box and click on “I want this”. Once done you can download the Excel template.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 2: Explore Excel/Google Sheet Productivity Template
&lt;/h3&gt;

&lt;p&gt;Double-click on the downloaded Excel sheet to open it in &lt;a href="https://www.microsoft.com/en-us/microsoft-365/excel"&gt;Microsoft Excel&lt;/a&gt; or you can also open this in &lt;a href="https://sheets.google.com/"&gt;Google Sheets&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;To open this in Google Sheets, open a new sheet and click &lt;strong&gt;&lt;em&gt;File&lt;/em&gt;&lt;/strong&gt; and then &lt;strong&gt;&lt;em&gt;Open&lt;/em&gt;&lt;/strong&gt; to import it from local.&lt;/p&gt;

&lt;p&gt;Once opened, at the bottom of the sheet, you will find multiple tabs as shown in the image below.&lt;/p&gt;

&lt;p&gt;Every tab represents something, Let’s find out how these tabs will be used in this exercise.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Instructions:&lt;/strong&gt; The instruction tab explains in brief how to use the template.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example Day:&lt;/strong&gt; Example day is useful if you are a first-time user of this template. This can help you categorize your tasks with some examples. Example days will help you in 2 ways:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Day 1 — Day 10:&lt;/strong&gt; This is where you need to fill in your daily activities during the 10-day exercise. You need to fill in what have you done every half an hour.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;30 mins window might seem very aggressive initially, but there is a reason for this. Originally, I started with the 1-hour window, but later I realized if I have done something productive for 40–45 mins and have not done something important/productive for the next 15–20 mins then it becomes difficult to track that time, and these multiple 15–20 mins windows can consume more than 1.5–2.0 hrs throughout the day.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Analysis:&lt;/strong&gt; Once you click there you will find a graph. This graph shows time spent on urgent/important(Quadrant 1) of Eisenhower Matrix available on tasks per day over the 10-day period.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;As per Eisenhower Matrix, our day-to-day activities should fall under Quadrant 1 and prioritization of tasks must be smart enough. But as a newbie to this we can fall into a trap where we think everything is important and this exercise will help you avoid exactly that.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The analysis tab will provide you details over time, that how much time are you spending on the urgent+important tasks. The target is to increase this percentage number over the exercise and if you feel that this number is not increasing then go back to the tasks of the last day and see what all the tasks have not helped you complete something of utmost importance as stated above.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 3: Let’s start with day one
&lt;/h3&gt;

&lt;p&gt;By now, we understood how and what this exercise is about. Before we start with day 1 there are a few prerequisites.&lt;/p&gt;

&lt;h4&gt;
  
  
  Step 3.1: Decide your productive hours in the day
&lt;/h4&gt;

&lt;p&gt;Decide what are the hours in a day you want to be productive. We are not robots to track each and every moment of the day as this could be overwhelming and we do not want to fall into the &lt;a href="https://singlequote.blog/be-productive-by-avoiding-the-urgency-trap/"&gt;urgency trap&lt;/a&gt; of adding tasks while we are avoiding it.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Tip:&lt;/strong&gt; Most of the people, I have researched with on this template. They mentioned that they started their working hours around 1 hr before the actual office hour and 1 hr after the working hour. Yours could be different.&lt;/p&gt;

&lt;h4&gt;
  
  
  Step 3.2: Start adding your tasks
&lt;/h4&gt;

&lt;p&gt;Now, you are ready with the task addition. Your template will look something like below. By the end of every 30 mins, add how you spent your last 30 mins by choosing the options available. Let’s discuss what each option stands for and how to use them:&lt;/p&gt;

&lt;p&gt;There are 6 columns in the sheet:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Time Slot Column:&lt;/strong&gt; Very obvious, nothing to explain here. Time slots are already part of the defined template. No user intervention is required at this point.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Task Column:&lt;/strong&gt; A brief description of the task. This should be detailed enough so you can identify it later and brief enough that it is not taking much time to add.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Urgent Column:&lt;/strong&gt; If the task falls into urgent criteria then mark it “Y” else mark it “N”. This is an important column and all the tasks can not be urgent. Choose it wisely or &lt;a href="https://singlequote.blog/eisenhower-method-to-dodge-all-the-blues/(opens%20in%20a%20new%20tab)"&gt;refer to this document to help you guide how to choose urgent/ important or non-important tasks&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Important Column:&lt;/strong&gt; If you think that the task you just completed was important then mark it “Y” else mark it “N”.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;WH Column:&lt;/strong&gt; This stands for “Working Hours”. There are 3 options for this “Work”, “Meeting” and “Learnings”. This will help you understand how are you spending your day.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;NWH Column:&lt;/strong&gt; This stands for “Non-Working hours”. if this task was not related to work or office then mark “Y”. For example. “Call MOM” or “Gym” falls under NWH.&lt;/p&gt;

&lt;h4&gt;
  
  
  Step 3.3: End your day
&lt;/h4&gt;

&lt;p&gt;At the end of the day, there are 3 things that you need to take care of:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Observe how you spent your time (in minutes) on some productive work vs meetings vs learning. Refer to the image below.&lt;/li&gt;
&lt;li&gt;On the basis of tasks and time division between work/meeting or learnings, add details on “According to you how was your day? Productive/Not-Productive/Average.”&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Also, at the end of the day, it will automatically create an Enisehhower Matrix to help you guide where you spent your time in all 4 quadrants. This is the time when you need a few minutes to analyze if you are not spending a lot of time in &lt;strong&gt;Quadrant 1&lt;/strong&gt; which is the &lt;strong&gt;left-top box&lt;/strong&gt; then there is an issue with your prioritization.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 4: Start your next day
&lt;/h3&gt;

&lt;p&gt;Next day before starting the day, go to the “Analysis” tab and check how much time you spent on the Quadrant 1(Urgent+Important) task yesterday. The target should be to avoid activities or tasks that were not falling into Quadrant 1 or at least Quadrant 2.&lt;/p&gt;

&lt;p&gt;During this exercise, once we are done with tasks, then we will retrospect if this was really an urgent task and if you would have skipped it, then would it have impacted anything? or can it be delegated to someone else in the team? or can this be moved to some other time in future?&lt;/p&gt;

&lt;p&gt;We are required to ask these questions to ourselves.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://singlequote.blog/eisenhower-method-to-dodge-all-the-blues/"&gt;You can read more about the Quadrants of Eisenhower Matrix and what task to put into what quadrant.&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;With this in mind, check your calendar and remove or move such meetings or tasks from your tasks list.&lt;/p&gt;

&lt;p&gt;At the end of the 10th day, if you are dedicatedly working with the template, then you will find that you have a pattern figured out like what kind of tasks or meetings are consuming your time and how they can be avoided.&lt;/p&gt;

&lt;h3&gt;
  
  
  Productivity Tips: What’s next, once you are done with Excercise?
&lt;/h3&gt;

&lt;p&gt;The above productivity tip is not a silver bullet. If you think that once you are done with this 10-day exercise it will resolve all your problems and you will not have to do anything in the future. Then, my friend, You are mistaken, at different points in time, our responsibilities at the workplace keep on changing.&lt;/p&gt;

&lt;p&gt;So, we are required to repeat this 10 days exercise every year or a few months or whenever we feel like we are losing control of our time and we need to go back to our schedule where we can achieve more in less time.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Quick Tip:&lt;/strong&gt; If you are not using Excel on your Desktop, and you are using a browser for this sheet then use the browser which you do not use for your work. This will help you quickly find the browser using CMD+tab and will save time while entering task details. For example, if you are using Chrome for your official work on Macbook then you can use &lt;a href="https://www.apple.com/in/safari/"&gt;Safari&lt;/a&gt; for the sheet.&lt;/p&gt;

&lt;p&gt;If you find this exercise helpful then motivate me to write more such posts for you. Share this with your friends, family, and colleagues to help them be more productive in life.&lt;/p&gt;

&lt;p&gt;Ciao…&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;[Author’s Corner]&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;The 4×4 Matrix we used in our exercise is also known as the “Eisenhower Matrix”.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;34th President of the United States&lt;/em&gt; &lt;a href="https://singlequote.blog/you-like-ike-i-like-ike-everybody-likes-ike-president-eisenhower/"&gt;&lt;strong&gt;&lt;em&gt;Dwight D. Eisenhower&lt;/em&gt;&lt;/strong&gt;&lt;/a&gt; &lt;em&gt;conceptualized Eisenhower Matrix or Eisenhower Decision Matrix during one of his speeches and then decades later, author Stephan Covey created a framework and popularized this framework in his book&lt;/em&gt; &lt;a href="https://en.wikipedia.org/wiki/The_7_Habits_of_Highly_Effective_People"&gt;&lt;em&gt;The 7 Habits of Highly Effective People&lt;/em&gt;&lt;/a&gt;&lt;em&gt;.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;That is the reason it is also popularized with the name “&lt;/em&gt; &lt;strong&gt;&lt;em&gt;Covey Eisenhower Matrix&lt;/em&gt;&lt;/strong&gt; &lt;em&gt;” or sometimes just the “&lt;/em&gt; &lt;strong&gt;&lt;em&gt;Covey Matrix&lt;/em&gt;&lt;/strong&gt; _ “._&lt;/p&gt;

&lt;p&gt;&lt;em&gt;So, now from now on, if anyone asks these questions to you- “Can the Eisenhower method help me improve my productivity? What is the right way to use the Eisenhower Matrix? or How can we use Eisenhower Matrix in the most optimized way to improve my decision-making power?”&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;You can share these productivity tips with them to help them achieve good things in life.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Originally published at&lt;/em&gt; &lt;a href="https://singlequote.blog/be-5-times-more-productive-stepwise-guide/"&gt;&lt;em&gt;https://singlequote.blog&lt;/em&gt;&lt;/a&gt; &lt;em&gt;on May 20, 2023.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>productivitytools</category>
      <category>eisenhowermatrix</category>
      <category>productivitytips</category>
      <category>productivityhacks</category>
    </item>
    <item>
      <title>You like Ike, I like Ike, everybody likes Ike</title>
      <dc:creator>Ashish Mishra</dc:creator>
      <pubDate>Mon, 01 May 2023 18:54:51 +0000</pubDate>
      <link>https://dev.to/arglee/you-like-ike-i-like-ike-everybody-likes-ike-2igp</link>
      <guid>https://dev.to/arglee/you-like-ike-i-like-ike-everybody-likes-ike-2igp</guid>
      <description>&lt;p&gt;Bit of an unusual title for a blog? True, Now for some context — &lt;a href="https://www.youtube.com/watch?v=YP7WaUPACuY"&gt;watch this short clip&lt;/a&gt; shared by New York Historical Society and come back. This was a political public announcement of President Eisenhower ( &lt;a href="https://www.whitehouse.gov/about-the-white-house/presidents/dwight-d-eisenhower/"&gt;Dwight David Eisenhower&lt;/a&gt;) during his 34th presidential campaign.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--j-EaeO3u--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn-images-1.medium.com/max/1024/1%2AMu8bJA9WIHvPrcuT1EbRxA.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--j-EaeO3u--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn-images-1.medium.com/max/1024/1%2AMu8bJA9WIHvPrcuT1EbRxA.jpeg" alt="" width="800" height="380"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;As per the sources on the Internet, between the years 1892–1909, in Kansas, when Dwight and his elder brother were in school, Dwight’s older brother was nicknamed “Big Ike” and he became “Little Ike”. This nickname followed him to West Point to the United States Military Academy where “little” was dropped and this followed him till his time to the presidency of the United States from &lt;em&gt;January 20, 1953-January 20, 1961&lt;/em&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  A quick glance at President Eisenhower’s achievements
&lt;/h3&gt;

&lt;p&gt;During his two terms as president, he led many important contributions like the construction of interstate highway System, creating NASA, bringing armistice to Korean War; promoting Atoms for Peace; dealing with crises in Lebanon, Suez, Berlin, and Hungary, establishing the U.S. Information Agency, welcomed Alaska and Hawaii into the union and managed to keep the cold war with Russia cold.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--162eMS49--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn-images-1.medium.com/max/400/1%2AT0PnMWOJiG9YXa2MyXDMtw.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--162eMS49--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn-images-1.medium.com/max/400/1%2AT0PnMWOJiG9YXa2MyXDMtw.jpeg" alt="" width="400" height="400"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Dwight D. Eisenhower. Image Courtesy: whitehouse.gov&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Before becoming President, he served as a general in the United States Army and as the Allied Forces Supreme Commander during World War II. He also later became NATO’s first supreme commander.&lt;/p&gt;

&lt;p&gt;Amazed! Yes? I was too when I first read about &lt;strong&gt;President Eisenhower’s accomplishments&lt;/strong&gt; during one of my research.&lt;/p&gt;

&lt;p&gt;You can read more about President Eisenhower at &lt;a href="https://www.eisenhowerlibrary.gov/eisenhowers"&gt;Eisenhower library&lt;/a&gt; If you wish to know more about his life.&lt;/p&gt;

&lt;h3&gt;
  
  
  How President Eisenhower was able to achieve this much in his lifetime?
&lt;/h3&gt;

&lt;p&gt;Thanks to social media, very often we hear about so many notorious personalities like President Dwight. We hear they have accomplished so many things. Achieving in their lifetime which will not be possible for any of us to even imagine.&lt;/p&gt;

&lt;p&gt;Have you ever wondered how some of these legends were able to knot their life in such a poetic manner. What these guys were doing that others were not?&lt;/p&gt;

&lt;p&gt;All of us have the same 24 hours in a day, yet only a few have done so much. How many times, has it happened to you when you have spent all of your time managing crises or fires and at the end of the day, you feel completely drained and yet have nothing to find of real significance.&lt;/p&gt;

&lt;p&gt;President Eisenhower during one of the speeches stated:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;&lt;em&gt;What is important is seldom urgent and what is urgent is seldom important.&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;- Dwight D. Eisenhower&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;I find this particular line left a deep impact on me, and this may be the difference between people like President Dwight and people like us.&lt;/p&gt;

&lt;p&gt;Very often, I find myself questioning where my priority lies in any given situation? If there are multiple crises — then everything is important and during such time how to prioritize and plan for long goals to achieve the most? Yes, this is a tricky problem. Let us now see what President Eisenhower has to say about this:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;&lt;em&gt;Who can define for us with accuracy the difference between the long and short term! Especially whenever our affairs seem to be in crisis, we are almost compelled to give our first attention to the urgent present rather than to the important future.&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;- Dwight D. Eisenhower, 1961 address to the Century Association&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;To make it more clear, President Eisenhower explained that it is imminent to see what is urgent now or what can be pushed to later. Basically trick lies in finding what is most beneficial for the future time.&lt;/p&gt;

&lt;p&gt;Today, we know that theory as the “&lt;a href="https://singlequote.blog/eisenhower-method-to-dodge-all-the-blues/"&gt;&lt;strong&gt;Eisenhower Matrix&lt;/strong&gt;&lt;/a&gt;” or “&lt;a href="https://singlequote.blog/eisenhower-method-to-dodge-all-the-blues/"&gt;&lt;strong&gt;Eisenhower Method&lt;/strong&gt;&lt;/a&gt;” of time management.&lt;/p&gt;

&lt;p&gt;Per President Dwight, this theory helped him prioritize and deal with many high-stake crises he faced as US Army General, as President of the United States, and eventually, as Supreme Allied Commander of NATO Forces.&lt;/p&gt;

&lt;p&gt;Though President Eisenhower has only conceptualized this. Decades later, author Stephan Covey created a framework and popularized it in his book &lt;a href="https://en.wikipedia.org/wiki/The_7_Habits_of_Highly_Effective_People"&gt;The 7 Habits of Highly Effective People&lt;/a&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  What we can do to align our time with important things?
&lt;/h3&gt;

&lt;p&gt;I know what you are thinking “This is straightforward and someone else can not categorize this for me”.&lt;/p&gt;

&lt;p&gt;And Yes, you are absolutely correct. A person himself/herself needs to measure what is important to them using the framework. We will discuss this framework in the later part of the blog.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://singlequote.blog/be-5-times-more-productive-stepwise-guide/"&gt;How to use Eisenhower Matrix to measure and improve productivity&lt;/a&gt; — can help you design your Day in the most productive way. I have tried to simplify the above concepts and created a template in the most easy-to-understand and use format.&lt;/p&gt;

&lt;p&gt;This is a 10-day exercise where you add your activities every hour during your work day or for the time you want to be optimized. With this activity, you may also analyze your daily tasks. For example — if this was really a meeting or task that needed your time OR if could it be done without your presence?&lt;/p&gt;

&lt;p&gt;Thus, categorizing and prioritizing your tasks accordingly. At the end of the day check the pattern of your most productive tasks along with the least ones, trying to enhance the former and fade out on the latter.&lt;/p&gt;

&lt;p&gt;At the end of the few days(around the 5th day), you will start seeing an impact where you will start to get more time for tasks of real significance.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://singlequote.blog/eisenhower-method-to-dodge-all-the-blues/"&gt;Eisenhower Method to avoid/dodge ‘Monday Blues’&lt;/a&gt; — can help you categorize the task on the right quadrant of the Eisenhower Matrix.&lt;/p&gt;

&lt;p&gt;If you wish to know more about the Eisenhower matrix and how can we use it in the most optimized way then you can check out this page for the — &lt;a href="https://singlequote.blog/be-5-times-more-productive-stepwise-guide/"&gt;stepwise process to use Eisenhower and improve productivity&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;If you love to work on Excel and it is your bread and butter then this — &lt;a href="https://arglee.gumroad.com/l/EisenhowerMatrixExcelTemplate"&gt;Excel template for the Eisenhower Matrix&lt;/a&gt; is nothing less than a treat for you. This Excel template not only lets you add your hourly tasks but also gives you a graphical presentation of your tasks. Read more about it &lt;a href="https://singlequote.blog/be-5-times-more-productive-stepwise-guide/"&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Originally published at&lt;/em&gt; &lt;a href="https://singlequote.blog/you-like-ike-i-like-ike-everybody-likes-ike-president-eisenhower/"&gt;&lt;em&gt;https://singlequote.blog&lt;/em&gt;&lt;/a&gt; &lt;em&gt;on May 1, 2023.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>eisenhower</category>
      <category>eisenhowermatrix</category>
      <category>productivityhacks</category>
      <category>productivity</category>
    </item>
    <item>
      <title>Python Dynamic Configuration — Python-Trick</title>
      <dc:creator>Ashish Mishra</dc:creator>
      <pubDate>Tue, 04 Apr 2023 07:19:08 +0000</pubDate>
      <link>https://dev.to/arglee/python-dynamic-configuration-python-trick-2hm7</link>
      <guid>https://dev.to/arglee/python-dynamic-configuration-python-trick-2hm7</guid>
      <description>&lt;h3&gt;
  
  
  Python Dynamic Configuration — Python-Trick
&lt;/h3&gt;

&lt;p&gt;In this blog, we will discuss one easy-to-use python trick that could be very handy for a quick program or repository you are creating for your individual project or for your organization.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--C5yp-gp1--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn-images-1.medium.com/max/1024/0%2AJA6uvyFyidZaYk1w" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--C5yp-gp1--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn-images-1.medium.com/max/1024/0%2AJA6uvyFyidZaYk1w" alt="" width="800" height="534"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Photo by Jantine Doornbos on Unsplash&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;I am sure you are already aware of the importance of configuration files in any programming language. Managing configuration files is the most important part of any software development process.&lt;/p&gt;

&lt;p&gt;In order to understand this, we will first discuss the traditional approach and then we will discuss how a small class in python can help you avoid multiple iterations in your config file.&lt;/p&gt;
&lt;h3&gt;
  
  
  Traditional Approach
&lt;/h3&gt;

&lt;p&gt;In order to make both approaches more intelligible, we will take an example code and will implement both approaches to see the impact of the trick.&lt;/p&gt;

&lt;p&gt;Let’s create a folder configuration and add these 2 files inside it.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--_DnEbUIj--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn-images-1.medium.com/max/534/0%2Aq_CHkvYAzmfWN3Hm.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--_DnEbUIj--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn-images-1.medium.com/max/534/0%2Aq_CHkvYAzmfWN3Hm.png" alt="" width="534" height="216"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;settings.ini&lt;/em&gt;&lt;/strong&gt; file looks something like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;[RUN]
num_cores = 2
num_files = -1
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now to parse the configuration, we use another file. let’s say config.py&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import os
import configparser

parser = configparser.ConfigParser()
parser.read_file(open(os.path.join(os.path.dirname(os.path.abspath( __file__ )), "settings.ini")))

NUM_CORES = parser.get('RUN','num_cores')

print ("Number of cores available : ", parser.get('RUN','num_cores'))
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The output of the above script will look something like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;➜ configuration python config.py
Number of cores available : 2
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This is straightforward and easy, now every time, we want to add a new config, there is an easy way just to add a new variable and use that inside code. so, let’s consider now we also want the value of &lt;em&gt;NUM_FILES&lt;/em&gt; in the code, then new code will look something like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import os
import configparser

parser = configparser.ConfigParser()
parser.read_file(open(os.path.join(os.path.dirname(os.path.abspath( __file__ )), "settings.ini")))

NUM_CORES = parser.get('RUN','num_cores')
NUM_FILES = parser.get('RUN','num_files')

print ("Number of cores available : ", parser.get('RUN','num_cores'))
print ("Number of cores available : ", parser.get('RUN','num_files'))
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;and now the NUM_FILES variable can be used across your project to get the value of this variable.&lt;/p&gt;

&lt;p&gt;But how many times has this happened to you that you have to add these same lines every time you want to add a new variable, you would agree that this could be painful sometimes and it could halt your train of thought.&lt;/p&gt;

&lt;h3&gt;
  
  
  Dynamic configuration:
&lt;/h3&gt;

&lt;p&gt;What if I tell you there is an easy way out and you can initialize the whole .ini file dynamically and there is no need to parse every variable explicitly.&lt;/p&gt;

&lt;p&gt;Now, in order to do that, I have added a new file &lt;strong&gt;dynamic_config_parser.py&lt;/strong&gt; and its content will look something like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import configparser

class DynamicConfig:
    def __init__ (self, conf):
        if not isinstance(conf, dict):
            raise TypeError(f'dict expected, found {type(conf). __name__ }')

        self._raw = conf
        for key, value in self._raw.items():
            setattr(self, key, value)

class DynamicConfigInit:
    """
    This class is used to dynamically load static variables from the settings.ini file. Any va
    variable declared in the settings.ini can be parsed directly.
    """
    def __init__ (self, conf):
        if not isinstance(conf, configparser.ConfigParser):
            raise TypeError(f'ConfigParser expected, found {type(conf). __name__ }')

        self._raw = conf
        for key, value in self._raw.items():
            setattr(self, key, DynamicConfig(dict(value.items())))
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;and now your &lt;strong&gt;config.py&lt;/strong&gt; will look something like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import os
import configparser
from dynamic_config_parser import DynamicConfigInit

parser = configparser.ConfigParser()
parser.read_file(open(os.path.join(os.path.dirname(os.path.abspath( __file__ )), "settings.ini")))
STATIC_CONFIG = DynamicConfigInit(parser)

print("Number of cores from dynamic config: ", STATIC_CONFIG.RUN.num_cores)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Viola! That’s it. We are done.&lt;/p&gt;

&lt;p&gt;As you see, now there is no requirement to add every variable every time into config.py, and dynamic config initialization is handling this for you and you can save a long repetitive file with a huge configuration.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Originally published at&lt;/em&gt; &lt;a href="https://singlequote.blog/python-dynamic-configuration/"&gt;&lt;em&gt;https://singlequote.blog&lt;/em&gt;&lt;/a&gt; &lt;em&gt;on April 4, 2023.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>pythonwebdeveloper</category>
      <category>pythontricks</category>
      <category>pythonscripting</category>
      <category>pythonsetup</category>
    </item>
    <item>
      <title>Continuous Data Load from S3 to Snowflake(Snowpipe): Stepwise Process, Benchmarks &amp; Cost</title>
      <dc:creator>Ashish Mishra</dc:creator>
      <pubDate>Tue, 21 Feb 2023 02:02:44 +0000</pubDate>
      <link>https://dev.to/arglee/continuous-data-load-from-s3-to-snowflakesnowpipe-stepwise-process-benchmarks-cost-2fb8</link>
      <guid>https://dev.to/arglee/continuous-data-load-from-s3-to-snowflakesnowpipe-stepwise-process-benchmarks-cost-2fb8</guid>
      <description>&lt;p&gt;What is continuous data load in Snowflake? What are the ways to achieve the continuous data load in snowflake? What are the cost and benchmarks for the solution? What are the ways to reduce the significant cost of continuous data load to snowflake? and last but not least what are the limitations of the solution?&lt;/p&gt;

&lt;p&gt;We will discuss each of these questions in this blog.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--GcQh6Mwi--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn-images-1.medium.com/max/1024/0%2AyxhcVaB-42xGEkAE" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--GcQh6Mwi--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn-images-1.medium.com/max/1024/0%2AyxhcVaB-42xGEkAE" alt="" width="800" height="600"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Photo by Aaron Burden on Unsplash&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://singlequote.blog/bulk-data-load-from-s3-to-snowflake-stepwise-process-benchmarks-cost/"&gt;In the last post on bulk data load&lt;/a&gt;(&lt;a href="https://arglee.medium.com/bulk-data-load-from-s3-to-snowflake-stepwise-process-benchmarks-cost-2bbb77b16ac7"&gt;medium link&lt;/a&gt;), we discussed 2 things:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;How to load bulk data (micro-batches) having a high frequency, on snowflake using copy command?&lt;/li&gt;
&lt;li&gt;What will be the cost for the solution if the frequency is higher?&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Please go through the last post &lt;a href="https://singlequote.blog/bulk-data-load-from-s3-to-snowflake-stepwise-process-benchmarks-cost/"&gt;here&lt;/a&gt;, If you are reading my article for the first time. It will help you to create an understanding of how AWS and Snowflake create handshake to share data between the 2 technologies.&lt;/p&gt;
&lt;h3&gt;
  
  
  What is Continuous Data Load in Snowflake?
&lt;/h3&gt;

&lt;p&gt;Snowflake provides a serverless solution, where files coming on the Object Storage(like S3 in this case) will be loaded on Snowflake table without using any external resource and Snowflake will charge for compute usage while data loading.&lt;/p&gt;

&lt;p&gt;Continuous data load can be achieved by Snowflake using these different ways:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Snowpipe:&lt;/strong&gt; Easiest and one of the most popular solutions as it requires the least effort and is categorized as a zero code solution.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Kafka Connector for Snowflake:&lt;/strong&gt; Reads data from Apache Kafka topics and loads the data into a Snowflake.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Third-Party Data Integration Tools:&lt;/strong&gt; &lt;a href="https://docs.snowflake.com/en/user-guide/ecosystem-etl.html"&gt;Read more about these integrations on Snowflake official website&lt;/a&gt; about existing and new integrations.&lt;/li&gt;
&lt;/ol&gt;
&lt;h3&gt;
  
  
  How Does Snowpipe Work?
&lt;/h3&gt;

&lt;p&gt;Snowpipe loads data from files as soon as data or files are available in the stage and runs a copy statement to load the data into the Snowflake. But how does Snowflake knows that there are new staged files available?&lt;/p&gt;

&lt;p&gt;There are 2 ways for detecting staged files:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Event Notification from S3 bucket. &lt;a href="https://singlequote.blog/listing-billion-number-of-s3-objects-into-sqs-challenges-benchmarks/#Challenges_with_the_Process"&gt;Read more about s3 event notification and cost of the process here&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;Calling Snowpipe REST endpoints.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;In this blog, we will discuss around the first point, where we will utilize the event notification from cloud storage (S3 in this case) to automate the continuous data load using Snowpipe. At the end of this blog, we will also discuss which solution should be preferred for high-frequency data and which solution is cost-effective.&lt;/p&gt;
&lt;h3&gt;
  
  
  What are the Steps to load Continous Data using Snowpipe?
&lt;/h3&gt;

&lt;p&gt;Continuous data load in Snowflake using Snowpipe is a 5 step process.&lt;/p&gt;

&lt;p&gt;Few of the initial steps to configure the access permission are similar to the &lt;a href="https://arglee.medium.com/bulk-data-load-from-s3-to-snowflake-stepwise-process-benchmarks-cost-2bbb77b16ac7"&gt;Bulk load data using Copy Command&lt;/a&gt;. In this blog, we will refer few of the previous post links to keep this blog precise.&lt;/p&gt;
&lt;h3&gt;
  
  
  Step 1: Create Storage Integration &amp;amp; Access Permissions
&lt;/h3&gt;

&lt;p&gt;Refer to &lt;a href="https://arglee.medium.com/bulk-data-load-from-s3-to-snowflake-stepwise-process-benchmarks-cost-2bbb77b16ac7"&gt;step 2 in this document&lt;/a&gt; (&lt;a href="https://arglee.medium.com/bulk-data-load-from-s3-to-snowflake-stepwise-process-benchmarks-cost-2bbb77b16ac7"&gt;Medium Link&lt;/a&gt;) for storage integration.&lt;/p&gt;
&lt;h3&gt;
  
  
  Step 2: Create Stage Objects
&lt;/h3&gt;

&lt;p&gt;Refer to &lt;a href="https://arglee.medium.com/bulk-data-load-from-s3-to-snowflake-stepwise-process-benchmarks-cost-2bbb77b16ac7"&gt;step 3 in this document&lt;/a&gt; (&lt;a href="https://arglee.medium.com/bulk-data-load-from-s3-to-snowflake-stepwise-process-benchmarks-cost-2bbb77b16ac7"&gt;Medium Link&lt;/a&gt;) for stage objects.&lt;/p&gt;
&lt;h3&gt;
  
  
  Step 3: Create a Pipe with Auto-Ingest Enabled
&lt;/h3&gt;

&lt;p&gt;The pipe uses the &lt;a href="https://arglee.medium.com/bulk-data-load-from-s3-to-snowflake-stepwise-process-benchmarks-cost-2bbb77b16ac7"&gt;COPY INTO &lt;/a&gt;&lt;/p&gt;
&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt; command internally to load data in an automatic fashion whenever a new notification for file ingestion gets received.&lt;br&gt;

&lt;pre class="highlight plaintext"&gt;&lt;code&gt;create pipe mypipe auto_ingest=true as
  copy into production_object_storage
  from @my_csv_stage
  file_format = (type = 'CSV');
&lt;/code&gt;&lt;/pre&gt;


&lt;p&gt;The &lt;em&gt;AUTO_INGEST=TRUE&lt;/em&gt; is important to specify to read event notifications sent from an S3 bucket to an SQS queue when new data is ready to load.&lt;/p&gt;
&lt;h3&gt;
  
  
  Step 4: Provide Permission to the user which will run Snowpipe
&lt;/h3&gt;

&lt;p&gt;If you are an account admin or have a higher access level (because you are trying this on a newly created personal Snowflake), in that case, you can skip this step, else you can give permission to the current role and user as follows:&lt;br&gt;
&lt;/p&gt;

&lt;pre class="highlight plaintext"&gt;&lt;code&gt;-- Create a role to contain the Snowpipe privileges
use role securityadmin;

create or replace role snowpipe1;

-- Grant the required privileges on the database objects
grant usage on database snowpipe_db to role snowpipe1;

grant usage on schema snowpipe_db.public to role snowpipe1;

grant insert, select on snowpipe_db.public.mytable to role snowpipe1;

grant usage on stage snowpipe_db.public.mystage to role snowpipe1;

-- Grant the OWNERSHIP privilege on the pipe object
grant ownership on pipe snowpipe_db.public.mypipe to role snowpipe1;

-- Grant the role to a user
grant role snowpipe1 to user jsmith;

-- Set the role as the default role for the user
alter user jsmith set default_role = snowpipe1;
&lt;/code&gt;&lt;/pre&gt;



&lt;h3&gt;
  
  
  Step 5: Configure S3 for Event Notification for Snowpipe Configuration
&lt;/h3&gt;

&lt;p&gt;This is an important step. For ease of the user, Snowflake managed SQS can be used to send new events from your S3 bucket.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How Snowpipe Loads Data into Snowflake?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;As depicted in the below diagram, as soon as new files come to the external stage(in this case, this is personal or your organization’s bucket), an event notification gets triggered and the notification gets stored in the SQS Queue(which is Snowflake managed or on Snowflake AWS cloud and outside your organization account and VPC).&lt;/p&gt;

&lt;p&gt;A pipe(consumer) is configured at the Snowflake end which keeps on listening to the SQS queue and sends a notification to snowflake for compute provisioning and starts ingesting data into Snowflake using copy command.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Dw7p06-h--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn-images-1.medium.com/max/1024/1%2At8wqedFBQivs24NNOE8k5g.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Dw7p06-h--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn-images-1.medium.com/max/1024/1%2At8wqedFBQivs24NNOE8k5g.png" alt="" width="800" height="853"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Image Courtesy: snowflake.com&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Thus, what is pending now is to create an S3 event notification and configure SQS queue.&lt;/p&gt;

&lt;p&gt;In order to get SQS ARN (managed by snowflake), run the following command on Snowflake and copy the SQS ARN from notification_channel column as shown in the picture below.&lt;br&gt;
&lt;/p&gt;

&lt;pre class="highlight plaintext"&gt;&lt;code&gt;show pipes;
&lt;/code&gt;&lt;/pre&gt;



&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--iwD3iS17--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn-images-1.medium.com/max/1024/1%2ANAUEaZcl4Z4v4PbFfU0ytg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--iwD3iS17--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn-images-1.medium.com/max/1024/1%2ANAUEaZcl4Z4v4PbFfU0ytg.png" alt="" width="800" height="83"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now follow this sequence to add and create S3 notification&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;AWS S3 console &amp;gt;&amp;gt; Properties &amp;gt;&amp;gt; Event Notification &amp;gt;&amp;gt; Create Event Notification &amp;gt;&amp;gt; add path &amp;amp; SQS ARN &amp;gt;&amp;gt; Save/Submit&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;If you are still with me then we have completed all the steps and now is the time to test the continuous load by uploading files on the S3 bucket.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 6: Validate the Data Load using Snowpipe
&lt;/h3&gt;

&lt;p&gt;Now, if you have uploaded files on S3 then you will start seeing the data on the table, If the data is still not loaded, then you probably have these questions in your mind.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;How to check if Snowpipe is successfully established?&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Run the following command on Snowflake to check if the connection is successfully established. Here ‘mypipe’ is the name of the pipe created in Step 3.&lt;br&gt;
&lt;/p&gt;

&lt;pre class="highlight plaintext"&gt;&lt;code&gt;select SYSTEM$PIPE_STATUS('mypipe');
&lt;/code&gt;&lt;/pre&gt;



&lt;p&gt;This command will return a JSON response, where “executionState”:”RUNNING” denotes if everything has been setup properly and as expected.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;I have uploaded the file on S3, but why the data is still not visible in the table using Snowpipe?&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you have uploaded the file on S3, but data is not yet loaded onto the table, then check the issue with the content using this command:&lt;br&gt;
&lt;/p&gt;

&lt;pre class="highlight plaintext"&gt;&lt;code&gt;select * from table(validate_pipe_load(
  pipe_name=&amp;gt;'MYPIPE',
  start_time=&amp;gt;dateadd(hour, -24, current_timestamp())));
&lt;/code&gt;&lt;/pre&gt;



&lt;p&gt;This command returns result, a sample of which is shown below, which shows if there was any problem with data or compatible schema.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--PwZVowmf--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn-images-1.medium.com/max/640/1%2AeqMqmeEh_ouNMhSCIuKsiw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--PwZVowmf--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn-images-1.medium.com/max/640/1%2AeqMqmeEh_ouNMhSCIuKsiw.png" alt="" width="640" height="464"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Image by Ashish Mishra&lt;/em&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;SYSTEM$PIPE_STATUS command is showing the last ingested file but why data is not visible in the target table?&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;There are chances that &lt;strong&gt;SYSTEM$PIPE_STATUS&lt;/strong&gt; command will show &lt;em&gt;lastIngestedFilePath&lt;/em&gt; and &lt;em&gt;lastForwardedFilePath&lt;/em&gt; as the correct path but the file is not loaded, this happened due to reason that there is some problem with the file as mentioned in the above question.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;When using Snowpipe, why am I not able to see any entry in load_history table for success or failure?&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;All the data loaded or failed using Snowpipe do not create an entry in load_history instead it uses ‘&lt;em&gt;pipe_usage_history&lt;/em&gt;’ for this purpose.&lt;br&gt;
&lt;/p&gt;

&lt;pre class="highlight plaintext"&gt;&lt;code&gt;select *
  from table(information_schema.pipe_usage_history(
    date_range_start=&amp;gt;dateadd('hour',-24,current_timestamp()),
    pipe_name=&amp;gt;'mypipe'));
&lt;/code&gt;&lt;/pre&gt;



&lt;h3&gt;
  
  
  How Snowpipe Cost is Calculated?
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Compute resources is necessary to decompose, decrypt and transform the new data. Snowflake adds costing for compute usage.&lt;/li&gt;
&lt;li&gt;Apart from this an overhead cost for managing files in the internal Snowpipe queue is also included and this overhead charge increases with proportion to the number of files queued for loading and the size of files loaded(more time to load a file will increase queue time and thus cost).&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In order to validate and get some approximation, I have run a few experiments as below:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Snowpipe charges approximately 0.06 USD per 1000 files queued.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;With my experiment, it consumed around 0.000287202 Credits = 0.001148808 USD for 10K rows CSV file.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;One important point that I noticed while doing this experiment is that there is no definite latency on Snowpipe load and sometime it takes unabruptly more time to load data and there is not much you can do during that time. I guess Snowflake should add more transparancy during the whole process.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  How to reduce cost in Snowpipe?
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;File size should be roughly 10–100MB(Snowflake Documentation has referred to around 100–250MB, but my recommendation is to keep the file size smaller) in size compressed.&lt;/li&gt;
&lt;li&gt;Try to reduce the total time to aggregate file data within 1 min. One way to try this is if your source application takes more than 1 minute to accumulate the data, then consider creating split data files once per minute.&lt;/li&gt;
&lt;li&gt;If there are more frequent files at the stage location and more than one file is coming within a minute, in this case Snowpipe will utilize the internal load queue to manage these files and overhead cost will increase.&lt;/li&gt;
&lt;li&gt;Snowflake recommends enabling S3 event filtering for Snowpipe to reduce event noise, latency, and finally cost.&lt;/li&gt;
&lt;li&gt;If file size in the above range is not possible, then consider removing &lt;strong&gt;“SKIP_FILE”&lt;/strong&gt; as the default option for Snowpipe, as it might waste a lot of resources and credits and might cause a huge delay. The better option would be &lt;strong&gt;“CONTINUE”&lt;/strong&gt; for such cases.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Things to Note:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Only Snowflake hosted on AWS supports AWS S3 event notification for Snowpipe(by the time this blog was posted).&lt;/li&gt;
&lt;li&gt;When you use AWS SQS notification then data moves out of your current VPC and this traffic is not protected by your VPC.&lt;/li&gt;
&lt;li&gt;All data types are supported, including semi-structured data types such as JSON and Avro.&lt;/li&gt;
&lt;li&gt;Snowpipe does not load a file with the same name if it has been modified later, because Snowpipe maintains metadata for itself and changing the name doesn’t modify this metadata.&lt;/li&gt;
&lt;li&gt;Snowpipe maintains load history only for 14 days, a modified file can be loaded after 14 days as metadata will not be valid then. While bulk data load keeps this metadata for 64 days.&lt;/li&gt;
&lt;li&gt;Snowpipe does not guarantee that files will be loaded in the same order they were staged, though if files are not getting staged at exceptionally high velocity, then order violation will be visible or detectable. In order to handle this it is recommended to load smaller files once per minute. Load order is not maintained due to multiple processes pulling files from the queue and depending upon the time to load, the sequence of data load could appear as different.&lt;/li&gt;
&lt;li&gt;By default, Snowflake applies &lt;strong&gt;“SKIP_FILE”&lt;/strong&gt; when there is an error in loading files, while copy command uses &lt;strong&gt;ABORT_STATEMENT&lt;/strong&gt; as the default behavior.&lt;/li&gt;
&lt;li&gt;Snowflake caches the temporary credentials for a period that cannot exceed the 60 minutes expiration time. If you revoke access from Snowflake, users might be able to list files and load data from the cloud storage location until the cache expires.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Conclusion:
&lt;/h3&gt;

&lt;p&gt;After my experiment with Snowpipe, These are my takes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;It was not able to handle high-velocity files, where a lot of files are coming at a higher pace and of course, maintaining the order was a big issue.&lt;/li&gt;
&lt;li&gt;When the file size is higher(between 100MB to 200MB) then it takes an unexpectedly huge time to load, while the same file can be loaded in less time using copy command.&lt;/li&gt;
&lt;li&gt;Once a file is loaded on S3, there is not much visibility of the files status and queue length and it becomes tricky to check why files are not loaded and debugging becomes tricky. (If you have found any solution for this then please comment).&lt;/li&gt;
&lt;li&gt;Snowpipe is good for very small files with the very low frequency where the latency of file ingestion is not a determining factor.&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  References:
&lt;/h4&gt;

&lt;ol&gt;
&lt;li&gt;&lt;a href="https://docs.snowflake.com/en/user-guide/data-load-snowpipe-auto-s3#step-3-configure-security"&gt;Snowflake Official Documentation&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;


&lt;/table&gt;&lt;/div&gt;

</description>
      <category>realtime</category>
      <category>snowflake</category>
      <category>datawarehous</category>
      <category>snowpipe</category>
    </item>
    <item>
      <title>Listing Billion Number of S3 Objects into SQS: Challenges &amp; Benchmarks</title>
      <dc:creator>Ashish Mishra</dc:creator>
      <pubDate>Sat, 18 Feb 2023 08:14:36 +0000</pubDate>
      <link>https://dev.to/arglee/listing-billion-number-of-s3-objects-into-sqs-challenges-benchmarks-l15</link>
      <guid>https://dev.to/arglee/listing-billion-number-of-s3-objects-into-sqs-challenges-benchmarks-l15</guid>
      <description>&lt;p&gt;Can S3 event notification service scale enough to handle Billion high-velocity events and can SQS handle these events without any data drop? This blog is all about unveiling these use cases.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fet3qvbrox0wuvcdk7spb.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fet3qvbrox0wuvcdk7spb.png" width="800" height="829"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I have been working in the healthcare industry for the past 8 years, and one of the most interesting problem in this industry is skewness and variation in data. The day you think you have handled all the issues with the data, is the day you receive double what you faced earlier.&lt;/p&gt;

&lt;p&gt;On daily basis, we receive more than 200 Million files and this number of files can reach up to Billions in a single historical data transfer. Another interesting part is the size of the file, which ranges from a few bytes to 20 MB.&lt;/p&gt;

&lt;h3&gt;
  
  
  What’s the Goal?
&lt;/h3&gt;

&lt;p&gt;The problem/target is very generic.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Data is coming from multiple sources into the S3 bucket.&lt;/li&gt;
&lt;li&gt;Parse the data using standard parsers which can scale automatically to parse huge amounts of files.&lt;/li&gt;
&lt;li&gt;Clean and transform the data into the standard format.&lt;/li&gt;
&lt;li&gt;Map the transformed source schema to &lt;a href="https://arglee.medium.com/demystifying-metadata-management-part-1-cd86ee78228a#:~:text=Data%20Warehouse%20%26%20Data%20Lake%20%26%20Data%20Mart%3A" rel="noopener noreferrer"&gt;warehouse&lt;/a&gt; schema.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fni4mg721r53tiut2mxbt.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fni4mg721r53tiut2mxbt.png" width="733" height="344"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;The end Goal is to get data to the data warehouse in the standard schema&lt;/em&gt;&lt;/p&gt;
&lt;h3&gt;
  
  
  Challenges with the Process
&lt;/h3&gt;

&lt;p&gt;As per the above diagram, there are 4 steps. For this blog, we will limit our discussion to S3 source file arrival and parsers only, where we are interacting with billions of files in chronological order.&lt;/p&gt;

&lt;p&gt;The system faces multiple challenges when the number of objects in the S3 increases exponentially:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Exploration of Data:&lt;/strong&gt; Listing objects on the S3 bucket becomes very slow and tiresome for &lt;a href="https://arglee.medium.com/demystifying-metadata-management-part-1-cd86ee78228a#:~:text=Data%20Architect%20%26%20Data%20Engineer" rel="noopener noreferrer"&gt;data engineers&lt;/a&gt; while exploring the data.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Parsing and Cleansing:&lt;/strong&gt; Parsing and cleansing of bulk data become challenging due to the slow listing of S3 objects (A single-threaded python program takes approximately 20 mins to list 1 million objects using standard AWS SDK while writing this blog).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Reprocessing and Error Handling:&lt;/strong&gt; Handling processed vs unprocessed &lt;a href="https://arglee.medium.com/demystifying-metadata-management-part-1-cd86ee78228a" rel="noopener noreferrer"&gt;data&lt;/a&gt; becomes tricky due to a large number of objects and in case of any error re-processing of data takes a lot of time.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Metadata Management:&lt;/strong&gt; &lt;a href="https://arglee.medium.com/demystifying-metadata-management-part-1-cd86ee78228a" rel="noopener noreferrer"&gt;Metadata management&lt;/a&gt; becomes tricky if the metadata(Size, Modified Time, Ingested Time etc) of objects is not already available(&lt;a href="https://arglee.medium.com/demystifying-metadata-management-part-1-cd86ee78228a" rel="noopener noreferrer"&gt;Read more about metadata management and its challenges here&lt;/a&gt;).&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;
  
  
  How to Solve the Above Problem?
&lt;/h3&gt;

&lt;p&gt;The solution is also straightforward, but can we scale it enough to handle a billion objects?&lt;/p&gt;

&lt;p&gt;We have decided to keep track of each file that is coming to the S3 bucket and save those in the database or any persistent storage, which can later be accessed by our parsers to overcome the above-mentioned problem.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnjft4xnvqybfwy03r2i4.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnjft4xnvqybfwy03r2i4.png" width="800" height="271"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Capture events from S3 into SQS &amp;amp; store them in persistent storage for later access&lt;/em&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Though this is clear from the &lt;a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/how-to-enable-disable-notification-intro.html" rel="noopener noreferrer"&gt;AWS documentation&lt;/a&gt; that S3 event notification can get us where we wanted to reach, we wanted to check if it can handle huge and high velocity events where the number of files is coming at the speed of &lt;strong&gt;4000–5000 objects/Second.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h3&gt;
  
  
  Experiment
&lt;/h3&gt;

&lt;p&gt;In order to check the validity, a quick experiment is required, which includes these steps:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Set up S3 and SQS with required permissions:&lt;/strong&gt; Create an S3 bucket with the prefix required for the problem and &lt;a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/how-to-enable-disable-notification-intro.html" rel="noopener noreferrer"&gt;SQS with the required permission&lt;/a&gt; to start receiving S3 events.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Automate high-paced data load:&lt;/strong&gt; Create a script that will create random data of 1Kb and stream data on the S3 bucket in files and another script to keep checking the delay of the messages on the SQS and their count compare to the message sent.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Run and Monitor:&lt;/strong&gt; Now run the scripts to load data and compare delay.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzmjwg73kldw768frj37z.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzmjwg73kldw768frj37z.gif" width="1152" height="648"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Top GIF: Script to load data, and count SQS events &amp;amp; their delay, Bottom: S3 &amp;amp; SQS data sample&lt;/em&gt;&lt;/p&gt;
&lt;h3&gt;
  
  
  Its Result Time:
&lt;/h3&gt;

&lt;p&gt;Once we have parallelized the above scenarios to start loading files. The results surprised me.&lt;/p&gt;

&lt;p&gt;With the automation script, I was able to reach up to &lt;strong&gt;2500 files creation per second&lt;/strong&gt; on S3 and the maximum delay between file landing and SQS receiving the event notification for the PUT event was  &lt;strong&gt;100ms.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This is the sample message that you receive on the SQS for the PUT event:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;{
  "Records": [
    {
      "eventVersion": "2.1",
      "eventSource": "aws:s3",
      "awsRegion": "us-east-1",
      "eventTime": "2023-01-22T18:06:53.713Z",
      "eventName": "ObjectCreated:Put",
      "userIdentity": {
        "principalId": "AWS:&amp;lt;PRINICIALID&amp;gt;"
      },
      "requestParameters": {
        "sourceIPAddress": "&amp;lt;IP ADDRESS&amp;gt;"
      },
      "responseElements": {
        "x-amz-request-id": "12345678AF67",
        "x-amz-id-2": "wertyuiofghjkcvbn456789rtyui45678tyui56789rtyuiopertydfghjkcvbn"
      },
      "s3": {
        "s3SchemaVersion": "1.0",
        "configurationId": "s3_sqs_load_testing",
        "bucket": {
          "name": "s3_sqs_load_testing",
          "ownerIdentity": {
            "principalId": "&amp;lt;PRINCIPAL ID&amp;gt;"
          },
          "arn": "arn:aws:s3:::s3_sqs_load_testing"
        },
        "object": {
          "key": "s3_sqs_load_testing/base_path/1st_iterator/20230122/test.csv",
          "size": 14311,
          "eTag": "987fghjk789hj89",
          "versionId": "SdgdghjdbhfjhYUhjdhfj",
          "sequencer": "0063CD7B3D9FA2B9E6"
        }
      }
    }
  ]
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Estimated Cost for the Problem:
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvtlw1f0a7kwqlybqz5hj.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvtlw1f0a7kwqlybqz5hj.png" width="800" height="360"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Pricing as of January 23* for US-EAST region. Please confirm exact prices from official AWS website&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;As shown in the above diagram, Pricing for the solution is nominal compared to what it is solving for your &lt;a href="https://arglee.medium.com/demystifying-metadata-management-part-1-cd86ee78228a" rel="noopener noreferrer"&gt;metadata management system&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Above cost considers the cost for 1 Million objects. We wanted to get the cost for billion objects. An estimated cost for 1 Billion objects will be around 5.857*100 = $ 585.7.&lt;/p&gt;

&lt;p&gt;This is the total cost of the system, but you are already getting files on S3 that cannot be removed so we are adding approximately ~15% extra cost to the current S3 system. Though the interesting part is, if you look at the whole journey from parsers (which includes listing the same objects multiple times) and metadata management(which list files for data engineer to explore) then the cost will reduce further to approximately ~10%.&lt;/p&gt;

&lt;p&gt;Now, this extra 10% cost has increased &lt;strong&gt;the total efficiency of the system by 2.5X&lt;/strong&gt; and parsers are able to finish the job in 2.5 times less than what it used to take, which is a good win.&lt;/p&gt;

&lt;h3&gt;
  
  
  Limitations of the Current Approach
&lt;/h3&gt;

&lt;p&gt;Though we had success in the above experiment, still there are a few limitations that might be a deal-breaker for few use cases. Those are:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The Amazon SQS queue must be in the same AWS Region as your Amazon S3 bucket (&lt;a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/notification-how-to-event-types-and-destinations.html#:~:text=The%20Amazon%20SQS%20queue%20must%20be%20in%20the%20same%20AWS%20Region%20as%20your%20Amazon%20S3%20bucket" rel="noopener noreferrer"&gt;&lt;em&gt;mention&lt;/em&gt;&lt;/a&gt;).&lt;/li&gt;
&lt;li&gt;Enabling notifications is a bucket-level operation and notifications need to be enabled for each bucket separately, though events can be published on a single queue (&lt;a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/how-to-enable-disable-notification-intro.html" rel="noopener noreferrer"&gt;mention&lt;/a&gt;).&lt;/li&gt;
&lt;li&gt;After you create or change the bucket notification configuration, it usually takes about five minutes for the changes to take effect (&lt;a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/how-to-enable-disable-notification-intro.html" rel="noopener noreferrer"&gt;mention&lt;/a&gt;).&lt;/li&gt;
&lt;li&gt;When notification is first enabled or notification configuration gets changed, a S3:TestEvent Occurs. If use case forces to change configuration very frequently then additional changes in consumer is required to skip these messages (&lt;a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/how-to-enable-disable-notification-intro.html" rel="noopener noreferrer"&gt;mention&lt;/a&gt;).&lt;/li&gt;
&lt;li&gt;Event notifications aren’t guaranteed to arrive in the same order that the events occurred. However, notifications from events that create objects (PUTs) and delete objects containing a sequencer. It can be used to determine the order of events for a given object key. If you compare the sequencer strings from two event notifications on the same object key, the event notification with the greater sequencer the hexadecimal value is the event that occurred later.&lt;/li&gt;
&lt;li&gt;Across events for different buckets or objects within a bucket, the sequencer value should not be considered useful for ordering comparisons (&lt;a href="https://stackoverflow.com/questions/55287965/s3-notification-occurrence-or-sqs-reception-sequencer-ordering#:~:text=Across%20events%20for%20different%20buckets%20or%20objects%20within%20a%20bucket%2C%20the%20sequencer%20value%20should%20not%20be%20considered%20useful%20for%20ordering%20comparisons" rel="noopener noreferrer"&gt;Check this stackoverflow answer&lt;/a&gt;).&lt;/li&gt;
&lt;li&gt;If you’re using event notifications to maintain a separate database or index of your Amazon S3 objects, AWS recommends that you compare and store the sequencer values as you process each event notification.&lt;/li&gt;
&lt;li&gt;Each 64 KB chunk of a payload is billed as 1 request (for example, an API action with a 256 KB payload is billed as 4 requests)&lt;/li&gt;
&lt;li&gt;Every Amazon SQS action counts as a request. The GET per-request charge is the charge for handling the actual request for the file (checking whether it exists, checking permissions, fetching it from storage, and preparing to return it to the requester), each time it is downloaded. The data transfer charge is for the actual transfer of the file’s contents from S3 to the requester, over the Internet, each time it is downloaded. If you include a link to a file on your site but the user doesn’t download it and the browser doesn’t load it to automatically play, or pre-load it, or something like that, S3 would not know anything about that, so you wouldn’t be billed. That’s also true if you are using pre-signed URLs — those don’t result in any billing unless they’re actually used, because they’re generated on your server.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Conclusion
&lt;/h3&gt;

&lt;p&gt;Though there are a few limitations for some use cases when you want to take it to production, but the experiment is successful. I will list down what I did achieve:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The overall speed of file exploration by data engineers and stewards increased upto &lt;strong&gt;1.5x,&lt;/strong&gt; as the listing was easy for them and they can group files on the basis of regex pattern which is not very easy in the case of direct S3 exploration (&lt;a href="https://arglee.medium.com/demystifying-metadata-management-part-1-cd86ee78228a#:~:text=Data%20Steward%20%26%20Data%20Analyst%20%26%20Data%20Scientist%3A" rel="noopener noreferrer"&gt;&lt;em&gt;Read more about data Engineer vs Data Stewards here&lt;/em&gt;&lt;/a&gt;).&lt;/li&gt;
&lt;li&gt;The overall speed of parsing files increased by &lt;strong&gt;2.5x&lt;/strong&gt; , as the listing can be avoided during parsing and parsers can be scaled by pre-determined scaling factor (on the basis of #files).&lt;/li&gt;
&lt;li&gt;Better &lt;a href="https://arglee.medium.com/demystifying-metadata-management-part-1-cd86ee78228a#:~:text=Blog%20by%20Dataedo-,Data%20Democratization%3A,-Empowering%20employees%20and" rel="noopener noreferrer"&gt;Data Democratization&lt;/a&gt; for the organization by enabling rich searching over data.&lt;/li&gt;
&lt;li&gt;… and many more.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;[Writers Corner]&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Data Platform and analytics is a basic entity not only for IT but also for non-IT companies and object storage is one of the most common attributes of a Data Platform. Keeping object storage healthy(un-messy) should be taken care with the highest priority.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>go</category>
      <category>programming</category>
      <category>softwaredevelopment</category>
    </item>
    <item>
      <title>Bulk Data Load from S3 to Snowflake: Stepwise Process, Benchmarks &amp; Cost</title>
      <dc:creator>Ashish Mishra</dc:creator>
      <pubDate>Sat, 11 Feb 2023 12:02:32 +0000</pubDate>
      <link>https://dev.to/arglee/bulk-data-load-from-s3-to-snowflake-stepwise-process-benchmarks-cost-3d4e</link>
      <guid>https://dev.to/arglee/bulk-data-load-from-s3-to-snowflake-stepwise-process-benchmarks-cost-3d4e</guid>
      <description>&lt;p&gt;What will be the total cost if we load micro batches of data using bulk load from S3 to Snowflake at high frequency? Can snowflake load huge data files in a single go?&lt;/p&gt;

&lt;p&gt;In this blog, we shall understand how bulk load works in snowflake. What’s the syntax to bulk load data into Snowflake, and the cost to load frequent data using Bulk Load from S3?&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--sI2nn-dh--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn-images-1.medium.com/max/1024/1%2A4Ri0K39ViOtOh_lKeHNp6w.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--sI2nn-dh--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn-images-1.medium.com/max/1024/1%2A4Ri0K39ViOtOh_lKeHNp6w.png" alt="" width="800" height="450"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Bulk Data load from S3 to Snowflake. Image Courtesy: singlequote.blog&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;There are 2 ways to load data to snowflake:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Bulk Load using &lt;/li&gt;
&lt;li&gt;&lt;a href="https://medium.com/p/c63828c74b8e/edit"&gt;Continuous Load using SNOWPIPE&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;In this blog, we will discuss the &lt;em&gt;Bulk Load using Copy Into&lt;/em&gt; command. &lt;a href="https://medium.com/p/c63828c74b8e/"&gt;Refer here&lt;/a&gt; if you want to learn more about continuous load using Snowpipe in snowflake using multiple notification systems (S3/SQS).&lt;/p&gt;

&lt;p&gt;Bulk data load is a 4 step process. Before we deep dive into each step, you can refer to below SQL script for a quick get-through.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;-- Create file format to let system know the format
create file format if not exists single_quote_csv_format
   type = 'CSV'
   field_delimiter = ','
   skip_header = 1;

-- Check if any storage integration already exists   
show storage integrations;

-- Create storage integration with role arn received from AWS console.
create or replace storage integration single_quote_blog_s3_integration
  type = external_stage
  storage_provider = 'S3'
  storage_aws_role_arn = 'arn:aws:iam::&amp;lt;id&amp;gt;:role/single-quote-blog-snowflake-s3'
  enabled = true
  storage_allowed_locations = ('s3://single-quote-blog/sample_blog_data/');

-- Describe storage integration to get external_id to be applied on AWS IAM 
role.
describe storage integration single_quote_blog_s3_integration;

-- Create external stage with created storage integration
create stage if not exists single_quote_blog_stage
file_format = single_quote_csv_format
url = 's3://single-quote-blog/sample_blog_data/json_sample_files/'
storage_integration = single_quote_blog_s3_integration;

-- Create a table to load data into the snowflake table
CREATE TABLE if not exists single_quote_employee_data(name VARCHAR(255), dob DATE, designation VARCHAR(255), event_time TIMESTAMP);

-- Run copy command to load data into snowflake table
copy into single_quote_employee_data
  from @single_quote_blog_stage/random_object_storage_data.csv
  on_error = 'skip_file';

-- Verify the loaded records from load history table
select * from SNOWFLAKE.ACCOUNT_USAGE.load_history order by last_load_time desc limit 10;

-- Run count on the table to validate the records loaded into the table
select count(*) from single_quote_employee_data;

-- Check few records for sanity
SELECT * FROM single_quote_employee_data;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now that we are aware of the quick syntax and steps, let us understand each step in brief and how to connect with the S3 bucket using AWS console.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Step 1: Create File Format Objects&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;File format helps Snowflake understand how should the data in the file be interpreted and processed.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;create or replace file format single_quote_csv_format
   type = 'CSV'
   field_delimiter = ','
   skip_header = 1;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Step 2: Create Storage Integration &amp;amp; Access Permissions
&lt;/h3&gt;

&lt;p&gt;In layman's terms, Storage integration enables a handshake between Snowflake and your S3 bucket.&lt;/p&gt;

&lt;p&gt;Snowflake objects store a generated Identity and Access Management(IAM) entity for your external cloud storage(S3), and to complete a handshake you are required to add an entity provided by Snowflake in authorized keys/entities.&lt;/p&gt;

&lt;p&gt;Storage Integration is a combination of multiple steps. This includes multiple steps in this sequence:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Create AWS Policy &amp;gt;&amp;gt; Create AWS Role &amp;amp; attach policy &amp;gt;&amp;gt; Create SF Storage Integration &amp;gt;&amp;gt; Update Trust relationship using External ID &amp;amp; user arn from storage Integration&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Now let us understand each of the above steps in detail.&lt;/p&gt;

&lt;h4&gt;
  
  
  Step 2.1: Create AWS policy:
&lt;/h4&gt;

&lt;p&gt;Create AWS policy, that will give permission to Snowflake to be able to access files in the folder (and sub-folders).&lt;/p&gt;

&lt;p&gt;This includes the following steps in order:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;AWS Console &lt;strong&gt;&amp;gt;&amp;gt;&lt;/strong&gt; Search IAM &lt;strong&gt;&amp;gt;&amp;gt;&lt;/strong&gt; Policies &lt;strong&gt;&amp;gt;&amp;gt;&lt;/strong&gt; Create Policy &lt;strong&gt;&amp;gt;&amp;gt;&lt;/strong&gt; Click JSON &lt;strong&gt;&amp;gt;&amp;gt; A&lt;/strong&gt; dd JSON permission &amp;gt;&amp;gt; Add policy name &lt;strong&gt;&amp;gt;&amp;gt;&lt;/strong&gt;  Save&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Give a unique name to a policy like “singlequote_sf_s3_policy” as this will be used in a later step while creating the AWS role.&lt;/p&gt;

&lt;p&gt;Paste the following JSON to the “JSON” tab and click “Next” to save the policy&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Effect": "Allow",
            "Action": [
                "s3:GetObject",
                "s3:GetObjectVersion"
            ],
            "Resource": "arn:aws:s3:::single_quote_blog/*"
        },
        {
            "Effect": "Allow",
            "Action": [
                "s3:ListBucket",
                "s3:GetBucketLocation"
            ],
            "Resource": "arn:aws:s3:::single_quote_blog",
            "Condition": {
                "StringLike": {
                    "s3:prefix": [
                        "sample_blog_data/*"
                    ]
                }
            }
        }
    ]
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  Step 2.2: Create AWS role arn
&lt;/h4&gt;

&lt;p&gt;Create AWS Role for Snowflake. In order to create a role use the given steps in order.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;AWS Console &amp;gt;&amp;gt; Search IAM &amp;gt;&amp;gt; Click on Roles &amp;gt;&amp;gt; Create role &amp;gt;&amp;gt; AWS Service &amp;gt;&amp;gt; Use case (S3) &amp;gt;&amp;gt; select policy created in last step &amp;gt;&amp;gt; Add name &amp;gt;&amp;gt; Click Create role&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h4&gt;
  
  
  Step 2.3: Create Storage Integration
&lt;/h4&gt;

&lt;p&gt;Now copy the “role arn” from the Roles screen of the AWS console. It must be something like this —&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;arn:aws:iam::&amp;lt;id&amp;gt;:role/single-quote-blog-snowflake-s3
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now go back to the Snowflake database and run the following command —&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;create or replace storage integration single_quote_blog_storage_int
  type = external_stage
  storage_provider = 'S3'
  storage_aws_role_arn = 'arn:aws:iam::&amp;lt;id&amp;gt;:role/single-quote-blog-snowflake-s3'
  enabled = true
  storage_allowed_locations = ('s3://single-quote-blog/sample_blog_data/');
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;There are other options available on the above SQL command which can allow or disallow a few locations. P&lt;a href="https://docs.snowflake.com/en/sql-reference/sql/create-storage-integration.html"&gt;lease refer official snowflake documentation for more information&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;If you are not sure whether storage integration is already available or not. or if you do not want to mess up the current data pipelines running on production, then it is recommended to check all the storage integration by listing them using the above command and, then describing them to check if the storage location is already available.&lt;/p&gt;

&lt;h4&gt;
  
  
  Step 2.3: Modify the Trust Relationship for the Role
&lt;/h4&gt;

&lt;p&gt;Once you have created the storage integration, Snowflake creates an external Id, which is required to be added to the trust relationship. An external id and Snowflake user arn are required to grant access between your AWS resource (i.e. S3) and a third party (i.e, Snowflake).&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Describe storage Integration to get IAM USER ARN &amp;amp; External ID &amp;gt;&amp;gt; AWS Cosole Roles &amp;gt; Trust Relationships &amp;gt;&amp;gt; Add json for trust relationship&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Copy this external Id from this command&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;describe storage integration single_quote_blog_storage_int;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Uo0bDAxE--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn-images-1.medium.com/max/415/1%2ATex-WR4TxyvBXD9oZS4S0A.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Uo0bDAxE--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn-images-1.medium.com/max/415/1%2ATex-WR4TxyvBXD9oZS4S0A.png" alt="" width="415" height="281"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Result of “describe storage” on snowflake&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Get the “STORAGE_AWS_IAM_USER_ARN” and “STORAGE_AWS_EXTERNAL_ID” from the above result and modify JSON and paste it into the trust relationship.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Sid": "",
            "Effect": "Allow",
            "Principal": {
                "AWS": "arn:aws:iam::&amp;lt;id&amp;gt;:user/&amp;lt;id&amp;gt;"
            },
            "Action": "sts:AssumeRole",
            "Condition": {
                "ForAnyValue:StringEquals": {
                    "sts:ExternalId": [
                        "&amp;lt;external_id_1",
                        "&amp;lt;external_id_2&amp;gt;"
                    ]
                }
            }
        }
    ]
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Step 3: Create Stage Objects
&lt;/h3&gt;

&lt;p&gt;A Snowflake stage specifies where the data files are stored(i.e “staged”) so that the data in the files can be loaded into a table. Stages can be external or internal.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;create or replace stage single_quote_blog_stage
file_format = single_quote_csv_format
url = 's3://single-quote-blog/sample_blog_data/json_sample_files/'
storage_integration = single_quote_blog_storage_int;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;Using Copy command, You can load directly from the bucket, but Snowflake recommends creating an external stage that references the bucket and using that external stage instead.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--MsdcYvmD--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn-images-1.medium.com/max/1024/0%2AMwrgBgfu9ZX3aPHH.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--MsdcYvmD--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn-images-1.medium.com/max/1024/0%2AMwrgBgfu9ZX3aPHH.png" alt="" width="800" height="781"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Image Courtesy: snowflake.com&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Validate if the stage is correct by listing the files on the stage&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;list @single_quote_blog_stage;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Step 4: Copy Data into Target Table
&lt;/h3&gt;

&lt;p&gt;Before running a copy command, create a table, if not it does not already exist, followed by load data into the table, using the below command.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;copy into single_quote_employee_data
  from @single_quote_blog_stage/random_object_storage_data.csv
  on_error = 'skip_file';
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Validate the successfully loaded data using the load_history table.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;select * from SNOWFLAKE.ACCOUNT_USAGE.load_history 
order by last_load_time desc limit 10;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--B4P6pZJL--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn-images-1.medium.com/max/1024/1%2AFJlzQHmhBMzuA058LrJ6iw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--B4P6pZJL--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn-images-1.medium.com/max/1024/1%2AFJlzQHmhBMzuA058LrJ6iw.png" alt="" width="800" height="127"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Output for load_history table. Image by Snowflake Documentation&lt;/em&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Benchmarks &amp;amp; Cost for the Bulk Data Load
&lt;/h3&gt;

&lt;p&gt;Let’s try to load some big files on the ‘M’ snowflake warehouse size.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--FaMgvSpK--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn-images-1.medium.com/max/914/1%2AUeGKxgJHquMvsyyBg2PAFg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--FaMgvSpK--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn-images-1.medium.com/max/914/1%2AUeGKxgJHquMvsyyBg2PAFg.png" alt="" width="800" height="200"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Benchmarks on CSV load for Snowflake. Image by Author&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Now, as discussed at the start of this blog, I wanted to load data onto the Snowflake at a higher frequency. These are the benchmarks and cost of the solution:&lt;/p&gt;

&lt;p&gt;Here I am taking these considerations on high-frequency data.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Each file has 1M records (5 columns) of size ~ 100MB.&lt;/li&gt;
&lt;li&gt;Each &lt;strong&gt;1MB file takes around 8.2 Seconds to load into snowflake on XS warehouse size.&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Considering the Snowflake edition as Business Critical which cost $4/Credit. On Warehouse Size = XS, it will utilize 1 Credit/hour or $4/hour or $0.067/min.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://docs.snowflake.com/en/user-guide/cost-understanding-overall.html#:~:text=Because%20Snowflake%20utilizes%20per%2Dsecond%20billing%20(with%20a%2060%2Dsecond%20minimum%20each%20time%20the%20warehouse%20starts)"&gt;The minimum cost for every time warehouse starts (60 Secs)&lt;/a&gt;.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--tSOk4CdU--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn-images-1.medium.com/max/1006/1%2Alf02Hy-qAPT6A3NT_Kgv0w.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--tSOk4CdU--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn-images-1.medium.com/max/1006/1%2Alf02Hy-qAPT6A3NT_Kgv0w.png" alt="" width="800" height="142"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Cost for loading 100MB file throughout the day. Image by Author&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;This is clear from the costing above, more frequent data will add more cost to the snowflake cluster.&lt;/p&gt;

&lt;h3&gt;
  
  
  Points to be noted:
&lt;/h3&gt;

&lt;p&gt;Few points to keep in mind while loading the CSV data into a database.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Whenever we create a stage or storage integration, there is a hidden ID assigned to both and they are linked to each other. therefore, recreating a storage integration (using CREATE OR REPLACE STORAGE INTEGRATION) breaks the association between the storage integration and any stage that references it. Even if the names are the same, the Id generated will be different so the association will break. Therefore, it is necessary to establish all the connections again.&lt;/li&gt;
&lt;li&gt;Copy command can also be executed without storage integration, though this is not recommended, Syntax for direct copy command looks something like this or you can also create stage using credentials
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;-- Crendentials in copy command
Copy into single_quote_employee_data 
from 's3://single-quote-blog/sample_blog_data/json_sample_files/random_object_storage_data.csv' 
credentials=(AWS_KEY_ID = '&amp;lt;access_key&amp;gt;' AWS_SECRET_KEY = '&amp;lt;secret_key&amp;gt;')  
file_format = (type = 'CSV');

-- Credentials in stage
CREATE STAGE single_quote_employee_data 
URL = 's3://single-quote-blog/sample_blog_data/json_sample_files/' 
CREDENTIALS = (AWS_KEY_ID = ' *******' AWS_SECRET_KEY = '*********');
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Snowflake expects each record in a CSV file to be separated by newlines and the fields (i.e. individual values) in each record to be separated by commas. If &lt;strong&gt;&lt;em&gt;different&lt;/em&gt;&lt;/strong&gt; characters are used as record and field delimiters, you must &lt;strong&gt;&lt;em&gt;explicitly&lt;/em&gt;&lt;/strong&gt; specify this as part of the file format when loading.&lt;/li&gt;
&lt;li&gt;While loading data into the database, snowflake looks for a ‘newline’ character for line separation and ‘comma’(,) as the default character for the field delimiter. You must specify if any other character is used.&lt;/li&gt;
&lt;li&gt;If fields and data are not aligned with the table schema, then &lt;a href="https://docs.snowflake.com/en/user-guide/data-load-transform.html"&gt;Transforming Data During a Load&lt;/a&gt; can be used to match the schema with the table schema.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Conclusion:
&lt;/h3&gt;

&lt;p&gt;The copy command is one of the most common methods to load bulk data into the database. It is one of the most prominently used commands across the industry. One of the challenges with the bulk load is that it is yet not ready to use. In times of zero code pipeline, another alternative is using the pipe to load data into the database. But that is the topic for the next blog.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;[Writer’s Corner]&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;I am working at Innovaccer in Data Platform as Senior Engineering Manager and while writing this blog, I can proudly say that Innovaccer Data Platform has been rated&lt;/em&gt; &lt;strong&gt;&lt;em&gt;Best in KLAS Data and analytics platform for 2 years in a row!&lt;/em&gt;&lt;/strong&gt; &lt;a href="https://innovaccer.com/resources/news/innovaccer-recognized-the-best-in-klas-data-and-analytics-platform-again?utm_source=linkedin&amp;amp;utm_medium=social&amp;amp;utm_campaign=KLAS"&gt;&lt;em&gt;Read more about the news here&lt;/em&gt;&lt;/a&gt;&lt;em&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>snowflake</category>
      <category>microbatching</category>
      <category>bulkdata</category>
      <category>snowflakepricing</category>
    </item>
    <item>
      <title>Listing Billion Number of S3 Objects into SQS: Challenges &amp; Benchmarks</title>
      <dc:creator>Ashish Mishra</dc:creator>
      <pubDate>Sun, 29 Jan 2023 02:36:26 +0000</pubDate>
      <link>https://dev.to/arglee/listing-billion-number-of-s3-objects-into-sqs-challenges-benchmarks-1843</link>
      <guid>https://dev.to/arglee/listing-billion-number-of-s3-objects-into-sqs-challenges-benchmarks-1843</guid>
      <description>&lt;p&gt;Can S3 event notification service scale enough to handle Billion high-velocity events and can SQS handle these events without any data drop? This blog is all about unveiling these use cases.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fet3qvbrox0wuvcdk7spb.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fet3qvbrox0wuvcdk7spb.png" width="800" height="829"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I have been working in the healthcare industry for the past 8 years, and one of the most interesting problem in this industry is skewness and variation in data. The day you think you have handled all the issues with the data, is the day you receive double what you faced earlier.&lt;/p&gt;

&lt;p&gt;On daily basis, we receive more than 200 Million files and this number of files can reach up to Billions in a single historical data transfer. Another interesting part is the size of the file, which ranges from a few bytes to 20 MB.&lt;/p&gt;

&lt;h3&gt;
  
  
  What’s the Goal?
&lt;/h3&gt;

&lt;p&gt;The problem/target is very generic.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Data is coming from multiple sources into the S3 bucket.&lt;/li&gt;
&lt;li&gt;Parse the data using standard parsers which can scale automatically to parse huge amounts of files.&lt;/li&gt;
&lt;li&gt;Clean and transform the data into the standard format.&lt;/li&gt;
&lt;li&gt;Map the transformed source schema to &lt;a href="https://arglee.medium.com/demystifying-metadata-management-part-1-cd86ee78228a#:~:text=Data%20Warehouse%20%26%20Data%20Lake%20%26%20Data%20Mart%3A" rel="noopener noreferrer"&gt;warehouse&lt;/a&gt; schema.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fni4mg721r53tiut2mxbt.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fni4mg721r53tiut2mxbt.png" width="733" height="344"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;The end Goal is to get data to the data warehouse in the standard schema&lt;/em&gt;&lt;/p&gt;
&lt;h3&gt;
  
  
  Challenges with the Process
&lt;/h3&gt;

&lt;p&gt;As per the above diagram, there are 4 steps. For this blog, we will limit our discussion to S3 source file arrival and parsers only, where we are interacting with billions of files in chronological order.&lt;/p&gt;

&lt;p&gt;The system faces multiple challenges when the number of objects in the S3 increases exponentially:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Exploration of Data:&lt;/strong&gt; Listing objects on the S3 bucket becomes very slow and tiresome for &lt;a href="https://arglee.medium.com/demystifying-metadata-management-part-1-cd86ee78228a#:~:text=Data%20Architect%20%26%20Data%20Engineer" rel="noopener noreferrer"&gt;data engineers&lt;/a&gt; while exploring the data.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Parsing and Cleansing:&lt;/strong&gt; Parsing and cleansing of bulk data become challenging due to the slow listing of S3 objects (A single-threaded python program takes approximately 20 mins to list 1 million objects using standard AWS SDK while writing this blog).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Reprocessing and Error Handling:&lt;/strong&gt; Handling processed vs unprocessed &lt;a href="https://arglee.medium.com/demystifying-metadata-management-part-1-cd86ee78228a" rel="noopener noreferrer"&gt;data&lt;/a&gt; becomes tricky due to a large number of objects and in case of any error re-processing of data takes a lot of time.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Metadata Management:&lt;/strong&gt; &lt;a href="https://arglee.medium.com/demystifying-metadata-management-part-1-cd86ee78228a" rel="noopener noreferrer"&gt;Metadata management&lt;/a&gt; becomes tricky if the metadata(Size, Modified Time, Ingested Time etc) of objects is not already available(&lt;a href="https://arglee.medium.com/demystifying-metadata-management-part-1-cd86ee78228a" rel="noopener noreferrer"&gt;Read more about metadata management and its challenges here&lt;/a&gt;).&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;
  
  
  How to Solve the Above Problem?
&lt;/h3&gt;

&lt;p&gt;The solution is also straightforward, but can we scale it enough to handle a billion objects?&lt;/p&gt;

&lt;p&gt;We have decided to keep track of each file that is coming to the S3 bucket and save those in the database or any persistent storage, which can later be accessed by our parsers to overcome the above-mentioned problem.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnjft4xnvqybfwy03r2i4.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnjft4xnvqybfwy03r2i4.png" width="800" height="271"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Capture events from S3 into SQS &amp;amp; store them in persistent storage for later access&lt;/em&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Though this is clear from the &lt;a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/how-to-enable-disable-notification-intro.html" rel="noopener noreferrer"&gt;AWS documentation&lt;/a&gt; that S3 event notification can get us where we wanted to reach, we wanted to check if it can handle huge and high velocity events where the number of files is coming at the speed of &lt;strong&gt;4000–5000 objects/Second.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h3&gt;
  
  
  Experiment
&lt;/h3&gt;

&lt;p&gt;In order to check the validity, a quick experiment is required, which includes these steps:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Set up S3 and SQS with required permissions:&lt;/strong&gt; Create an S3 bucket with the prefix required for the problem and &lt;a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/how-to-enable-disable-notification-intro.html" rel="noopener noreferrer"&gt;SQS with the required permission&lt;/a&gt; to start receiving S3 events.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Automate high-paced data load:&lt;/strong&gt; Create a script that will create random data of 1Kb and stream data on the S3 bucket in files and another script to keep checking the delay of the messages on the SQS and their count compare to the message sent.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Run and Monitor:&lt;/strong&gt; Now run the scripts to load data and compare delay.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzmjwg73kldw768frj37z.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzmjwg73kldw768frj37z.gif" width="1152" height="648"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Top GIF: Script to load data, and count SQS events &amp;amp; their delay, Bottom: S3 &amp;amp; SQS data sample&lt;/em&gt;&lt;/p&gt;
&lt;h3&gt;
  
  
  Its Result Time:
&lt;/h3&gt;

&lt;p&gt;Once we have parallelized the above scenarios to start loading files. The results surprised me.&lt;/p&gt;

&lt;p&gt;With the automation script, I was able to reach up to &lt;strong&gt;2500 files creation per second&lt;/strong&gt; on S3 and the maximum delay between file landing and SQS receiving the event notification for the PUT event was  &lt;strong&gt;100ms.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This is the sample message that you receive on the SQS for the PUT event:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;{
  "Records": [
    {
      "eventVersion": "2.1",
      "eventSource": "aws:s3",
      "awsRegion": "us-east-1",
      "eventTime": "2023-01-22T18:06:53.713Z",
      "eventName": "ObjectCreated:Put",
      "userIdentity": {
        "principalId": "AWS:&amp;lt;PRINICIALID&amp;gt;"
      },
      "requestParameters": {
        "sourceIPAddress": "&amp;lt;IP ADDRESS&amp;gt;"
      },
      "responseElements": {
        "x-amz-request-id": "12345678AF67",
        "x-amz-id-2": "wertyuiofghjkcvbn456789rtyui45678tyui56789rtyuiopertydfghjkcvbn"
      },
      "s3": {
        "s3SchemaVersion": "1.0",
        "configurationId": "s3_sqs_load_testing",
        "bucket": {
          "name": "s3_sqs_load_testing",
          "ownerIdentity": {
            "principalId": "&amp;lt;PRINCIPAL ID&amp;gt;"
          },
          "arn": "arn:aws:s3:::s3_sqs_load_testing"
        },
        "object": {
          "key": "s3_sqs_load_testing/base_path/1st_iterator/20230122/test.csv",
          "size": 14311,
          "eTag": "987fghjk789hj89",
          "versionId": "SdgdghjdbhfjhYUhjdhfj",
          "sequencer": "0063CD7B3D9FA2B9E6"
        }
      }
    }
  ]
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Estimated Cost for the Problem:
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvtlw1f0a7kwqlybqz5hj.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvtlw1f0a7kwqlybqz5hj.png" width="800" height="360"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Pricing as of January 23* for US-EAST region. Please confirm exact prices from official AWS website&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;As shown in the above diagram, Pricing for the solution is nominal compared to what it is solving for your &lt;a href="https://arglee.medium.com/demystifying-metadata-management-part-1-cd86ee78228a" rel="noopener noreferrer"&gt;metadata management system&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Above cost considers the cost for 1 Million objects. We wanted to get the cost for billion objects. An estimated cost for 1 Billion objects will be around 5.857*100 = $ 585.7.&lt;/p&gt;

&lt;p&gt;This is the total cost of the system, but you are already getting files on S3 that cannot be removed so we are adding approximately ~15% extra cost to the current S3 system. Though the interesting part is, if you look at the whole journey from parsers (which includes listing the same objects multiple times) and metadata management(which list files for data engineer to explore) then the cost will reduce further to approximately ~10%.&lt;/p&gt;

&lt;p&gt;Now, this extra 10% cost has increased &lt;strong&gt;the total efficiency of the system by 2.5X&lt;/strong&gt; and parsers are able to finish the job in 2.5 times less than what it used to take, which is a good win.&lt;/p&gt;

&lt;h3&gt;
  
  
  Limitations of the Current Approach
&lt;/h3&gt;

&lt;p&gt;Though we had success in the above experiment, still there are a few limitations that might be a deal-breaker for few use cases. Those are:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The Amazon SQS queue must be in the same AWS Region as your Amazon S3 bucket (&lt;a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/notification-how-to-event-types-and-destinations.html#:~:text=The%20Amazon%20SQS%20queue%20must%20be%20in%20the%20same%20AWS%20Region%20as%20your%20Amazon%20S3%20bucket" rel="noopener noreferrer"&gt;&lt;em&gt;mention&lt;/em&gt;&lt;/a&gt;).&lt;/li&gt;
&lt;li&gt;Enabling notifications is a bucket-level operation and notifications need to be enabled for each bucket separately, though events can be published on a single queue (&lt;a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/how-to-enable-disable-notification-intro.html" rel="noopener noreferrer"&gt;mention&lt;/a&gt;).&lt;/li&gt;
&lt;li&gt;After you create or change the bucket notification configuration, it usually takes about five minutes for the changes to take effect (&lt;a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/how-to-enable-disable-notification-intro.html" rel="noopener noreferrer"&gt;mention&lt;/a&gt;).&lt;/li&gt;
&lt;li&gt;When notification is first enabled or notification configuration gets changed, a S3:TestEvent Occurs. If use case forces to change configuration very frequently then additional changes in consumer is required to skip these messages (&lt;a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/how-to-enable-disable-notification-intro.html" rel="noopener noreferrer"&gt;mention&lt;/a&gt;).&lt;/li&gt;
&lt;li&gt;Event notifications aren’t guaranteed to arrive in the same order that the events occurred. However, notifications from events that create objects (PUTs) and delete objects containing a sequencer. It can be used to determine the order of events for a given object key. If you compare the sequencer strings from two event notifications on the same object key, the event notification with the greater sequencer the hexadecimal value is the event that occurred later.&lt;/li&gt;
&lt;li&gt;Across events for different buckets or objects within a bucket, the sequencer value should not be considered useful for ordering comparisons (&lt;a href="https://stackoverflow.com/questions/55287965/s3-notification-occurrence-or-sqs-reception-sequencer-ordering#:~:text=Across%20events%20for%20different%20buckets%20or%20objects%20within%20a%20bucket%2C%20the%20sequencer%20value%20should%20not%20be%20considered%20useful%20for%20ordering%20comparisons" rel="noopener noreferrer"&gt;Check this stackoverflow answer&lt;/a&gt;).&lt;/li&gt;
&lt;li&gt;If you’re using event notifications to maintain a separate database or index of your Amazon S3 objects, AWS recommends that you compare and store the sequencer values as you process each event notification.&lt;/li&gt;
&lt;li&gt;Each 64 KB chunk of a payload is billed as 1 request (for example, an API action with a 256 KB payload is billed as 4 requests)&lt;/li&gt;
&lt;li&gt;Every Amazon SQS action counts as a request. The GET per-request charge is the charge for handling the actual request for the file (checking whether it exists, checking permissions, fetching it from storage, and preparing to return it to the requester), each time it is downloaded. The data transfer charge is for the actual transfer of the file’s contents from S3 to the requester, over the Internet, each time it is downloaded. If you include a link to a file on your site but the user doesn’t download it and the browser doesn’t load it to automatically play, or pre-load it, or something like that, S3 would not know anything about that, so you wouldn’t be billed. That’s also true if you are using pre-signed URLs — those don’t result in any billing unless they’re actually used, because they’re generated on your server.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Conclusion
&lt;/h3&gt;

&lt;p&gt;Though there are a few limitations for some use cases when you want to take it to production, but the experiment is successful. I will list down what I did achieve:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The overall speed of file exploration by data engineers and stewards increased upto &lt;strong&gt;1.5x,&lt;/strong&gt; as the listing was easy for them and they can group files on the basis of regex pattern which is not very easy in the case of direct S3 exploration (&lt;a href="https://arglee.medium.com/demystifying-metadata-management-part-1-cd86ee78228a#:~:text=Data%20Steward%20%26%20Data%20Analyst%20%26%20Data%20Scientist%3A" rel="noopener noreferrer"&gt;&lt;em&gt;Read more about data Engineer vs Data Stewards here&lt;/em&gt;&lt;/a&gt;).&lt;/li&gt;
&lt;li&gt;The overall speed of parsing files increased by &lt;strong&gt;2.5x&lt;/strong&gt; , as the listing can be avoided during parsing and parsers can be scaled by pre-determined scaling factor (on the basis of #files).&lt;/li&gt;
&lt;li&gt;Better &lt;a href="https://arglee.medium.com/demystifying-metadata-management-part-1-cd86ee78228a#:~:text=Blog%20by%20Dataedo-,Data%20Democratization%3A,-Empowering%20employees%20and" rel="noopener noreferrer"&gt;Data Democratization&lt;/a&gt; for the organization by enabling rich searching over data.&lt;/li&gt;
&lt;li&gt;… and many more.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;[Writers Corner]&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Data Platform and analytics is a basic entity not only for IT but also for non-IT companies and object storage is one of the most common attributes of a Data Platform. Keeping object storage healthy(un-messy) should be taken care with the highest priority.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>dataingestionplatfor</category>
      <category>bigdata</category>
      <category>awss3withpython</category>
      <category>aws</category>
    </item>
    <item>
      <title>Demystifying Metadata Management — Part 1</title>
      <dc:creator>Ashish Mishra</dc:creator>
      <pubDate>Tue, 17 Jan 2023 10:27:02 +0000</pubDate>
      <link>https://dev.to/arglee/demystifying-metadata-management-part-1-1hmd</link>
      <guid>https://dev.to/arglee/demystifying-metadata-management-part-1-1hmd</guid>
      <description>&lt;h3&gt;
  
  
  Demystifying Metadata Management — Part 1
&lt;/h3&gt;

&lt;p&gt;Metadata Management provides a base for an organization’s Data Platform Architecture. Let’s understand each component and its role in metadata Management.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--m7m7F0Q6--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn-images-1.medium.com/max/1024/1%2AM4hqmXco3kRYXUX7ewfZsg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--m7m7F0Q6--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn-images-1.medium.com/max/1024/1%2AM4hqmXco3kRYXUX7ewfZsg.png" alt="" width="800" height="430"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Image courtesy infopulse.com&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Data:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Data is a collection of raw and unorganized facts that can be used in calculating, reasoning or planning. Without proper processing and organizing, it is useless. That’s where metadata comes into play.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Good read on Data:&lt;/em&gt; &lt;a href="https://dataedo.com/blog/data-vs-metadata"&gt;&lt;em&gt;Blog by Dataedo&lt;/em&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--F2qnLhsI--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn-images-1.medium.com/max/1024/1%2AV7AgJk1qJYTyNgLU0aS44Q.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--F2qnLhsI--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn-images-1.medium.com/max/1024/1%2AV7AgJk1qJYTyNgLU0aS44Q.png" alt="" width="800" height="852"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Image Courtesy: Dataedo by &lt;a class="mentioned-user" href="https://dev.to/piotr"&gt;@piotr&lt;/a&gt; kononow&lt;/em&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;MetaData:&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Metadata is simply data about data. It means it is a description and context of the data. It helps to organize, find and understand data, through information such as format, origin, creation date, modification date, etc.&lt;/p&gt;

&lt;p&gt;Data stores information, but if you don’t know how to interpret it, you don’t have access to this information. Metadata enables you to understand data and extract the information.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Metadata, you see, is really a love note — it might be to yourself, but in fact it’s a love note to the person after you, or the machine after you, where you’ve saved someone that amount of time to find something by telling them what this thing is.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Cit.&lt;/em&gt; &lt;a href="http://ascii.textfiles.com/archives/3181"&gt;&lt;em&gt;Jason Scott’s Weblog&lt;/em&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--xvHhuVVf--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn-images-1.medium.com/max/1024/1%2AAzhWcFKZSTy_OGHKhulb9g.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--xvHhuVVf--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn-images-1.medium.com/max/1024/1%2AAzhWcFKZSTy_OGHKhulb9g.png" alt="" width="800" height="393"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Image Courtesy: ontotext.com&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Good read on metadata:&lt;/em&gt; &lt;a href="https://dataedo.com/blog/data-vs-metadata"&gt;&lt;em&gt;Blog by Dataedo&lt;/em&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Data Democratization:&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Empowering employees and stakeholders of an organization with the right set of tools that enables them to make informed decisions.&lt;/p&gt;

&lt;p&gt;Data democratization is the &lt;em&gt;ongoing process&lt;/em&gt; of enabling everybody in an organization, irrespective of their technical knowledge — how, to &lt;em&gt;work with data&lt;/em&gt; &lt;em&gt;comfortably&lt;/em&gt;, to feel &lt;em&gt;confident talking about it&lt;/em&gt;, and as a result, &lt;em&gt;make data-informed decisions&lt;/em&gt; and &lt;em&gt;build customer experiences powered by data.&lt;/em&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Data Democraatization have answers to questions like:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;“Experts in my company are too busy to help me”.&lt;/p&gt;

&lt;p&gt;“I do not have access to data”&lt;/p&gt;

&lt;p&gt;“I can not trust the data”.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Data democratizaton is an ongoing process and need cultural shift because it depends on ongoing process called &lt;em&gt;Data Literacy.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--mytuU7-6--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn-images-1.medium.com/max/1024/1%2A5lXSSIK9g_x1D8mS7n8bYw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--mytuU7-6--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn-images-1.medium.com/max/1024/1%2A5lXSSIK9g_x1D8mS7n8bYw.png" alt="" width="800" height="466"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Image Courtesy: Arpit Choudhury from his medium blog&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Good read on Data Democratization&lt;/em&gt;: &lt;a href="https://towardsdatascience.com/what-the-heck-is-data-democratization-39b86eb27aa6"&gt;&lt;em&gt;Blog by Towards datascience&lt;/em&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Data Literacy:&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;The ability to &lt;em&gt;read, analyze, work&lt;/em&gt; and &lt;em&gt;communicate&lt;/em&gt; with data — known as data literacy — is now so critical to companies that it has been hailed as the second language of business by &lt;a href="https://www.gartner.com/smarterwithgartner/a-data-and-analytics-leaders-guide-to-data-literacy#:~:text=Gartner%20defines%20data%20literacy%20as,case%2C%20application%20and%20resulting%20value."&gt;Gartner&lt;/a&gt;. The global pandemic highlighted its importance, with many companies starting to rely on data to detect new patterns, respond to changing customer behavior and make first-of-a-kind decisions in a new environment of many unknown factors.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Poor data literacy is ranked as the second-biggest internal roadblock to the success of the CDO’s office, according to the Gartner Annual Chief Data Officer Survey.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;In upcoming years, data literacy will become essential in driving business value, demonstrated by its formal inclusion in over 80% of data and analytics strategies and change management programs.&lt;/p&gt;

&lt;p&gt;One common misconception about Data Democratization and Literacy is that now everyone in the compaby will know everything related to the data and get you details about data in no time and there will be no need for &lt;em&gt;Subject Matter Expert&lt;/em&gt; or &lt;em&gt;Data Architect&lt;/em&gt;. This is not true.&lt;/p&gt;

&lt;p&gt;Data Literacy and Democratiaztion provides way to be independent and able to complete tasks and take company to the right direction and have no place for presumption.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Good read on Data Literacy:&lt;/em&gt; &lt;a href="https://thedataliteracyproject.org/files/downloads/The%20Seven%20Principles%20of%20Data%20Literacy%20by%20Qlik%20and%20Accenture.pdf"&gt;&lt;em&gt;Blog by thedataliteracyproject&lt;/em&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--eCxTkJI---/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn-images-1.medium.com/max/1024/1%2AnWPDxu1IOTQ83S6fHxBepg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--eCxTkJI---/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn-images-1.medium.com/max/1024/1%2AnWPDxu1IOTQ83S6fHxBepg.png" alt="" width="800" height="892"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Image Courtesy: Dataedo by &lt;a class="mentioned-user" href="https://dev.to/piotr"&gt;@piotr&lt;/a&gt; kononow&lt;/em&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Data Architect &amp;amp; Data Engineer:
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://www.striim.com/blog/data-architect-vs-data-engineer-an-overview-of-two-in-demand-roles/#:~:text=The%20data%20architect%20and%20data%20engineer%20titles%20are%20closely%20related,responsible%20for%20creating%20that%20vision."&gt;The data architect and data engineer titles&lt;/a&gt; are closely related and, as such, frequently confused. The difference in both roles lies in their primary responsibilities.&lt;/p&gt;

&lt;p&gt;Data architects design the vision and blueprint of the organization’s data framework, while the data engineer is responsible for creating that vision.&lt;/p&gt;

&lt;p&gt;Data architects provide technical expertise and guide data teams on bringing business requirements to life; data engineers ensure data is readily available, secure, and accessible to stakeholders (data scientists, data analysts) when they need it.&lt;/p&gt;

&lt;p&gt;Data architects have substantial experience in data modeling, data integration, and data design and are often experienced in other data roles; data engineers have a strong foundation in programming with software engineering experience.&lt;/p&gt;

&lt;p&gt;The data architect and the data engineer work together to build the organization’s data system.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Good read on Data Architect vs Data Engineer:&lt;/em&gt; &lt;a href="https://rstak.medium.com/data-science-vs-data-engineering-vs-data-architecture-3a05785f7f48"&gt;&lt;em&gt;Blog by rsTask&lt;/em&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--HhPaBG94--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn-images-1.medium.com/max/1024/1%2A4EewBA3kzi8hnQOvQSMd9w.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--HhPaBG94--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn-images-1.medium.com/max/1024/1%2A4EewBA3kzi8hnQOvQSMd9w.png" alt="" width="800" height="451"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Image Courtesy: Arun Elangovan&lt;/em&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Data Steward &amp;amp; Data Analyst &amp;amp; Data Scientist:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;&lt;em&gt;Data Analyst&lt;/em&gt;&lt;/strong&gt; gather data from various databases and warehouses, filter and clean it. &lt;strong&gt;&lt;em&gt;Data Scientist&lt;/em&gt;&lt;/strong&gt; perform ad-hoc data mining and gather large sets of structured and unstructured data from several sources.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;em&gt;Data Analyst&lt;/em&gt;&lt;/strong&gt; write complex SQL queries and scripts to collect, store, manipulate, and retrieve data from RDBMS such as MS SQL Server, Oracle DB, and MySQL. &lt;strong&gt;&lt;em&gt;Data Scientist&lt;/em&gt;&lt;/strong&gt; use various statistical methods, data visualization techniques to design and evaluate advanced statistical models from vast volumes of data.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;em&gt;Data Analyst&lt;/em&gt;&lt;/strong&gt; create different reports with the help of charts and graphs using Excel and BI tools. &lt;strong&gt;&lt;em&gt;Data Scientist&lt;/em&gt;&lt;/strong&gt; Build AI models using various algorithms and in-built libraries.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;em&gt;Data Analyst s&lt;/em&gt;&lt;/strong&gt; pot trends and patterns from complex datasets. &lt;strong&gt;&lt;em&gt;Data Scientist&lt;/em&gt;&lt;/strong&gt; Automate tedious tasks and generate insights using machine learning models.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;At high level, Data Steward handles day to day operations on policeis created by either Data Architect.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--tD-jY090--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn-images-1.medium.com/max/866/0%2ALNH7cHTprLTsjN4s.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--tD-jY090--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn-images-1.medium.com/max/866/0%2ALNH7cHTprLTsjN4s.png" alt="" width="800" height="248"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Data Engineers are the Bridge by Jennifer Shalamanov&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;The data steward is the “go-to” guy for everyone working with data within the company. Typical data steward roles and responsibilities can be grouped as:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Operational Oversight — a data steward oversees the lifecycle of a data set. They are responsible for defining and implementing rules and regulations for the day-to-day operational and administrative management of data and systems.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.simplilearn.com/data-quality-article"&gt;Data Quality&lt;/a&gt; — data steward responsibilities include establishing data quality metrics and requirements, like setting acceptable values, ranges, and parameters for every data element.&lt;/li&gt;
&lt;li&gt;Privacy, Security, and Risk Management — data protection is a key aspect of data steward responsibilities. A steward must establish regulations and conventions that govern data proliferation to ensure that data privacy controls are exercised in all processes.&lt;/li&gt;
&lt;li&gt;Policies and Procedures — data stewards, also establish policies and procedures for data access, including authorization criteria based on any individual and/or the role.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;em&gt;Good read on Data Steward vs Data Analyst:&lt;/em&gt; &lt;a href="https://www.simplilearn.com/what-is-data-stewardship-article#:~:text=Data%20Analyst%3A%20How%20the%20Two,patterns%2C%20and%20predict%20future%20results."&gt;&lt;em&gt;Blog by Simplilearn&lt;/em&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Data Warehouse &amp;amp; Data Lake &amp;amp; Data Mart:&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Data warehouse (DW)&lt;/strong&gt; is a system for aggregating data from connected databases — and then transforming and storing it in an analytics-ready state. The main benefits of a data warehouse are effective data consolidation, fast pre-processing, and easy self-access for business users. &lt;em&gt;The key constraint of using a data warehouse solution is the need to pre-transform all data using standard schemas. This increases the usage costs and reduces scalability potential.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Data warehouse solutions:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Azure Synapse Analytics&lt;/li&gt;
&lt;li&gt;Amazon Redshift&lt;/li&gt;
&lt;li&gt;Google BigQuery&lt;/li&gt;
&lt;li&gt;Snowflake&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--aJ2Q4zDa--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn-images-1.medium.com/max/772/1%2AA7BOcfgiLJeqqfAUXa4q1A.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--aJ2Q4zDa--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn-images-1.medium.com/max/772/1%2AA7BOcfgiLJeqqfAUXa4q1A.png" alt="" width="772" height="756"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Image Courtesy: Dataedo by &lt;a class="mentioned-user" href="https://dev.to/piotr"&gt;@piotr&lt;/a&gt; kononow&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Data lake&lt;/strong&gt; is a centralized cloud-based repository for storing raw (unprocessed, non-cataloged, or pre-cleansed) data from various systems. Unlike DWHs, data lake technology allows storing both structured and unstructured data of any size (as object blobs or files). Cloud data lakes are also more scalable and support more querying methods for data retrieval and analysis — a factor data scientists well appreciate.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Data lake solutions:&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Azure Data Lake&lt;/li&gt;
&lt;li&gt;Amazon S3&lt;/li&gt;
&lt;li&gt;Apache Hadoop&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Data Mart&lt;/strong&gt; is more focused subset of data present in Data Warehouse. It generally concerned with a single team of department like finance, marketing, or sales. It is smaller, more focused, and may contain summaries of data that best serve its community of users. A data mart might be a portion of a data warehouse, too.&lt;/p&gt;

&lt;p&gt;Data Mart has few benefits over giving access to fuill warehouse to all the departments:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Cost-efficiency&lt;/li&gt;
&lt;li&gt;Simplified data access&lt;/li&gt;
&lt;li&gt;Quicker access to insights&lt;/li&gt;
&lt;li&gt;Simpler data maintenance&lt;/li&gt;
&lt;li&gt;Easier and faster implementation&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;em&gt;Good read on Data Warehouse vs DataLake:&lt;/em&gt; &lt;a href="https://aws.amazon.com/data-warehouse/"&gt;&lt;em&gt;Blog by AWS&lt;/em&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Conclusion:
&lt;/h3&gt;

&lt;p&gt;This is the first part of series on metadata management. This part will help in building conceptual blocks of metadata management.&lt;/p&gt;

&lt;p&gt;Please stay tuned for more parts of the series where we will discuss metadata management in detail and will also take one example of an organization to create metadata management for an example organization.&lt;/p&gt;

&lt;p&gt;Please comment if you guys want me to focus on metadata management of any specific industry like E-Commerce, Healthcare, or Offline retail.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Keep Learning:&lt;/strong&gt; Please refer here for part of the &lt;a href="https://medium.com/@arglee/demystifying-metadata-management-part-2-378434352bdb"&gt;&lt;em&gt;Demystifying Metadata Management — Part 2&lt;/em&gt;&lt;/a&gt;&lt;em&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>bigdataplatform</category>
      <category>datawarehousesolutio</category>
      <category>datalake</category>
      <category>metadatamanagement</category>
    </item>
    <item>
      <title>Name Matching Techniques: Useful Algorithms, Their Problems, &amp; Absolute Solutions</title>
      <dc:creator>Ashish Mishra</dc:creator>
      <pubDate>Mon, 02 Jan 2023 07:59:44 +0000</pubDate>
      <link>https://dev.to/arglee/name-matching-techniques-useful-algorithms-their-problems-absolute-solutions-1lb5</link>
      <guid>https://dev.to/arglee/name-matching-techniques-useful-algorithms-their-problems-absolute-solutions-1lb5</guid>
      <description>&lt;p&gt;A concise guide to &lt;em&gt;Names &amp;amp; Text Matching Algorithms&lt;/em&gt; available and right way to decide the best algorithm on the basis of use case.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F976%2F0%2Avsd2Vkmqfc64hOxC" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F976%2F0%2Avsd2Vkmqfc64hOxC" width="976" height="607"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Image courtesy of &lt;a href="https://undraw.co/" rel="noopener noreferrer"&gt;https://undraw.co/&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  What is a name-matching problem?
&lt;/h3&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;Data is the new Oil, Analytics is the Refinery and Intelligence is the Gasoline which drives the Growth.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Tiffani Bova&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Simple yet very preeminent quotation. If you look closely at the above quotation you will find absolutely each organization in the world independent of their size or location working only to achieve this goal. I you look more in-depth, you will find this is made up of 3 entities &lt;em&gt;DATA, ANALYTICS, and INTELLIGENCE.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;There is no Growth without Intelligence and there is no intelligence without analytics and there is no Analytics without Data.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fv70flqz7qhxcy3o2oqmy.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fv70flqz7qhxcy3o2oqmy.png" width="581" height="81"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now that we know Data is the basic need for any organization and the Internet is the most common source of data. Let’s deep dive into the name-matching problem.&lt;/p&gt;

&lt;p&gt;The Internet is overloaded with data, and there are numerous ways an organization can get data from multiple entities. Data is nothing but a resource for an organization but data without proper identification (Consistency and Integrity) will very soon turn into a liability if not nurtured properly.&lt;/p&gt;

&lt;p&gt;Here Nurturing is nothing but combining this data with the right demographics(Person Names, ages, contacts, etc.). If an Organization has data without proper consistency then it might show wrong metrics which can lead the organization to bad decisions.&lt;/p&gt;

&lt;p&gt;Name matching is important to identify a person’s behavior daily, weekly or occasionally.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;For Example&lt;/strong&gt; , A person looks for shoes during 8–9PM every 150 days using social media advertisements with the exception that he also goes shoe shopping around 10–15 days before Christmas using multiple search engines and e-commerce websites. This information can be used to target the right set of customers at right time.&lt;/p&gt;

&lt;p&gt;If an Organization fails to identify the same person on multiple browsers or multiple social media or e-commerce platforms then it might lose out on some sales and capital on digital marketing.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqv1qnpamhl6ne5fdhdeh.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqv1qnpamhl6ne5fdhdeh.png" width="576" height="754"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Overwheming Information available on Internet&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;A lot of organizations are involved in mining demographic information from across the applications like e-mail, customer or patient records, news articles, and business or political memorandums that they might have received.&lt;/p&gt;

&lt;h3&gt;
  
  
  Sources of name or text variation
&lt;/h3&gt;

&lt;p&gt;By Now we have an understanding of:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Why Data is important for an Organization!&lt;/li&gt;
&lt;li&gt;What is a name-matching problem and Why this is important for an Organization!&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Hence, we will move next phase to understand where is the origin of this problem. Is there a way to identify the source so we can apply our algorithm on the basis of the source?&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;For Example,&lt;/strong&gt; If Data is coming from a third-party application form where the limitation of name length is 20 letters then all the names which are of length 20 words, might be looked for abbreviations or as pruned data and can be handled accordingly and will not go for other costly algorithms. These few techniques could definitely save a significant amount of time and dollars.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F3027lbdfb5rv4sr4rwba.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F3027lbdfb5rv4sr4rwba.png" width="711" height="476"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;These are a few examples that will help you identify the cases for your organization and will help you apply the right algorithm for the right problem.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Handwritten OCR&lt;/strong&gt; : &lt;em&gt;q and g&lt;/em&gt; or _m and rn_can be misrepresented as similar.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Manual Keyboard Data Entry or Over Phone:&lt;/strong&gt; Neighbouring keyboard keys like &lt;em&gt;n and m&lt;/em&gt; or &lt;em&gt;e and r.&lt;/em&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Limitation of maximum length allowed:&lt;/strong&gt; The input field force people to use abbreviations or initials only.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Deliberately provide a modified name:&lt;/strong&gt; Faith on the organization or to avoid public data.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Different Demographics:&lt;/strong&gt; The data entry persona does not know the right format for other demographics. Like some sitting in US can put the wrong spelling for Indian or Spanish names.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These are basic examples where an entity(End-user or Data entry professional) can create multiple variations of names for the same organization or data retrieved from multiple organizations.&lt;/p&gt;

&lt;h3&gt;
  
  
  Type and Examples of different referential / demographic data
&lt;/h3&gt;

&lt;p&gt;Let’s take a few more examples where spelling mistakes or phonetic name variation could occur.&lt;/p&gt;

&lt;p&gt;One of the most important parts of making analytics score better is to standardize &lt;em&gt;referential data&lt;/em&gt;* which includes names and addresses. If we look only into the above-mentioned problem then we can divide the matching problem into two categories.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7qmbvv68ken7golh7w9k.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7qmbvv68ken7golh7w9k.png" width="800" height="387"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Name Matching
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Persona Names Matching:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;While there is only one correct spelling for many words, there are often several valid spelling variations for personal names. Examples:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;em&gt;NickName&lt;/em&gt; like &lt;em&gt;'Bill' rather than 'William'&lt;/em&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;Phonetically Similar&lt;/em&gt; like &lt;em&gt;'Gail', 'Gale' and 'Gayle'&lt;/em&gt;
&lt;/li&gt;
&lt;li&gt;Personal names sometimes change over time, After marriage or religion change.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Company Names Matching:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;em&gt;Abbreviations&lt;/em&gt; like &lt;em&gt;LTD, Ltd, Limited&lt;/em&gt; or &lt;em&gt;Corp, Corporation&lt;/em&gt; or &lt;em&gt;IBM and International Business Machine&lt;/em&gt; can be used interchangeably across documents&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;Typographical&lt;/em&gt; Errors like &lt;em&gt;Oracle and Orcle&lt;/em&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;Omissions&lt;/em&gt; like &lt;em&gt;Goyal &amp;amp; Sons and Goyals&lt;/em&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Product Name Matching:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Canon PowerShot a20IS”, “NEW powershot A20 IS from Canon” and “Digital Camera Canon PS A20IS” should all match “Canon PowerShot A20 IS”&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Text Matching:
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Address Matching:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;134 Ashewood Walk, Summerhill Lane, Portlaoise&lt;/li&gt;
&lt;li&gt;134 Summerhill Ln, Ashewood Walk, Summerhill, Portlaoise, Co. Laois, R32 C52X, Ireland&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Product review and NLP fuzzy matching&lt;/strong&gt; : Product reviews can be confusing due to very similar product names or review text do not have very clear picture. Example:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;John Snow&lt;/strong&gt; : What’s so fuzzy about this?&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Danny&lt;/strong&gt; : I think it was a good fuzz.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Similarly, there could be multiple other such examples where name or text matching can create a huge difference,s and collating all those information is very crucial.&lt;/p&gt;

&lt;h3&gt;
  
  
  Why Name matching is so hard
&lt;/h3&gt;

&lt;p&gt;By Now we have an understanding of&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Why Data is important for an Organization!&lt;/li&gt;
&lt;li&gt;What is name-matching problem and Why this is important for an Organization!&lt;/li&gt;
&lt;li&gt;Sources and examples of multiple name variations&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Now, let’s understand, why name matching is so hard and most companies are still not able to figure out the solution with 100% match score.&lt;/p&gt;

&lt;p&gt;Names are heavily influenced by people’s cultural backgrounds and first names, middle names, and last names can be represented in different ways.&lt;/p&gt;

&lt;p&gt;Names are often recorded with different spellings, and applying exact matching leads to poor results. The most common cases that I can come up with are:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Spelling Errors(80%)&lt;/li&gt;
&lt;li&gt;Spelling Variation: ‘O’Connor’, ‘OConnor’ and ‘O Connor’&lt;/li&gt;
&lt;li&gt;Phonetical Similarity: Gail &amp;amp; Galye&lt;/li&gt;
&lt;li&gt;Tina Smith might be recorded as ‘Christine J. Smith’ and as ‘C.J.Smith-Miller’&lt;/li&gt;
&lt;li&gt;Short forms: Like ‘BOB for Robert, or ‘Liz’ for Elizabeth&lt;/li&gt;
&lt;li&gt;Some European countries favour compound. ‘Hans-Peter’ or ‘Jean-Pierre’&lt;/li&gt;
&lt;li&gt;Hispanic and Arabic names can contain more than two surnames.&lt;/li&gt;
&lt;li&gt;Record Linkage, where record contains more than just names&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These examples show why name matching problem is so hard, though there are multiple ways to resolve the issues. Let’s discuss those techniques in detail.&lt;/p&gt;

&lt;h3&gt;
  
  
  Name Matching Techniques
&lt;/h3&gt;

&lt;p&gt;By now, we understood the source of different names and their complexities. To improve the matching accuracy, many different techniques for approximate name matching have been developed in the four decades and new techniques are still being invented.&lt;/p&gt;

&lt;p&gt;Most of the solutions are based on the pattern, phonetic, or combinations of these two approaches.&lt;/p&gt;

&lt;p&gt;In this document, we will discuss each approach on a very high level, but I will add more blogs for detailing each technique in detail.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Please Note&lt;/strong&gt; : &lt;em&gt;The description for the algorithm has been reduced delibrately to avoid length of blog, There are seperate blogs for each algorithm.&lt;/em&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Phonetic Encoding:
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;1. Soundex:&lt;/strong&gt; It keeps the first letter in a string and converts the rest into numbers using below mapping/encoding table.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;For example&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwy17f2tnkymyio3qppyd.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwy17f2tnkymyio3qppyd.png" width="390" height="242"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Phonex:&lt;/strong&gt; It is a variation of Soundex that tries to improve the encoding quality by pre-processing names according to their English pronunciation before the encoding&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;3. Phonix:&lt;/strong&gt; This encoding goes a step further than phonex and applies more than one hundred transformation rules on groups of letters before encoding on the basis of the below encoding table. This algorithm is slow comparatively due to large number of transformations.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1g12blpdfnm6imlhg8q5.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1g12blpdfnm6imlhg8q5.png" width="344" height="256"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. NYSIIS:&lt;/strong&gt; (The &lt;em&gt;New York State Identification Intelligence System&lt;/em&gt;) It is based on transformation rules similar to Phonex and Phonix, but it returns a code that is only made of letters.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;5. Double Metaphone:&lt;/strong&gt; Specialized in European and Asian names. &lt;strong&gt;For example&lt;/strong&gt; &lt;em&gt;‘kuczewski’ will be encoded as ‘ssk’ and ‘xfsk’&lt;/em&gt;, accounting for different spelling variations.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;6. Fuzzy Soundex:&lt;/strong&gt; It is based q-gram substitution. Fuzzy Soundex technique is combined with a q-gram based pattern matching algorithm, and accuracy results better than Soundex.&lt;/p&gt;

&lt;p&gt;Below table shows how diffrent algorithm will create encoding for same word.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2gnt36fx8n30twkdyy9x.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2gnt36fx8n30twkdyy9x.png" width="558" height="258"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Pattern Matching:
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Levenstein or Edit Distance:&lt;/strong&gt; The smallest number of edit operations (insertions, deletions, and substitutions) required to change one string into another.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Damerau-Levenstein Distance:&lt;/strong&gt; measuring the difference between two sequences. It is a variant of the Levenshtein distance, with the addition of a provision for the transposition of two adjacent characters. The Damerau-Levenshtein distance between two strings is the minimum number of operations (consisting of insertions, deletions, substitutions, and transpositions of two adjacent characters) required to transform one string into the other&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Bag Distance:&lt;/strong&gt; The bag distance algorithm compares two sets of items, and calculates the distance between them as the number of items that are present in one set but not the other. It is a simple and fast algorithm, but it does not take into account the order or frequency of the items in the sets.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Simth-Waterman:&lt;/strong&gt; is a dynamic programming algorithm used for local sequence alignment. It is used to align two sequences in a way that maximizes the number of matching characters while allowing for the insertion of gaps to optimize the alignment. It was originally developed to find optimal alignments between biological sequences, like DNA or proteins.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Longest common sub-string (LCS):&lt;/strong&gt; The longest common substring (LCS) is a string that is common to two or more strings and is the longest string that is a substring of all the strings. It is used to find the similarities between two or more strings and is often used in text comparison, data mining, and natural language processing. There are various algorithms for finding the LCS, including dynamic programming and suffix trees.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Q-grams&lt;/strong&gt; : The Q-gram algorithm is a method for comparing strings by breaking them down into fixed-length substrings, or “grams”, and comparing the set of grams for each string. It is a fast and simple algorithm, but it can be less accurate than other methods, as it does not take into account the order of the grams or the distances between them. Q-grams are often used in spelling correction, text search, and information retrieval.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Positional Q-grams&lt;/strong&gt; : Positional Q-grams is a variant of the Q-gram algorithm that takes into account the position of the grams within the string. It is used for comparing strings by breaking them down into fixed-length substrings and comparing the set of grams for each string, while also considering the positions of the grams in the original string. Positional Q-grams can be more accurate than regular Q-grams, as it takes into account the order of the grams within the string. It is often used in information retrieval and natural language processing.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Skip-grams&lt;/strong&gt; : skip-grams was developed as an experiment on multi-lingual texts from different European languages and show improved results compared to bigrams, trigrams, edit distance, and the longest common sub-string technique.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Compression&lt;/strong&gt; : Compression matching is a method for comparing strings by comparing their compressed representations. The idea is that strings that are similar will compress to a smaller size than strings that are dissimilar. To perform compression matching, the strings are first compressed using a lossless compression algorithm, such as gzip or bzip2. The compressed representations of the strings are then compared using a string distance metric, such as the Levenshtein distance or the Jaccard coefficient. Compression matching can be an effective way to compare strings, especially for large strings or datasets. However, it can be computationally expensive, as it requires the strings to be compressed and decompressed.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Jaro&lt;/strong&gt; : The Jaro algorithm is commonly used for name matching in data linkage systems. It accounts for insertions, deletions, and transpositions. The algorithm calculates the number c of common characters (agreeing on characters that are within half the length of the longer string) and the number of transpositions.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Winkler&lt;/strong&gt; : The Winkler algorithm improves upon the Jaro algorithm by applying ideas based on empirical studies which found that fewer errors typically occur at the beginning of names. The Winkler algorithm, therefore, increases the Jaro similarity measure for agreeing on initial characters (up to four)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Sorted-Winkler&lt;/strong&gt; : If a string contains more than one word (i.e. it contains at least one whitespace or other separators), then the words are first sorted alphabetically before the Winkler technique is applied (to the full strings). The idea is that (unless there are errors in the first few letters of a word) sorting of swapped words will bring them into the same order, thereby improving the matching quality.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Permuted-Winkler&lt;/strong&gt; : In this more complex approach Winkler comparisons are performed over all possible permutations of words, and the maximum of all calculated similarity values is returned.&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Combined Techniques:
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Editex&lt;/strong&gt; : Aim at improving phonetic matching accuracy by combining edit distance-based methods with the letter-grouping techniques of Soundex and Phonix. The edit costs in Editex are 0 if two letters are the same, 1 if they are in the same letter group, and 2 otherwise. Comparison experiments in [34] showed that Editex performed better than edit distance, q-grams, Phonix, and Soundex on a large database containing around 30,000 surnames. Similar to basic edit distance, the time and space com-&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Syllable alignment distance&lt;/strong&gt; : This recently developed technique, called &lt;em&gt;Syllable Alignment Pattern Searching (SAPS)&lt;/em&gt; [13] is based on the idea of matching two names syllable by syllable, rather than character by character. It uses the Phonix transformation (without the final numerical encoding phase) as a preprocessing step, and then applies a set of rules to find the beginning of syllables. An edit distance based approach is used to find the distance be- tween two strings.&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Problem with current Techniques
&lt;/h3&gt;

&lt;p&gt;We have discussed the characteristics of personal names and the potential sources of variations and errors in them, and we presented an overview of both pattern-matching and phonetical encoding-based name matching techniques. Experimental results on different real data sets have shown that there is no single best technique available. The characteristics of the name data to be matched, as well as computational requirements, have to be considered when selecting a name-matching technique.&lt;/p&gt;

&lt;h3&gt;
  
  
  How Python or Databases can be utilized
&lt;/h3&gt;

&lt;p&gt;Python also has a lot of phenomenal libraries created by a lot of good developers. A few libraries are worth looking for:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;The Fuzz&lt;/li&gt;
&lt;li&gt;hnmi&lt;/li&gt;
&lt;li&gt;Fuzzy-wuzzy&lt;/li&gt;
&lt;li&gt;Namematcher&lt;/li&gt;
&lt;li&gt;dedupe&lt;/li&gt;
&lt;li&gt;TF-IDF Vectorizer scikit-learn&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Not only python but other languages also have similar libraries which can provide the in-built functionality and which can save a few lines of complex code.&lt;/p&gt;

&lt;p&gt;Some databases also provide some in-built matching functionalities which can definitely save some network bandwidth in your production system.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Jaro-Winkler by Snowflake&lt;/li&gt;
&lt;li&gt;Jaccard Index by Snowflake&lt;/li&gt;
&lt;li&gt;Edit Distance by Snowflake&lt;/li&gt;
&lt;li&gt;Levenstein by Postgres&lt;/li&gt;
&lt;li&gt;Trigrams by Postgres&lt;/li&gt;
&lt;li&gt;AWS + Azure in-built Machine Learning&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Conclusion
&lt;/h3&gt;

&lt;p&gt;Personal name matching is very challenging, and more research into the characteristics of both name data and matching techniques has to be conducted in order to better understand why certain techniques perform better than others, and which techniques are most suitable for what type of data. A more detailed analysis of the types and distributions of errors is needed to better understand how certain types of errors influence the performance of matching techniques.&lt;/p&gt;

&lt;p&gt;I hope you have learned something new today and please stay tuned for more such blogs. In near future, I have planned to add more detailed documentation for each of the algorithms where we will not only discuss each algorithm in detail with examples but also discuss their implementation and some real-time production use case that I have been involved.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;References and Courtesy:&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;The Australian National University(TR-CS-06–02) by Peter Christen&lt;/li&gt;
&lt;li&gt;&lt;a href="https://undraw.co/" rel="noopener noreferrer"&gt;https://undraw.co/&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Appendix&lt;/strong&gt; :&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Originally published at&lt;/em&gt; &lt;a href="https://singlequote.blog/name-matching-techniques-useful-algorithms-their-problems-absolute-solutions/" rel="noopener noreferrer"&gt;&lt;em&gt;https://singlequote.blog&lt;/em&gt;&lt;/a&gt; &lt;em&gt;on January 2, 2023.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>namematching</category>
      <category>phonetics</category>
      <category>soundex</category>
      <category>algorithms</category>
    </item>
  </channel>
</rss>
