<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by kipi.ai on Medium]]></title>
        <description><![CDATA[Stories by kipi.ai on Medium]]></description>
        <link>https://medium.com/@kipi.ai?source=rss-c198416d197a------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*MDtk98hYom5dBbKlTj3yWA.png</url>
            <title>Stories by kipi.ai on Medium</title>
            <link>https://medium.com/@kipi.ai?source=rss-c198416d197a------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 27 Nov 2026 20:35:38 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@kipi.ai/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Does Your Organization Need Tableau Prep?]]></title>
            <link>https://medium.com/@kipi.ai/does-your-organization-need-tableau-prep-ca0e5b0adbe3?source=rss-c198416d197a------2</link>
            <guid isPermaLink="false">https://medium.com/p/ca0e5b0adbe3</guid>
            <category><![CDATA[tableau]]></category>
            <category><![CDATA[tableau-prep]]></category>
            <category><![CDATA[tech-tutorials]]></category>
            <dc:creator><![CDATA[kipi.ai]]></dc:creator>
            <pubDate>Mon, 05 Jun 2023 18:56:57 GMT</pubDate>
            <atom:updated>2023-06-05T18:56:57.166Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Author: Srutimala Deka</strong></p><p><strong>What is Tableau Prep?</strong></p><p><strong>From the Official </strong><a href="https://help.tableau.com/current/prep/en-us/prep_about.htm"><strong>documentation</strong></a><strong>.</strong></p><p><em>Tableau Prep is a tool in the Tableau product suite designed to make preparing your data easy and intuitive. Use Tableau Prep Builder to combine, shape, and clean your data for analysis in Tableau.</em></p><p><strong>Tableau Prep capabilities include:</strong></p><ul><li>Data pre-processing</li><li>Integrating programming scripts</li><li>Creating reusable flows</li><li>Publishing flows and scheduling it</li><li>Editing flows right in the web with Creator License</li></ul><p>Now, Tableau Desktop allows some data preparation steps with limitations. Most importantly, it wasn’t designed for data wrangling and shaping. It is purely a visualization tool with the ease of drag and drop feature.</p><p><strong>When to use Tableau Prep?</strong></p><p>When the data source has more dirty data than clean data, the data requires text manipulations before it is usable, or has data that is not monitored for correctness, etc., then it needs to go through a set of preparation steps as defined by its end use.</p><p>Use the checklist below to determine if your organization would benefit from creating flows in Tableau Prep before the data is used for visual analyses.</p><ul><li>The shape of the data in the source is different from the shape it needs to be in for visualization. In Tableau Prep Builder, we can reshape the data and fill up nulls as required to be used directly in charts. It will not affect the data source and is custom-made for the analysis.</li><li>Data requires complex calculations which are too elaborate for Tableau Desktop or need programmatic scripts like Python. Some calculations in Tableau can benefit from high-level languages that make logics simpler to write; for example, replace multiple LODs in Tableau Desktop with a single line of code in Python using TabPy Server (see <a href="https://help.tableau.com/current/prep/en-us/prep_scripts_TabPy.htm">here</a>).</li><li>Tableau Workbooks are slow. Sometimes the simplest analysis will demand multiple calculations in Tableau purely due to the nature of the data in the source. For example, an index column being absent in the data will prevent Tableau optimization from performing at its best. The data can be prepared accordingly in Tableau Prep prior to creating the visualization (see <a href="https://community.tableau.com/s/question/0D54T000016hVVQSA2/hiis-it-possible-to-add-a-new-column-not-a-calculated-field-in-tableau-or-tableau-prep-with-a-record-id-i-need-a-unique-identifier-a-primary-key-for-each-row-of-my-data-that-doesnt-changerobyn">more</a>.)</li><li>Text manipulations. Text or string manipulations are always expensive in Tableau and best handled within the Data source or in Tableau Prep. For example, splitting a field into x parts and joining it with another column to create a new field within Tableau Prep.</li><li>KPIs that need to be reused or standardized. Tableau Prep allows not only data democratization but also the ability to maintain data accuracy. There are KPIs being defined locally within Tableau workbooks that more often diverge with time as the business undergoes change. Tableau Prep makes it easy to view what is being consumed and update them if required.</li><li>Number mismatch between visualizations. A uniform treatment of data across all deployed visualizations will help overcome the problem of data not adding up across reports. Tableau Prep allows the reuse of flows or part of flows in Tableau workbooks. Lastly, encourage your data team to get familiar with Tableau Prep and take their feedback on whether they would benefit from the tool.</li></ul><p><strong>Get started with Tableau Prep Builder</strong></p><p>Tableau Prep has been renamed Tableau Prep Builder since the 2019.1.2 version. It requires installation of the file (find <a href="https://www.tableau.com/products/prep/download">here</a>), followed by activation of the account.</p><p><strong>Points to keep in mind before installation:</strong></p><ul><li>Tableau Prep requires a Creator License for its users.</li><li>Install Tableau Prep Builder on the same system where Tableau Desktop is installed. They are built to work in cohesion.</li><li>It is important to NOT install Tableau Prep where the Tableau Server is installed/hosted (see why <a href="https://help.tableau.com/current/desktopdeploy/en-us/desktop_deploy_download_and_install.htm">here</a>).</li><li>The Full system requirement can be found <a href="https://www.tableau.com/products/techspecs">here</a>.</li></ul><p>After installation, launch the application, which will open an activation page.</p><p><strong>Activation can be done with either of the following:</strong></p><ul><li>Product-key</li><li>Login based</li></ul><p>Login-based activation only requires the URL to the Tableau Server.</p><p>For more information on the activation of Tableau Prep, see <a href="https://help.tableau.com/current/desktopdeploy/en-us/desktop_deploy_activate_license.htm">here</a>.</p><p><strong>Note:</strong> Tableau Prep Conductor is part of the Tableau Prep bundle, which allows automating flow run schedules and helps maintain them as an easy editing feature on the Tableau Server itself. For more information on configuring Tableau Conductor see <a href="https://help.tableau.com/current/server/en-us/prep_conductor_config_server_overview.htm">here</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*WSrLwbGOaFf5RvAE.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ca0e5b0adbe3" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Securing PII Data In Snowflake Using Tag-Based Masking]]></title>
            <link>https://medium.com/@kipi.ai/securing-pii-data-in-snowflake-using-tag-based-masking-6fab4169cfd1?source=rss-c198416d197a------2</link>
            <guid isPermaLink="false">https://medium.com/p/6fab4169cfd1</guid>
            <category><![CDATA[snowflake]]></category>
            <category><![CDATA[object-tagging]]></category>
            <category><![CDATA[data-security]]></category>
            <category><![CDATA[tech-tutorials]]></category>
            <dc:creator><![CDATA[kipi.ai]]></dc:creator>
            <pubDate>Mon, 05 Jun 2023 18:55:31 GMT</pubDate>
            <atom:updated>2023-06-05T18:55:31.132Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Author: Vipul Sharma</strong></p><p><strong>Introduction</strong></p><p>This blog will cover how Snowflake’s tag-based masking can be leveraged to segregate and mask the PII data in the warehouse to keep it secure and visible only to privileged users.</p><p><strong>Tag-Based Masking</strong></p><p>It is Snowflake’s newly released feature which came into public preview mode recently after the Snowflake summit. Tag-based masking combines the Object Tagging and the Dynamic Data Masking feature, allowing the policy to be set on a tag using ALTER TAG command.</p><p>Object Tagging enables data stewards to track sensitive data for use cases such as compliance, discovery, protection, and resource utilization through a centralized or decentralized data governance management strategy.</p><p>Tag is a schema-level object which can be assigned to others. As a key-value pair, Snowflake stores the tag and its string value. The tag value must be unique to your schema and is always a string.</p><p>When you apply a tag to an object using the CREATE TAG statement, you must supply the tag string value. If the tag already exists, it can be applied to an object when created using the CREATE object&gt; statement. Alternatively, you can use an ALTER object&gt; command to assign the tag to an already-existing object.</p><p>Tables, views, and columns can all be given tags. Setting a tag and then searching it makes it possible to find numerous database objects and columns that contain sensitive data.</p><p>In our case, we had the LOGIN_DETAILS table, which contains some PII data columns such as NAME, MOBILE_NO, and PWD.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*L2A_tQUsF6DC5FDT.png" /></figure><p>A new role, object_tagging, has been created &amp; the required privileges to the database objects are being granted using the below scripts.</p><p>Object tagging is used here to segregate the PII data. A tag named PII_TYPE is created and added to the sensitive columns.</p><p><strong>Script:</strong></p><p>create or replace role object_tagging;</p><p>grant create tag on schema APP_SCHEMA to role object_tagging;</p><p>grant apply tag on account to role object_tagging;</p><p>grant all on warehouse compute_wh to role object_tagging;</p><p>grant all on database APP_DB to role object_tagging;</p><p>grant all on schema APP_DB.APP_SCHEMA to role object_tagging;</p><p>grant select on table “APP_DB”.”APP_SCHEMA”.”LOGIN_DETAILS” to role object_tagging;</p><p>grant role object_tagging to user CROPANALYTICS;</p><p>use role object_tagging;</p><p>create or replace tag pii_type;</p><p>alter table LOGIN_DETAILS modify column pwd set tag pii_type=’very confidential’;</p><p>alter table LOGIN_DETAILS modify column mobile_no set tag pii_type=’very confidential’;</p><p>alter table LOGIN_DETAILS modify column name set tag pii_type=’confidential’;</p><p><strong>Assigned tags can be checked using the below command.</strong></p><p>select * from SNOWFLAKE.ACCOUNT_USAGE.tag_references;</p><p>select system$get_tag (‘pil_type’, ‘LOGIN_DETAILS.name’, ‘column’), system$get_tag(‘pil_type’, ‘LOGIN_DETAILS.name’, ‘column’);</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*w0CSljuqVT-rQPy1.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*vZeTvkVvCK6qOcGx.png" /></figure><p>Now, to selectively conceal plain-text data in table and view columns at query time, Dynamic Data Masking can be used, a Column-level Security feature.</p><p>Because of being schema-level objects in Snowflake, masking policies cannot be applied to a column unless a database and schema are present in Snowflake.</p><p>A new role, masking_admin, has been created and the required privileges to the database objects are granted using the scripts below.</p><p><strong>Script:</strong></p><p>create or replace role masking_admin;</p><p>grant create masking policy on schema APP_DB.APP_SCHEMA to role masking_admin;</p><p>grant apply masking policy on account to role masking_admin;</p><p>grant role masking_admin to user cropanalytics;</p><p>use role accountadmin;</p><p>grant all on warehouse compute_wh to role masking_admin;</p><p>grant all on database APP_DB to role masking_admin;</p><p>grant all on schema APP_DB.APP_SCHEMA to role masking_admin;</p><p>grant select on table “APP_DB”.”APP_SCHEMA”.”LOGIN_DETAILS”</p><p>to role masking_admin;</p><p>Then two masking policies maskpii_str &amp; maskpii_num are created to mask string &amp; number values respectively.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*rH78HaFg9d8S2o4V.png" /></figure><p><strong>Script:</strong></p><p>use role masking_admin;</p><p>create or replace masking policy maskpii_str as (val string) returns string -&gt;</p><p>case</p><p>when current_role() in (‘ACCOUNTADMIN’) then val</p><p>else ‘***MASKED***’</p><p>end;</p><p>create or replace masking policy maskpii_num as (val number) returns number -&gt;</p><p>case</p><p>when current_role() in (‘ACCOUNTADMIN’) then val</p><p>else -1</p><p>end;</p><p>Earlier, we had the option to use Dynamic Data Masking with only Tables and views, but with the introduction of Tag-based masking, a Masking policy can now be assigned directly to a tag that contains segregated sensitive columns.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/0*y4f_Unf6BRozRBJB.png" /></figure><p><strong>Script:</strong></p><p>use role object_tagging;</p><p>show tags;</p><p>alter tag APP_DB.APP_SCHEMA.pii_type set</p><p>masking policy maskpii_str,</p><p>masking policy maskpii_num;</p><p>And this is how the masked columns would look after implementing Tag-based Masking when accessed using roles other than ACCOUNTADMIN.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*58kqFdgC9YDcxIzV.png" /></figure><p><strong>Summary</strong></p><p>Snowflake’s Tag-based masking feature can be very efficient when you have new PII data columns getting introduced at regular intervals, which eventually will be required to be masked as well. Then the admin will just have to add the tag to the newly introduced sensitive columns, and the Masking policy will be applied to them Dynamically.</p><p><strong>References</strong></p><p><a href="https://docs.snowflake.com/en/user-guide/object-tagging.html">Object Tagging — Snowflake Documentation</a></p><p><a href="https://docs.snowflake.com/en/user-guide/tag-based-masking-policies.html">Tag-based Masking Policies — Snowflake Documentation</a><a href="https://docs.snowflake.com/en/user-guide/security-column-ddm-intro.html">Understanding Dynamic Data Masking — Snowflake Documentation</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6fab4169cfd1" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[ShareMon]]></title>
            <link>https://medium.com/@kipi.ai/sharemon-55a2b888c9c6?source=rss-c198416d197a------2</link>
            <guid isPermaLink="false">https://medium.com/p/55a2b888c9c6</guid>
            <category><![CDATA[snowflake]]></category>
            <dc:creator><![CDATA[kipi.ai]]></dc:creator>
            <pubDate>Wed, 24 May 2023 15:21:55 GMT</pubDate>
            <atom:updated>2023-05-24T15:21:55.492Z</atom:updated>
            <content:encoded><![CDATA[<p>Authors: Nikhil Pai J, Krushik Reddy, and Nikhil Ranade</p><p><strong>Introduction</strong></p><p>Secure Data Sharing is a way of sharing selected objects in a database from one Snowflake account to other accounts. We can share tables, external tables, secure views, secure materialized views, and secure UDFs.</p><p><strong>There are three types of Data sharing:</strong></p><ol><li>Direct Data Sharing: The easiest way to share data between Snowflake accounts using secure shares.</li><li>Data Marketplace: Useful for sharing or consuming data from third-party vendors.</li><li>Data Exchange: Mainly used for data collaboration between a selected group of members.</li></ol><p><strong>Business Importance of data sharing:</strong></p><p>Data sharing encourages more connection and collaboration between researchers, which can result in important new findings within the field. In a time of reduced monetary investment in science and research, data sharing is more efficient because it allows researchers to share resources.</p><p><strong>Data sharing helps:</strong></p><ul><li>Ideate different market strategies based on the insights, such as audience targeting to monetize this data.</li><li>Generate multiple revenue streams.</li><li>Develop multi-party partnerships and collaboration between different organizations.</li><li>Get deeper insights into your data by finding intersections with other organizations.</li></ul><p><strong>Current challenges in direct data sharing with Snowflake:</strong></p><p><strong>Snowflake/SQL knowledge to create and configure the shares.</strong></p><p>One has to have some level of understanding of Snowflake or basic scripting knowledge to create and configure the shares. In this case, it becomes really hard for the data owners to create and configure the shares themselves. This makes the creation and configuration of shares go through an IT life cycle where data owners would create different tickets, and the data engineers would perform all the action on the ground. This process is lengthy, and data owners have little control over their data.</p><p><strong>Snowflake UI and its limitations.</strong></p><p>Snowflake provides a UI with which you can create and configure a share in a no-code manner, but that also has limitations. With the help of the Snowflake UI, we are not able to share all the sharable objects like secure user-defined functions or external tables.</p><p><strong>Monitoring of shares.</strong></p><p>Monitoring and governance are important aspects of data sharing. With data exchange and data marketplace, Snowflake gives some level of analytics over the data being shared (like Provider Studio to monitor all your listings in the marketplace). But with direct data sharing, Snowflake has no control over the data being shared, and hence it is the provider’s responsibility to monitor the shares. Since there is no dashboard or a UI that provides the information about the data being shared, we again have to rely on firing SQL queries to query Snowflake’s metadata to get the required information. There is no single place where you will get all the required information about your shared data.</p><p><strong>Reader account chargebacks.</strong></p><p>When data is shared to a reader account, the provider’s Snowflake account bears all costs associated with that particular reader account with respect to the compute consumption or storage consumption. Hence if a provider wants to charge a particular customer for the usage of the reader account, he or she needs the consumption of that reader account for the same. Again this information is not readily available, and we have to dig Snowflake metadata for the same.</p><p>To overcome all these challenges, we have developed an application called ShareMon which makes your data-sharing journey smoother.</p><p><strong>Introduction to ShareMon:</strong></p><p>ShareMon is an Interactive web application used to automate and ease the processes of Snowflake’s Direct data sharing and monitoring. Its UI allows you to create &amp; maintain shares without having to write a single line of code. This no-code application is developed to ease the process of writing long and repeated SQL codes on Snowflake to share data with your consumers. It works on Streamlit — a Python-based UI framework, and Snowflake connectors at the back end to interpret the user’s choices.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*VmTeDze2Dicn00qL.png" /></figure><p><strong>Features &amp; Functionalities of ShareMon:</strong></p><ul><li>Create a new Snowflake direct data share</li><li>Create a warehouse for data-sharing activities</li><li>Add any shareable objects to the share</li><li>Create a secure view to add to the share</li><li>Add consumers to existing or newly created shares (Full/Reader account)</li><li>Provide temporary access on share to consumer (Full/Reader account)</li><li>Set up a newly created Reader account for the DDS.</li><li>Drop objects from the share</li><li>Monitor the consumers attached to each share</li><li>Monitor the shares that were attached to the consumer</li><li>Monitor the shares by compute cost &amp; storage cost</li></ul><p><strong>Benefits of using ShareMon over the Snowflake UI</strong></p><p><strong>Configuration of the Snowflake Share in a no-code manner.</strong></p><p>The configuration and monitoring of shares which includes creating, updating, and dropping shares and monitoring of shares, are all done without writing a single line of code. The ShareMon UI consists of clickable and selecting options to bring out the desired outcome compared to the Snowflake UI, which would require SQL code to be written and executed by the user. Data owners can now have complete control over their data and can make the necessary changes whenever required.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*vjPV2i26oQ5Wh0dG.png" /></figure><p><strong>Providing Efficient chargeback for Reader accounts.</strong></p><p>Reader accounts are an extension of the Snowflake account they are created from, which means all the costs incurred on the Reader account is borne by the main Snowflake account. The storage cost associated with sharing data with them, the compute cost incurred when querying the shared data, and the type of query being used on the shared data become critical when it comes to monitoring. ShareMon allows users to monitor all these Reader account usage aspects in easily interpretable charts and tables.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*qq_kEZq87e7FDq3k.png" /></figure><p><strong>Governance on Shared Data</strong></p><p>ShareMon provides a 360-degree view of your Snowflake account’s entire Direct Data sharing ecosystem. All Sharing activities, including monitoring, are centralized in a single application, from creating and sharing secure views to consumer account validation for sharing.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*anYV-ks0HkngeatG.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*7Nr7YCp6qtdT6BKb.png" /></figure><p><strong>No more Swivel chair.</strong></p><p>Direct data sharing using Snowflake is a blend between using the Snowflakes worksheet for writing SQL queries and moving back to the UI for configuring the shares. For a non-Snowflake user, this could be quite inconvenient. ShareMon overcomes this by providing a single UI with no code, specially meant for admins or business users who can rely on ShareMon’s UI to configure and monitor the shares without having to move to and from writing SQL statements and the UI.</p><p><strong>Conclusion</strong></p><p>In conclusion, Sharemon bridges the gap between using Snowflake’s worksheets/UI and the requirement to have SQL and Snowflake knowledge to create, manage and monitor the shares. It is a one-stop solution to direct data-sharing needs with an intuitive UI. The application can be easily navigated through and provides additional features that a direct data share might require without having to write complex stored procedures, tasks, or queries.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=55a2b888c9c6" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Optical Character Recognition Using Python]]></title>
            <link>https://medium.com/@kipi.ai/optical-character-recognition-using-python-2fdf97efd04f?source=rss-c198416d197a------2</link>
            <guid isPermaLink="false">https://medium.com/p/2fdf97efd04f</guid>
            <category><![CDATA[tech-tutorials]]></category>
            <category><![CDATA[ocr]]></category>
            <category><![CDATA[deep-learning]]></category>
            <category><![CDATA[python]]></category>
            <dc:creator><![CDATA[kipi.ai]]></dc:creator>
            <pubDate>Mon, 15 May 2023 13:53:10 GMT</pubDate>
            <atom:updated>2023-05-15T13:53:10.470Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Authors: Vipul Tripathi and Kodukula Sirisha</strong></p><p><strong>Overview</strong></p><p>Optical Character Recognition (OCR) is a technology that enables the conversion of scanned images or scanned text into machine-readable text. It is a process of analyzing and recognizing text from an image, making it possible for machines to read and understand text, just like humans do. The application of OCR technology has grown tremendously in recent years, making it a crucial tool for various industries, including document management, financial services, healthcare, and education.</p><p><strong>Applications of OCR</strong></p><ol><li>Document Management: It converts physical documents, such as invoices, contracts, and receipts, into digital formats for storage and retrieval. This makes document management more accessible and more efficient and reduces the risk of document loss or damage.</li><li>Financial Services: It can be used to process large amounts of financial data, such as bank statements and invoices, to extract relevant information and reduce manual data entry errors.</li><li>Healthcare: It is used to automate the process of reading and analyzing medical records and images, such as X-rays and MRIs. This enables healthcare professionals to make faster and more accurate diagnoses and reduce the risk of medical errors.</li><li>Education: It is also used in the education sector to convert textbooks, study materials, and exam papers into digital formats for students to access and study on their devices.</li></ol><p><strong>How we used OCR</strong></p><p><strong>The gist of our use case:</strong></p><p>We have a website that asks users to write medical details from their medical report of whatever disease it is. Once the users submit the details, our ML model triggers and predicts whether the patient has that disease. Initially, all the process was manual. Users have to fill in all the details manually and carefully because a single typo may affect the final results. So, we thought of automating the whole process directly from the patient’s medical report to our ML model.</p><p>Now, users can directly upload images of a medical report from their phone on our website. This image will be stored on an S3 bucket, and our ML model will take it from there, read all the parameters, and predict and present the final result to our users, whether they have a disease or not.</p><p><strong>Final Implementation with Explanation</strong></p><p>For optical character recognition, we have used the docTR library.</p><p>docTR library: Provides a Predictor, which works as:</p><ul><li>PreProcessor: This module is responsible for transforming inputs that can directly be used by the deep learning model.</li><li>Model: It is a deep learning model implemented with TensorFlow &amp; PyTorch along with its specific post-processor to generate structured and reusable outputs.</li></ul><p><strong>Steps</strong></p><p>1. Installing the docTR library is pretty simple; we just need to use the below command in our collab.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/641/0*ywskl9vOIUhtOW5d.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/740/0*fhCYV_gURCle-pxU.png" /></figure><p>2. After installing the libraries, we need to import ocr_prediction from the docTR models, as shown below. The pre-trained argument is set as true to work with the pre-trained model.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*zRy60Nq2BziUtMZc.png" /></figure><p>3. Now we can give the input, which can be of any file type such as — a web link, pdf, images, or multiple images.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*1GcqQExbCUDofP7t.png" /></figure><p>4. Finally, the result is stored in the variable and can be used in any form.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/826/0*ucpcJVzi0rqwsZ0M.png" /></figure><p>5. We can use multiple Python functions to store the result in the database.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/472/0*PUCkINWnkpcWqZVr.png" /></figure><p><strong>Conclusion</strong></p><p>OCR is a trending technology and is very useful for storing important files without much effort. The implementation of OCR using Python is straightforward, especially with the use of Python-docTR library. These models can be fine-tuned to work with specific data sets or trained from scratch with large amounts of labeled data.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2fdf97efd04f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Compute Cost Monitoring in Snowflake]]></title>
            <link>https://medium.com/@kipi.ai/compute-cost-monitoring-in-snowflake-9c62d534b701?source=rss-c198416d197a------2</link>
            <guid isPermaLink="false">https://medium.com/p/9c62d534b701</guid>
            <category><![CDATA[monitor]]></category>
            <category><![CDATA[snowsight]]></category>
            <category><![CDATA[snowflake]]></category>
            <category><![CDATA[computes]]></category>
            <category><![CDATA[snowpipe]]></category>
            <dc:creator><![CDATA[kipi.ai]]></dc:creator>
            <pubDate>Thu, 11 May 2023 17:24:38 GMT</pubDate>
            <atom:updated>2023-05-11T17:24:38.614Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Author: Twinkle Viswanathan</strong></p><p>Ever wondered what contributed a huge sum to your Snowflake bill? Monitoring costs in Snowflake could be quite a hassle. Here in this blog, let’s discuss the cost-incurring factors in Snowflake and how we can monitor and control costs in our Snowflake environment.</p><p><strong>Costs In Snowflake</strong></p><p>On a high level, costs in Snowflake can be categorized into compute cost and storage cost. To read in detail about storage costs and how we can monitor them, we suggest you read this blog on <a href="https://docs.google.com/document/d/1gQ-SVJqNW9pN3gSIZ_ojPVdac9cZDdp-N8o07EUJDOg/edit#heading=h.byvmf7m53fe0">storage monitors.</a> Now, let’s look into how costs are calculated in Snowflake.</p><ul><li>All Snowflake costs are based on the usage of data storage, virtual warehouses (compute) resources, cloud services, serverless features, and data transfer.</li><li>Usage for virtual warehouses (compute) resources is calculated based on the number of Snowflake credits consumed by virtual warehouses for executing queries, loading/unloading data, and performing other DML operations. The warehouse’s size and duration it runs affect the number of credits utilized. Choosing the right warehouse size depending on the load and setting auto-suspend and auto-resume at appropriate intervals helps us to optimize warehouse credit usage. Setting up resource monitors for warehouses is a good practice, as it helps us monitor our warehouse usage and set thresholds to get notifications to prevent overuse. To know more about resource monitors, read our blog on <a href="https://docs.google.com/document/d/1QrDDxISZj74_2Az_NE1qoO21MefU2u7PIDfSzhag3-Y/edit">resource monitors</a>.</li><li>Cloud services usage is charged only if the everyday use of cloud services for the account exceeds 10% of the everyday usage of the compute resources. The charge is calculated every day (UTC time zone). This ensures that the 10% adjustment is accurately applied each day at the credit price for that day.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*b5KkKU5xYN3NHm_d.png" /></figure><ul><li>The serverless features of Snowflake include AUTOMATIC_CLUSTERING, SEARCH_OPTIMIZATION_SERVICE, MATERIALIZED_VIEW_MAINTENANCE, REPLICATION, and SNOWPIPE. Charges for these features are calculated based on the total usage of the resources.</li><li>A per-byte fee is charged when users transfer data from one Snowflake account (hosted on AWS, Google Cloud Platform, or Microsoft Azure) into cloud storage in another region on the same cloud platform or into cloud storage in another cloud platform.</li></ul><p><strong>Factors That Influence Cost</strong></p><p>Now that we’ve seen what factors contribute to Snowflake cost let’s discuss the factors that influence Snowflake cost.</p><ul><li>Region</li><li>Cloud Provider</li><li>Edition of Snowflake account (Influences compute cost)</li><li>Type of storage (On-demand or capacity)</li></ul><p>So choosing the right region, cloud provider and edition of the Snowflake account that fulfills our requirements and fits our budget could be crucial.</p><p><strong>Snowflake Provided Resource Usage Information</strong></p><p>Snowflake gives insights into the number of credits used or the amount of storage used, but it doesn’t provide direct data on the total cost incurred from these resources. Moreover, there’s no one-stop solution to get the combined costs together. Now let’s look at where we can find all the resource utilization information.</p><ul><li><a href="https://docs.snowflake.com/en/sql-reference/functions/warehouse_metering_history.html#warehouse-metering-history">WAREHOUSE_METERING_HISTORY</a> (information schema and account usage schema). In <a href="https://docs.snowflake.com/en/sql-reference/functions/warehouse_metering_history.html#warehouse-metering-history">WAREHOUSE_METERING_HISTORY</a> we’d get information about the credits used by warehouses and cloud services. Even though we get information about credits used in a warehouse, it doesn’t provide credit usage information on a role or user level. To overcome this, we can get query running time and user and role information from <a href="https://docs.snowflake.com/en/sql-reference/functions/query_history.html">QUERY_HISTORY</a> and calculate the costs on our own.</li></ul><p>select user_name, count(*),</p><p>sum(total_elapsed_time/1000 *</p><p>case warehouse_size</p><p>when ‘X-Small’ then 1/60/60</p><p>when ‘Small’ then 2/60/60</p><p>when ‘Medium’ then 4/60/60</p><p>when ‘Large’ then 8/60/60</p><p>when ‘X-Large’ then 16/60/60</p><p>when ‘2X-Large’ then 32/60/60</p><p>when ‘3X-Large’ then 64/60/60</p><p>when ‘4X-Large’ then 128/60/60</p><p>else 0</p><p>end) as estimated_credits</p><p>from snowflake.account_usage.query_history</p><p>group by user_name</p><p>order by 3 desc</p><p>limit 10;</p><p>Try this sample query to get user-wise credit usage, and we can multiply it with the cost per credit to get your user-wise credit usage cost.</p><p>Thus we can get information on all cost-incurring factors from different system views in the Account Usage schema or table functions in Information_schema.</p><p><strong>Way Forward</strong></p><p>From all this information, we can build dashboards with custom filters for users, roles, warehouses, or time periods either in Snow Sight for free or in any other reporting tool to monitor all Snowflake costs in one place.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/654/0*PuJekKT7VHQy1z1u.png" /></figure><p>Now that we have built dashboards to monitor costs in Snowflake, we can build alerts and notifications whenever a particular threshold has been reached. We can send a notification through email/Slack to different groups of people.</p><p>You might also want to look at our other blogs on Snowflake monitoring</p><ul><li><a href="https://docs.google.com/document/d/1gQ-SVJqNW9pN3gSIZ_ojPVdac9cZDdp-N8o07EUJDOg/edit#heading=h.byvmf7m53fe0">Storage monitor blog</a></li><li><a href="https://docs.google.com/document/d/1053admxXYH-hoDiFLhB6HK6ppmRQCmPFCA49YVValhE/edit">Performance monitor blog</a></li><li><a href="https://docs.google.com/document/d/1QrDDxISZj74_2Az_NE1qoO21MefU2u7PIDfSzhag3-Y/edit">Resource monitor blog</a></li></ul><p>To know more about implementing cost monitoring for your Snowflake account and <a href="http://kipi.bi/">kipi.bi</a>’s all-in-one Snowflake monitoring solution, Mastiff; contact us at mastiff@kipi.bi.</p><p><strong>References:</strong></p><p><a href="https://www.analytics.today/blog/monitoring-snowflake-usage-and-costs">https://www.analytics.today/blog/monitoring-snowflake-usage-and-costs</a></p><p><a href="https://public.tableau.com/app/profile/tableau.core.product.marketing/viz/SnowflakeAccountUsageDashboards/ComputeCostOverview">https://public.tableau.com/app/profile/tableau.core.product.marketing/viz/SnowflakeAccountUsageDashboards/ComputeCostOverview</a></p><p><a href="https://www.linkedin.com/pulse/reporting-snowflake-part-2-sample-cost-usage-report-krzysztofek/">https://www.linkedin.com/pulse/reporting-snowflake-part-2-sample-cost-usage-report-krzysztofek/</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9c62d534b701" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Introduction to Data Clean Rooms]]></title>
            <link>https://medium.com/@kipi.ai/introduction-to-data-clean-rooms-23f90d65346f?source=rss-c198416d197a------2</link>
            <guid isPermaLink="false">https://medium.com/p/23f90d65346f</guid>
            <category><![CDATA[snowflake]]></category>
            <category><![CDATA[tech-tutorials]]></category>
            <category><![CDATA[data-clean-room]]></category>
            <dc:creator><![CDATA[kipi.ai]]></dc:creator>
            <pubDate>Wed, 10 May 2023 18:18:27 GMT</pubDate>
            <atom:updated>2023-05-10T18:18:27.612Z</atom:updated>
            <content:encoded><![CDATA[<p>Author: Nikhil Ranade</p><p><strong>What are clean rooms?</strong></p><p>A clean room is an engineered space that is well isolated from the outside world and actively cleansed. Rooms are usually needed for scientific research or industrial production. The main purpose of designing such clean rooms is to keep the material inside safe from contamination and unauthorized access.</p><p>This blog will give you an overview of what data clean rooms are, why we use them, and some of their advantages.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/956/0*qprtFlRjtRz-4d7q.png" /></figure><p>Data Clean Rooms (DCRs) are logical environments that enable multiple organizations to collaborate on their data. While doing this, DCRs ensure that no data is shared outside the environment, keeping the PII data safe and secure. Historically in data clean rooms, all the data would be stored in a single physical location or room. There would be restrictions on who can enter that room and consume the data. Still, with the emergence of cloud technologies, these physical data clean rooms have become virtual data clean rooms where data is not stored in a single location but is spread across multiple systems. These are also called distributed data clean rooms.</p><p><strong>Why data clean rooms?</strong></p><ul><li>In traditional data clean rooms, all data is stored in a single physical location, which limits how the data is shared. With the recent developments of cloud technology, distributed data clean rooms eliminate the need to move data from one location to another since the data can live in the cloud. This allows each partner to control its own data while enabling analytics with other partners, or even with multiple other partners, simultaneously, which will eventually enrich their own data.</li><li>Data clean rooms have control over the following which makes the data in the clean room secure:</li><li>What data comes in</li><li>How the data in one clean room can be joined to data in the other clean room</li><li>What types of analytics each party can perform on the data</li><li>What data, if there is any, can leave</li></ul><p>As people are becoming aware of data privacy, we are steadily moving towards a cookieless world where data clean rooms can play an important role if we want to share the data by sticking to all the security guidelines.</p><p><strong>When to use data clean rooms?</strong></p><p>The applications of data clean rooms are mostly where we have overlapping/intersecting data.</p><p>Ex: Organization1 has some first-party customer data and is interested in some of the customer attributes which are present with organization2. Now if organization1 wants only those attributes which are present with organization2 without sharing other PII/Raw data, they can use data clean room for this purpose. Data clean room will not only help them keep their own data more secure but also will provide upselling/cross-selling opportunities to these organizations, eventually boosting their businesses.</p><p><strong>The following are some of the applications of data clean rooms where it can be used effectively:</strong></p><ul><li>Audience Overlap: As mentioned above, the value in finding an effective matching strategy without exposing participating party data.</li><li>3rd Party Enrichment: Executing approved queries, a query can be designed to return non-sensitive plain-text data from the publisher (for example) to enrich the advertiser’s own data.</li><li>Campaign Attribution: Measuring the effectiveness of the campaign after the campaign itself was published.</li><li>Lookalike Analysis: Adding features such as demography, interest, and purchase intentions, needed for feeding your machine learning model audience.</li></ul><p><strong>Benefits of data clean room</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*5oWkfIukiydxSxxf.png" /></figure><ul><li>Get deeper insights into your data by finding intersections with other organizations.</li><li>Ideate different market strategies based on the insights, such as audience targeting to monetize this data.</li><li>Generate multiple revenue streams.</li><li>Develop multi-party partnerships and collaboration between different organizations.</li></ul><p><strong>Summary:</strong></p><p>Data clean rooms are a logical concept that can be implemented using Snowflake’s features, such as Direct data sharing, Private data exchange, etc. They help organizations to link anonymized data (for, e.g., marketing and advertising) from multiple parties for attribution. Data clean rooms don’t allow data points that could be tied back to a specific user to leave the environment, allowing organizations to adhere to privacy laws. It helps organizations/brands to expand their reach, which will help them generate more revenues, understand their customers better, and develop new strategies.</p><p><strong>Reference links:</strong></p><p><a href="https://www.snowflake.com/blog/secure-data-collaboration-data-clean-rooms/">https://www.snowflake.com/blog/secure-data-collaboration-data-clean-rooms/</a></p><p><a href="https://www.searchenginejournal.com/data-clean-rooms/417606/">https://www.searchenginejournal.com/data-clean-rooms/417606/</a></p><p><a href="https://www.snowflake.com/trending/data-clean-room-for-business-growth">https://www.snowflake.com/trending/data-clean-room-for-business-growth</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=23f90d65346f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Data Ingestion in Snowflake using Kafka]]></title>
            <link>https://medium.com/@kipi.ai/data-ingestion-in-snowflake-using-kafka-100110aa7af6?source=rss-c198416d197a------2</link>
            <guid isPermaLink="false">https://medium.com/p/100110aa7af6</guid>
            <dc:creator><![CDATA[kipi.ai]]></dc:creator>
            <pubDate>Mon, 24 Apr 2023 15:17:53 GMT</pubDate>
            <atom:updated>2023-04-24T15:17:53.051Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Author: Prashant Sharma</strong></p><p><strong>1. OVERVIEW AND ARCHITECTURE</strong></p><p><strong>➢ APACHE KAFKA:</strong></p><p>o Apache Kafka software uses a publish and subscribe model to write and read streams of records, similar to a message queue or enterprise messaging system.</p><p>o An application publishes messages to a topic, and an application subscribes to a topic to receive those messages.</p><p>o Topics can be divided into partitions to increase scalability.</p><p><strong>➢ KAFKA CONNECT:</strong></p><p>o Kafka Connect is a framework for connecting Kafka with external systems, including databases.</p><p>o A Kafka Connect cluster is a separate cluster from the Kafka cluster.</p><p>o The Kafka Connect cluster supports running and scaling out connectors (components that support reading and/or writing between external systems).</p><p><strong>➢ SNOWFLAKE CONNECTORS:</strong></p><p>o Snowflake provides two versions of the connector:</p><p>▪ A version of the Confluent package version of Kafka.</p><p>▪ A version of the open-source software (OSS) Apache Kafka package.</p><p>o From the perspective of Snowflake, a Kafka topic produces a stream of rows to be inserted into a Snowflake table. In general, each Kafka message contains one row.</p><p>o In Snowflake, one topic supplies messages (rows) for one Snowflake table.</p><p>o The current version of the Kafka connector is limited to loading data into Snowflake.</p><p><strong>➢ TARGET TABLES FOR KAFKA TOPICS:</strong></p><p>o Kafka topics can be mapped to existing Snowflake tables in the Kafka configuration. o If the topics are not mapped, then the Kafka connector creates a new table for each topic using the topic name.</p><p>o Table name rules in the absence of Table name:</p><p>▪ Lowercase topic is converted to Uppercase Table name</p><p>▪ Topic name starts A-Z, a-z, or (_). If not, the connector prepends an underscore to the table name.</p><p>▪ For any illegal character in the Topic name, that character is replaced with an underscore (_).</p><p>o Kafka topics can be mapped to existing Snowflake tables in the Kafka configuration. If the topics are not mapped, then the Kafka connector creates a new table for each topic using the topic name. The suffix is an underscore followed by a generated hash code. o Table Structure for Kafka Topics:</p><p>▪ RECORD_CONTENT: Contains Kafka Message</p><p>▪ RECORD_METADATA: Contains metadata in JSON about the message, i.e., topic, partition, offset, createTime/LogAppendTime, key, schema_id, headers.</p><p><strong>➢ ARCHITECTURE AND WORKFLOW:</strong></p><p>o The Kafka connector subscribes to one or more Kafka topics based on the configuration information provided via the Kafka configuration file or command line (or the Confluent Control Center; Confluent only).</p><p>o The connector creates the following objects for each topic:</p><p>▪ One internal stage to temporarily store data files for each topic</p><p>▪ One pipe to ingest the data files for each topic partition</p><p>▪ One table for each topic</p><p>o Architecture diagram:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*1DZxbCqAQQwRn6OS.png" /></figure><p><strong>Workflow diagram:</strong></p><p>▪ One or more applications publish JSON or Avro records to a Kafka cluster. The records are split into one or more topic partitions.</p><p>▪ The Kafka connector buffers messages from the Kafka topics. When a threshold (time or memory or a number of messages) is reached, the connector writes the messages to a temporary file in the internal stage. The connector triggers Snowpipe to ingest the temporary file. Snowpipe copies a pointer to the data file into a queue.</p><p>▪ A Snowflake-provided virtual warehouse loads data from the staged file into the target table (i.e., the table specified in the configuration file for the topic) via the pipe created for the Kafka topic partition.</p><p>▪ The connector monitors Snowpipe and deletes each file in the internal stage after confirming that the file data was loaded into the table.</p><p>o If a failure prevents the data from loading, the connector moves the file into the table stage and produces an error message.</p><p><strong>➢ FAULT TOLERANCE:</strong></p><p>o Both Kafka and the Kafka Connector are fault-tolerant.</p><p>o Messages are neither duplicated nor silently dropped. Data deduplication logic in the Snowpipe workflow in the data loading chain eliminates duplicate copies of repeating data except in rare cases.</p><p>o If an error is detected while Snowpipe loads a record, then the record is not loaded; instead, the record is moved to a table stage.</p><p>o <strong>Limitations of Fault Tolerance with Connector:</strong></p><p>▪ If messages in the Kafka topic are deleted or updated, these changes might not be reflected in the Snowflake table.</p><p>▪ The default retention time is seven days. If the system is offline for more than the retention time, then expired records will not be loaded. Similarly, if Kafka’s storage space limit is exceeded, some messages will not be delivered.</p><p>o <strong>Performance tuning:</strong></p><p>▪ Tuning the number of nodes in the Connect cluster</p><p>▪ Tuning the number of tasks allocated to the connector</p><p>▪ Understanding the impact of the network bandwidth between the connector and the Snowflake deployment</p><p><strong>2. ENVIRONMENT SETUP: ON-PREMISE</strong></p><p><strong>a. UBUNTU SETUP (FOR WINDOWS ONLY):</strong></p><p>i) Goto <strong>Start </strong>-&gt; <strong>Turn Windows Feature on or off</strong></p><p>ii) In Windows Feature Box, Scroll Down to “<strong>Windows Subsystem for Linux</strong>” and enable it by checking the box.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/0*LQgIpWBIcISwFGad.png" /></figure><p>iii) Goto <strong>Microsoft Store </strong>-&gt; Download and Install <strong>Ubuntu LTS </strong>(Any Ver.)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/0*2jdNolePxvTGaLok.png" /></figure><p>iv) Restart the PC.</p><p><strong>b. JAVA SETUP:</strong></p><p>i) <strong>Install Java-8:</strong></p><p>$ sudo apt-get install openjdk-8-jdk (Might require apt-get update, apt-get upgrade )</p><p><strong>Note: </strong>Complete <a href="https://docs.google.com/document/d/1FHtYQgCltJzoyG5zORiloWf_D4dcp1hvCcAEaf_uTT4/edit#heading=h.swjrx8h6m6ro">Kafka Service Setup</a> before Steps ii &amp; iii</p><p>ii) <strong>Download Bouncy Castle Libraries(OPTIONAL: Required for Encrypted Private Key):</strong></p><p>a) Get the latest version of JAR file for <a href="https://repo1.maven.org/maven2/org/bouncycastle/bc-fips"><strong>bc-fips</strong></a></p><p>b) Use wget with the link to the jar file from the above step.</p><p><strong>$ wget </strong><a href="https://repo1.maven.org/maven2/org/bouncycastle/bc-fips/1.0.2.3/bc-fips-1.0.2.3.jar"><strong>https://repo1.maven.org/maven2/org/bouncycastle/bc-fips/1.0.2.3/bc-fips-1.0.2.3.jar</strong></a></p><p>c) Get the latest version of JAR file for <a href="https://repo1.maven.org/maven2/org/bouncycastle/bcpkix-fips">bcpkix-fips</a></p><p>d) Use wget with the link to the jar file from the above step.</p><p><strong>$ wget </strong><a href="https://repo1.maven.org/maven2/org/bouncycastle/bcpkix-fips/1.0.3/bcpkix-fips-1.0.3.jar"><strong>https://repo1.maven.org/maven2/org/bouncycastle/bcpkix-fips/1.0.3/bcpkix-fips-1.0.3.jar</strong></a></p><p>iii) <strong>Move .jar files to libs folder(OPTIONAL: Required for Encrypted Private Key):</strong></p><p>a) Use the Move command to mv downloaded bc-fips file</p><p><strong>$ mv bc-fips-1.0.2.3.jar kafka/libs</strong></p><p>b) Use the Move command to mv downloaded bcpkix-fips file</p><p><strong>$ mv bcpkix-fips-1.0.3.jar kafka/libs</strong></p><p><strong>c. RSA KEY SETUP:</strong></p><p>i) <strong>Encrypted Private Key</strong></p><p>$ openssl genrsa 2048 | openssl pkcs8 -topk8 -inform PEM -out rsa_key.p8</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*nIlyySTdri2mNQbY.png" /></figure><p>ii) <strong>Encrypted Public Key</strong></p><p>$ openssl rsa -in rsa_key.p8 -pubout -out rsa_key.pub</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*52e4aN_qU0mj1zvx.png" /></figure><p>iii) <strong>RSA File Check</strong></p><p>$ ls -&gt; Check if rsa_key.p8 and rsa_key.pub is listed</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/789/0*RFrNI-XbBPf6d3sL.png" /></figure><p>iv) <strong>[IMPORTANT] </strong>Copy the Content of rsa_key.pub in one line (No line space. For the next step)</p><p>-&gt; vim rsa_key.pub</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/924/0*wbSiqniTiitWuR5z.png" /></figure><p><strong>d. SNOWFLAKE ACCOUNT SETUP:</strong></p><p><strong>a) Database, Schema, Warehouse, and Role Setup</strong></p><p>i) Use the below Script:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*RMkYVucsoVQKVB9M.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*B7e4vnkzbodV83VL.png" /></figure><p>ii) <strong>Grants and Privileges on created objects</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*15ZG2Sih7ehOM9I1.png" /></figure><p>iii) <strong>Create a User and Assign a Role</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*DUI-rXVqBUpDp_pU.png" /></figure><p><strong>3. KAFKA SERVER SETUP (LINUX AND WINDOWS)</strong></p><p><strong>1. Kafka Service Setup:</strong></p><ol><li><strong>Download Kafka Service from Apache Kafka Site:</strong></li><li>Get the latest TGZ for <strong>Kakfa </strong>from <a href="https://archive.apache.org/dist/kafka/">Apache Kafka site</a>.</li></ol><p><strong>Note: </strong>Kafka Version 2.8.1 and above doesn’t require Zookeeper Service.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/722/0*O-2MgZq02rv9W8Mh.png" /></figure><p>ii. Navigate to the preferred Kafka Service version</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/806/0*YPsFwOHXsB3beZ49.png" /></figure><p>iii. Right-click any of the Kafka files ending with .tgz (extension) and Copy the Link Address</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/854/0*1ZUhzzRDjqnUGzf7.png" /></figure><p>iv. In Windows, Open <strong>ubuntu(</strong>From Start Menu<strong>) </strong>-&gt; <strong>cd Kafka-Server </strong>-&gt; <strong>wget </strong>&lt;<strong>Copied_link_address</strong>&gt; -&gt; <strong>Enter</strong></p><p><strong>Or</strong></p><p>In Linux, <strong>Terminal </strong>-&gt; <strong>cd Kafka-Server </strong>-&gt; <strong>wget </strong>&lt;<strong>Copied_link_address</strong>&gt; -&gt; <strong>Enter</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*rNEyVk9XUwcxwJec.png" /></figure><p><strong>b. Extract Kafka Tarball(tgz):</strong></p><p>i. In <strong>Kafka-Server </strong>Folder, run the list command to get the kafka-tarball filename $ ls</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/873/0*CCM_gvchrGthN94H.png" /></figure><p>ii. Extract the tarball from the folder</p><p>$ tar -xvzf &lt;kafka_file_name(ending with .tgz)&gt;</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/753/0*UwWDkHdZjA0AfpP-.png" /></figure><p><strong>ii. Rename Extracted Kafka Directory</strong></p><p>$ mv &lt;kafka_directory&gt; kafka</p><p><strong>Note: </strong>Kafka directory name will contain Kafka Filename without postfix (.tgz)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*TrGAD5YAWRfjOrm7.png" /></figure><p><strong>2. Zookeeper Service Setup (OPTIONAL: FOR KAFKA VERSION BELOW 2.8.1):</strong></p><p><strong>a. Download Zookeeper Service from Apache Zookeeper Site:</strong></p><p>i. Get the latest TGZ for <strong>Zookeeper </strong>from <a href="https://mirrors.estointernet.in/apache/zookeeper/">Apache Zookeeper site</a>.</p><p><strong>Note: </strong>Kafka Version 2.8.1 and above doesn’t require Zookeeper Service.</p><p>ii. Navigate to the preferred Zookeeper Service version</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/922/0*dRisQh8GcvR9EgqH.png" /></figure><p>Right-click any of the Zookeeper files ending with .tgz (extension) and Copy the Link Address</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/919/0*OS_-_qXzBSIHn-Dv.png" /></figure><p>iv. In Windows, Open <strong>ubuntu(</strong>From Start Menu<strong>) </strong>-&gt; <strong>cd Kafka-Server </strong>-&gt; <strong>wget </strong>&lt;<strong>Copied_link_address</strong>&gt; -&gt; <strong>Enter</strong></p><p><strong>Or</strong></p><p>In Linux, <strong>Terminal </strong>-&gt; <strong>cd Kafka-Server </strong>-&gt; <strong>wget </strong>&lt;<strong>Copied_link_address</strong>&gt; -&gt; <strong>Enter</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*AAMhQK6nqTMrtSxd.png" /></figure><p><strong>b. Extract Zookeeper Tarball(tgz):</strong></p><p>i. In <strong>Kafka-Server </strong>Folder, run the list command to get the zookeeper-tarball filename</p><p>$ ls</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*7TOaRnV2MsH2SC63.png" /></figure><p>ii. Extract the tarball from the folder</p><p>$ tar -xvzf &lt;zookeeper_file_name(ending with .tgz)&gt;</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*8XjPNfzsAj820Rzi.png" /></figure><p><strong>c. Rename Extracted Zookeeper Directory:</strong></p><p>$ mv &lt;zookeeper_directory&gt; zookeeper</p><p><strong>d. Zookeeper Configuration (Use Default):</strong></p><p>$ mv zookeeper/conf/zoo_sample.cfg zookeeper/conf/zoo.cfg</p><p><strong>4. SNOWFLAKE KAFKA CONNECTOR:</strong></p><p><strong>1. Download Snowflake Kafka Connector Jar:</strong></p><p>$ wget <a href="https://repo1.maven.org/maven2/com/snowflake/snowflake-kafka-connector/1.5.0/snowflake-kafka-connector-1.5.0.jar">https://repo1.maven.org/maven2/com/snowflake/snowflake-kafka-connector/1.5.0/snowflake-kafka-connector-1.5.0.jar</a></p><p><strong>2. Move the Jar to the kafka/libs directory:</strong></p><p>$ mv snowflake-kafka-connector-1.5.0.jar kafka/libs</p><p><strong>3. Configuring Kafka Snowflake Connector:</strong></p><p>a) <strong>Create the Configuration file</strong></p><p>$ vi kafka/config/snowflake-kafka-connector.properties</p><p>b) <strong>Add the following configuration with changes as required</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*GrmUq8HBFtWLiRn7.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*IY0e-YJ1w_OKHx2P.png" /></figure><p><strong>c) Save the File. For vi editor, esc -&gt; Shift + : -&gt; wq -&gt; Enter</strong></p><p><strong>5. OPERATION CHECK: KAFKA PRODUCER AND CONSUMER</strong></p><p><strong>Note: </strong>For Operation, we’ll need multiple terminals in both Linux and Windows</p><p><strong>a) Window 1: Start Zookeeper Service</strong></p><p>$ kafka/bin/zookeeper-server-start.sh kafka/config/zookeeper.properties</p><p><strong>b) Window 2: Start Kafka Service</strong></p><p>$ kafka/bin/kafka-server-start.sh kafka/config/server.properties</p><p><strong>c) Window 3: Sample File</strong></p><p>i. Create a sample JSON file</p><p>$ vi car.json</p><p>ii. Paste the below data in the file</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/773/0*9RSqBCDYWZAZUY4T.png" /></figure><p>iii. Save and Exit. For vi editor, esc -&gt; Shift + : -&gt; wq -&gt; Enter</p><p><strong>d) Window 3: Kafka Topic</strong></p><p><strong>i. Create Kafka Topic with 1 Partition:</strong></p><p>$ kafka/bin/kafka-topics.sh — create — zookeeper localhost:2181 — replication-factor 1 — partitions 1 — topic car (For Kafka-2.8.1 below)</p><p>Or</p><p>$ kafka/bin/kafka-topics.sh — create — topic car — replication-factor 1 — partitions 1 — bootstrap-s erver localhost:9092 (For Kafka-2.8.1 and above)</p><p>ii. <strong>Verify Topic Creation</strong></p><p>$ kafka/bin/kafka-topics.sh — list — zookeeper localhost:2181 (For Kafka-2.8.1 below)</p><p>Or</p><p>$ kafka/bin/kafka-topics.sh — list — bootstrap-server localhost:9092 (For Kafka-2.8.1 and above)</p><p><strong>e) Window 4: Kafka Console Producer</strong></p><p>$ kafka/bin/kafka-console-producer.sh — broker-list localhost:9092 — topic car &lt; car.json</p><p><strong>f) Window 5: Kafka Console Consumer</strong></p><p>$ kafka/bin/kafka-console-consumer.sh — bootstrap-server localhost:9092 — topic car — from beginning</p><p><strong>g) Clean-Up</strong></p><p>i. <strong>Ctrl + C, </strong>to stop kafka Consumer.</p><p>ii. <strong>Close Windows 4 and 5.</strong></p><p><strong>6. OPERATION EXECUTION: KAFKA TO SNOWFLAKE INGESTION</strong></p><p><strong>a) Run jps to check service following services are running:</strong></p><p>i. QuorumPeerMain (Zookeeper)</p><p>ii. Kafka</p><p>iii. ConnectStandalone (Kafka-Connect Task)</p><p><strong>b) Run Kafka Connect Standalone</strong></p><p>$ kafka/bin/connect-standalone.sh kafka/config/connect-standalone.properties kafka/config/snowflake-kafka-connector.properties</p><p><strong>c) Log in to Snowflake. </strong>Verify data is inserted in Mentioned Table</p><p><strong>OPERATION PROBLEM</strong></p><p><strong>a) Producer Error: </strong>Request Error</p><p>i. <strong>Resolution 1: </strong>Update kafka/config/producer.properties by adding the below line</p><p>Max.request.size=101214400</p><p><strong>Then run the below command</strong>:</p><p>$ kafka /bin/kafka-console-producer.sh — broker-list localhost:9092 — topic car &lt; car.json — producer.config kafka/config/producer.properties</p><p>ii. <strong>Resolution 2: </strong>Use the below command to upload the file</p><p>$ kafka /bin/kafka-console-producer.sh — bootstrap-server localhost:9092 — topic car &lt; car.json — producer-property max.request.size=101214400</p><p><strong>b) Topic Error: Max Message Size</strong></p><p>i. <strong>Resolution: </strong>Run the Below command on the created topic</p><p>$ kafka/bin/kafka-configs.sh — bootstrap-server localhost:9092 — alter — entity-type topics — entity name car — add-config max.message.bytes=101214400</p><p><strong>c) Kafka Error: On Restart, Kafka Service or Zookeeper Service throws error</strong></p><p>i. <strong>Resolution: </strong>Run the Below commands, post which Kafka the topic needs to be created again, and all the properties on the topic must be altered again</p><p>$ rm -rf /tmp/kafka-logs/</p><p>$ rm -rf /tmp/zookeeper/</p><p><strong>8. CONCLUSION</strong></p><p><strong>I</strong>n this article, we have seen:</p><ol><li>Quick overview of what Kafka is and what is Snowflake Kafka Connector.</li><li>Architecture and workflow for the JSON Data Ingestion into Snowflake using Apache Kafka on a local machine running either Windows or Linux Operating System.</li><li>Discussed Fault tolerance and Performance tuning for Apache Kafka</li><li>First, How to set up the environment on our operating system based on the Kafka version we’re using and the Snowflake environment.</li><li>Next, We saw how to configure the Snowflake Kafka Connector properties files to be used with Snowflake.</li><li>Next, How to use the Producer console to send messages to the Consumer console once the complete environment and all the services are up and running.</li><li>Later, We Published a JSON file using the Standalone Producer Console with the properties file we configured in step 5 and confirmed the JSON data was published to the Snowflake table mapped in the file.</li><li>At Last, we discussed the possible problems that may occur during the operations and their resolution.</li></ol><p>The scope of this article was very limited to using the no-code apache Kafka service, but in most of the use cases for real-time data ingestion, we code our own producer and consumer in any programming languages like python, java, etc., which gives the immense possibility ingest the data. We can also ingest TEXT and AVRO files with this no-code approach but with a workaround, CSV files can also be ingested(Reference link Attached).</p><p><strong>9. REFERENCES:</strong></p><p>CSV Data Ingestion:</p><p><a href="https://medium.com/streamthoughts/streaming-data-into-kafka-s01-e01-loading-csv-file-8ea053b232cb">https://medium.com/streamthoughts/streaming-data-into-kafka-s01-e01-loading-csv-file-8ea053b232cb</a></p><p>Apache Kafka Documentation:</p><p><a href="https://kafka.apache.org/documentation/">https://kafka.apache.org/documentation/</a></p><p>Configuration to improve performance:</p><p><a href="https://towardsdatascience.com/10-configs-to-make-your-kafka-producer-more-resilient-ec6903c63e3f">https://towardsdatascience.com/10-configs-to-make-your-kafka-producer-more-resilient-ec6903c63e3f</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=100110aa7af6" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Tableau Dashboard Design Tips]]></title>
            <link>https://medium.com/@kipi.ai/tableau-dashboard-design-tips-9e7ddece7bc?source=rss-c198416d197a------2</link>
            <guid isPermaLink="false">https://medium.com/p/9e7ddece7bc</guid>
            <category><![CDATA[tableau]]></category>
            <dc:creator><![CDATA[kipi.ai]]></dc:creator>
            <pubDate>Mon, 03 Apr 2023 20:10:17 GMT</pubDate>
            <atom:updated>2023-04-03T20:10:17.172Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Author: Arif Chaudhary</strong></p><p><strong>Introduction:</strong></p><p>Any data may be represented by a correctly designed dashboard, which can also effectively tell a story and entice users to use it. So pay attention if you’re a team leader or a dashboard designer trying to improve dashboard design feedback!</p><p><strong>Why is good design important for Tableau Dashboard:</strong></p><p>It’s crucial because we need analytics to drive business decisions, and poor business decisions may occur if a dashboard is viewed inaccurately. A decent dashboard should:</p><ul><li>Effectively convey information in a direct and concise manner.</li><li>Gives a clear business context</li><li>Encourage users to take action</li><li>Promote user interaction</li></ul><p>Let’s explore some useful tips for Tableau:</p><p><strong>1] Decide What Clients Need</strong></p><p>The foundation of the entire design should be an understanding of your audience and the analysis that they are trying to perform using our dashboard. Consider emphasizing those with KPIs at the top or side of the screen if they are looking for a sales figure or profit margin, so they are visible and simple to find.</p><p>Starting at a high degree of granularity and guiding your clients down as they explore the data is a solid general rule for any data analysis. This may be done in Tableau in a number of ways, including by using hierarchies, parameter actions, or the viz in the tooltip feature. The likelihood that your users will complete their tasks more quickly increases if all the necessary metrics are gathered on a single page, but this shouldn’t come at the expense of adequate white space and spacing.</p><p><strong>2] The Best Visualization to Use</strong></p><p>The analyst or dashboard creator’s most crucial step is probably selecting the correct visualization because it will aid in the presentation of the particular sort of data. The selection of chart types is one of the Tableau Dashboard best practices that many data analysts do wrong. It’s crucial to choose the appropriate chart types for your views. Making poor business decisions can result from selecting inaccurate data, which can lead to misunderstandings.</p><p>As a side note, selecting a horizontal bar graph is effective in many situations, but if you just use them, your dashboard will be visually monotonous. Both are maintaining the reader’s interest and making sure they are viewing the proper visual depiction of the material are crucial.</p><p>For Example:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*-hJ3dyra4zebFTba.png" /></figure><p><strong>3] Simplify the Use of Color</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*GkWvn84mvJLSun7G.png" /></figure><p>The colour of dashboards is an essential component. Color can be used to assist design aesthetics or to indicate distinctions between measures or dimensions. The usual “good” and “bad” colors are red and green, respectively.</p><p>Every colors on your dashboard should be able to be explained, including why it was chosen and what it means to the customer. Remove the colors if you are unable to explain that.</p><p><strong>4] Use of Images &amp; Icons</strong></p><p>Utilizing icons and visuals in a dashboard can significantly encourage users to use your dashboard. A few tables and graphs may not always be as effective at retaining information as a single visual reference. Use artwork to make a dashboard more familiar and to improve the overall user experience.</p><p><strong>5] Make Wireframes or Sketches</strong></p><p>Drafting sketches is one of my essential Tableau dashboard best practices. I like to have a general notion of what a dashboard should look like before I start building one. To make things simpler when I start to create, I typically sketch out the design. It also helps to avoid clutter in the dashboard.</p><p><strong>6] Divide the Dashboard into Various Sections</strong></p><p>One of the most important Tableau Dashboard best practices is dividing dashboards into parts. To make it easier to analyze and comprehend, you must break it up into manageable chunks. But with so much information, you can end up drowning. The secret is to revisit the questions you want to clarify before returning to the design board.</p><p>For example, you can divide the sections like the KPI section, the bar charts to evaluate category data, the line charts to display the various trends, and the gauge charts to compare performance in the various areas.</p><p><strong>7] Do Some Formatting on the Dashboard</strong></p><p>One of the most crucial Tableau best practices is formatting your dashboard, which you are not doing. I prefer to remove all grid lines from the charts after creating views to give them a clean appearance. Occasionally, I just leave the borders around the chart alone without using a border around the container and instead remove the borders from each chart and utilize the layout containers in their place.</p><ul><li>The key insight is frequently right there in the descriptive titles of a decent Tableau dashboard format.</li><li>Subtitles are frequently used to clarify or provide additional information or to draw attention to a second key insight in a fantastic Tableau dashboard formatting design.</li><li>The finest Tableau dashboard formatters use callouts or tooltips to draw attention to important information in the current view.</li><li>They offer guidance on how to utilize the chart as well as how to understand it.</li><li>They include axes that are descriptive on the charts and legends.</li><li>They set up the entire perspective to be easily readable.</li></ul><p><strong>Conclusion:</strong></p><p>Data analysis is all about presenting a story rather than just supplying the punchline, just like any good joke. There are a few best practices that should be followed in order to accomplish this efficiently. Always put maintaining the persona of your users and the analysis they are attempting before our other design-centric ideas. With each tip, your story should become more compelling.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9e7ddece7bc" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[External Tokenization Using Fortanix]]></title>
            <link>https://medium.com/@kipi.ai/external-tokenization-using-fortanix-dc7e113682c1?source=rss-c198416d197a------2</link>
            <guid isPermaLink="false">https://medium.com/p/dc7e113682c1</guid>
            <category><![CDATA[snowflake]]></category>
            <dc:creator><![CDATA[kipi.ai]]></dc:creator>
            <pubDate>Mon, 03 Apr 2023 20:06:37 GMT</pubDate>
            <atom:updated>2023-04-03T20:06:37.744Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Author: Kiran Pacchipulusu &amp; Rohan Prabhakar</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/658/0*OkoQzy5lbsyJ9QaD.png" /></figure><p><strong>Objective: </strong>This document explains how to use an API Gateway proxy service to execute the <strong>Fortanix Data Security Manager (DSM)</strong> Plugin through Snowflake for tokenization and de-tokenization.</p><p>Tokenization is the process of replacing sensitive data with unique identification symbols that retain all the essential information about the data without compromising its security. The token is <strong>a randomized data string that has no essential or exploitable value or meaning</strong>.</p><p>The Fortanix DSM keys that will be used for the tokenization or detokenization of different columns must be specified by Snowflake External Functions at the time of construction. So long as certain headers are mapped, the API Gateway can continue to be stateless and simply route requests from Snowflake to the Fortanix DSM plugin.</p><p>To send information about key names, we’ll use the “headers” property of CREATE EXTERNAL FUNCTION. The following header name and value should be used:</p><p>This will have the heading “key-names.” Value for the header will be a list of key names separated by commas. The first entry matches the data’s first column, and so on.</p><p>There must be an existing key with the key names listed in the header. The DSM plugin for Fortanix won’t generate the key. It will check and make sure the key is real. Additionally, the Fortanix DSM plugin will confirm that the number of key names given in the header corresponds to the number of columns in the Snowflake data. The operation will fail if there are fewer keys than there are columns.</p><p><strong>Setting up the Fortanix Data Security Manager</strong></p><p>Put in the information as it appears in the screenshot below:</p><p>Add example: The instance generated will be known by this name.</p><p>In the section titled “Create tokenization keys,”</p><p>Choose the data type that applies to you. Users can create security objects that fall under any of the four tokenizer data type categories, depending on the sort of data they want to protect.</p><p>You can construct as many token objects as you need.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/636/0*cmK3cZby3KFdecwd.png" /></figure><p>Give the instance a name and create tokenization keys.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/560/0*kNPhcBsTNjgXqcg1.png" /></figure><p>From the instance details, take note of the API Key. When configuring your API gateway, you will require the API Key. Click COPY API KEY to copy the API Key.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/494/0*iHpsFeFlCCTw9Z-9.png" /></figure><p>By selecting View All from the integration wizard, you may see every instance.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/786/0*vRrlJLRepu6kHoEJ.png" /></figure><p><strong>Setting up AWS API Gateway Proxy Service</strong></p><p>Create an AWS REST API Gateway</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/791/0*WU_5KgCEh0pdSGcn.png" /></figure><p>Add two resources for Tokenize and Detokenize. For each resource method, configure Integration Request with the following configuration:</p><p>Integration type: HTTP</p><p>Endpoint URL: Point it to your Plugin URL</p><p>Content handling: Passthrough</p><p>HTTP Headers — Add the “Authorization” header and leave the value empty, as it’ll be sent by Snowflake through an External Function custom header.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/322/0*d18Zu0p5kPq8s2z1.png" /></figure><p>Configure the gateway settings and add the HTTP header.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/715/0*ag9Bc1wARtegMJbE.png" /></figure><p>Add Mapping template</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/655/0*IM461pQ8CvmNLs0R.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/634/0*6NPwWa5QpZq33shv.png" /></figure><p><strong>Test the AWS API Gateway</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/566/0*wTcZoDqiJJb5XRNc.png" /></figure><p>Create an AWS IAM role for Snowflake.</p><p>Deploy the proxy service on a Demo stage.</p><p>Configure the AWS API Gateway Deployment stage and the IAM role in Snowflake.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/804/0*ZeSD2pzjXLDCjtT7.png" /></figure><p>Create an external function for the Email Address column.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/784/0*Zt09GgoxovuinVLs.png" /></figure><p>Viewing Table from any role.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/798/0*r3o3ir9CHHYxgSqN.png" /></figure><p><strong>We can see that the “Email Address” column is tokenized.</strong></p><p>Viewing Table from the Designated role.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/794/0*rb7KyCiDQ1kGo-Qx.png" /></figure><p><strong>We can see that the “Email Address” column is de-tokenized while using the designated role.</strong></p><p><strong>Conclusion:</strong></p><p>External tokenization using Fortanix has been successfully done through AWS API Gateway. Using the external function and API integration in Snowflake, the process of using external tokenization can be expedited through Fortanix DSM.</p><p><strong>References:</strong></p><ol><li><a href="https://www.fortanix.com/solutions/use-case/tokenization">https://www.fortanix.com/solutions/use-case/tokenization</a></li><li><a href="https://resources.fortanix.com/fortanix-tokenization-data-sheet">https://resources.fortanix.com/fortanix-tokenization-data-sheet</a></li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=dc7e113682c1" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[SSO Configuration From Salesforce To Tableau Server Using SAML]]></title>
            <link>https://medium.com/@kipi.ai/sso-configuration-from-salesforce-to-tableau-server-using-saml-de6bb19cb5b?source=rss-c198416d197a------2</link>
            <guid isPermaLink="false">https://medium.com/p/de6bb19cb5b</guid>
            <category><![CDATA[tableau]]></category>
            <dc:creator><![CDATA[kipi.ai]]></dc:creator>
            <pubDate>Mon, 03 Apr 2023 20:05:48 GMT</pubDate>
            <atom:updated>2023-04-03T20:05:48.005Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Authors: Krunal Patel, </strong><a href="/service/mailto:rakesh.b.singh@kipi.bi"><strong>Rakesh Singh</strong></a><strong>, </strong><a href="/service/mailto:ayush.s.chaturvedi@kipi.bi"><strong>Ayush Chaturvedi</strong></a><strong>, </strong><a href="/service/mailto:mahendra.p.singh@kipi.bi"><strong>Mahendra Singh</strong></a><strong>, </strong><a href="/service/mailto:mukesh.r.kumawat@kipi.bi"><strong>Mukesh Kumawat</strong></a></p><p>You don’t want your users to log into Salesforce only to find a Tableau login screen where the dashboard is supposed to be. To avoid this, once your dashboards are embedded, you’ll want to set up single sign-on across the two applications. The legacy way of doing this with Tableau Server requires several steps to set up trusted authentication between your identity provider, Salesforce and Tableau. The goal of this article is to answer the same. This method takes advantage of Tableau’s SAML authentication capabilities to establish single sign-on (SSO).</p><p>Alright, let’s get started!</p><p><strong>Simplified SAML architecture</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*5IT__SvFPGJ6PEJT.png" /></figure><ol><li>A person accesses Salesforce and inputs their username to log in.</li><li>The Salesforce platform initiates the authentication procedure and forwards the request to the designated identity provider.</li><li>The identity provider then asks for additional information from the user and verifies their identity.</li><li>Upon successful authentication, the identity provider sends a SAML success response back to Salesforce.</li><li>The person is then able to navigate to a page featuring a Tableau dashboard.</li><li>Salesforce passes along the SAML success response to Tableau,</li><li>Tableau confirms the user’s permission to view the dashboard and presents it.</li></ol><p>In order to make all the above work, you will need to do a little setup in Tableau and Salesforce.</p><p><strong>Implementation Steps</strong></p><p><strong>Step 1: Add SSL certificate and key</strong></p><p>Encryption of HTTP traffic via SSL certificates is necessary. To set it up, we would need to upload an SSL certificate file (.crt) and an SSL certificate key file (.txt).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*8wifgmoXBKoXPmlP.png" /></figure><p><em>The Next Step will be a part of the Salesforce configuration.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*RIxJJ4bvGa1jAptm.png" /></figure><p><strong>Step 2: Enable the Identity provider</strong></p><p>To activate Salesforce as an Identity Provider (IdP), navigate to the “Identity Provider” option within the “Setup” app. Then, enable the IdP by checking the relevant box. To set up the certificate, you have the option of using the available self-signed certificate or creating a new one.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*HV0fwJo826u_jRi8.png" /></figure><p>After enabling the IdP, you will be directed to a page with its description. At the top of the page, click the “Download Metadata” button to obtain the necessary configuration for Tableau Server. The downloaded file will have a distinctive name, but for the purposes of this guide, it will be referred to as “<strong>Salesforce-SAML-Metadata.xml</strong>.”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*FD_-whJ7QjvvMHXe.png" /></figure><p>At the bottom of the page, locate the “Service Providers” section. Here, you will find a link to create a new connected app.</p><p><em>The next step involves setting up SAML for Tableau.</em></p><p>Tableau offers SAML configuration for either the entire Server or for specific sites. For this guide, we will configure a Server-wide SAML for single sign-on.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*aYVzzyMrVC2jOx6r.png" /></figure><p><strong>Step 3: Create a User</strong></p><ul><li>When setting up SAML for single sign-on, the authentication process will use a user login from Salesforce. Therefore, it’s important to create the corresponding user on Tableau Server prior to the SSO start. To ensure a successful login, make sure to create the Tableau user with the same username as in Salesforce.</li></ul><p><strong>Step 4: Place Metadata, Certificate, and Key file in Tableau Server Directory</strong></p><ul><li>In the previous step, you should have downloaded the metadata file “Salesforce-SAML-Metadata.xml.” Copy this file to the folder “C:\Program Files\Tableau\Tableau Server\SAML” (create this folder if it doesn’t exist). To configure Tableau Server for SAML, you will need the certificate files (.cert and .key) from the IDP (Salesforce). Place these certificates and key files in the same location as the metadata file.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*uixQ5O43gEQYEZXV.png" /></figure><p><strong>Step 5: Configure SAML on Tableau Server</strong></p><ul><li>To complete this step, sign in to the Tableau Server Manager using a browser. Then, go to the “Configuration” tab, select “User Identity and Access,” and choose “Authentication Method.” From there, select SAML as the authentication method.</li><li>After selecting SAML, enter the Tableau Server URL in the “Tableau Server return URL” field, such as “<a href="https://tableau-server/">https://tableau-server</a>.&quot; Next, specify the SAML entity ID. You can use the Tableau Server URL in this field as well. Finally, upload the SAML certificate and key files provided by the IDP, and enable the “SAML Authentication” checkbox.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*PnszgOkuRQq3yiVg.png" /></figure><ul><li>After entering the above information, you will need to download the generated XML metadata file. This file will contain the necessary details to recover the ACS URL and EntityID, which will be shared with Salesforce.</li><li>Additionally, to allow users to sign out after signing in with SAML (single logout or SLO), you will need to provide a SAML sign-out redirect URL on the Tableau Server. To enable this, the IDP must be configured with a SAML Logout endpoint that sends a POST request to the following URL: “https://&lt;tableau-server&gt;/wg/saml/SingleLogout/index.html.”</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*SkEP-PBw-t8Ig5Qe.png" /></figure><ul><li>Once you have completed all the necessary configurations, select “Save Pending Changes” at the bottom. This will prompt a pop-up window at the top of the page. From there, choose “Pending Changes” and click “Apply Changes and Restart.” This will restart the server and will take around 20 minutes to complete.</li></ul><p>To create a Connected App in Salesforce, you will need a few attributes from the Tableau Server. These can be obtained from the Tableau Metadata file. Open the metadata file and search for the entityID and location within it. The entityID refers to the EntityID, and the location refers to the ACS URL.</p><p>The required attributes should look similar to the following:</p><p><strong>Entity ID = “https://www.sftableau.xyz.com&quot;,</strong></p><p><strong>ASC URL =”https://www.sftableau.xyz.com/wg/saml/SSO/index.html&quot;</strong></p><p><em>Next, we will move back to Salesforce to create a connected app.</em></p><p><strong>Step 6: Create a Salesforce Connected App</strong></p><ul><li>To create a Connected App in Salesforce, you need to go to the “Identity Provider” option using the Quick Find search. Then, under the “Service Providers” section at the bottom of the page, click the link to create a new connected app.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*exKQ87YaEgg5SoU_.png" /></figure><ul><li>On the screen for creating a new connected app, enter the basic information fields marked in red, such as the app name, API name, and contact email.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*m9qJQkKn-N-4qstc.png" /></figure><ul><li>Under Web App Settings, click Enable SAML checkbox.</li><li>Enter the Start URL, by default which is the Tableau Server URL.</li><li>Enter Entity ID and ACS URL from the Tableau server in the required fields.</li><li>In the IDP certificate, from the dropdown, select the same certificate that has been shared with Tableau Server.</li><li>Keep the Signing Algorithm for SAML messages as SHA256.</li><li>To automatically log out users from Connected App when logged out of Salesforce, Enable Single Logout.</li></ul><p>In the Single Logout URL, enter the same SAML sign-out redirect URL entered on Tableau.</p><ul><li>For Single Logout Binding, choose HTTP POST.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*HiYa3kAZDZAX4CXD.png" /></figure><ul><li>Finally, Save the changes on the Connected App page.</li></ul><p><em>This creates a Connected App for SAML integration with Tableau Server.</em></p><p><strong>Step 7: Test Connection</strong></p><ul><li>Open Tableau in your web browser, and that should be redirected to Salesforce to log in. Make sure the usernames should match in both Salesforce and Tableau.</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=de6bb19cb5b" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>