<?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 Ashish Patil on Medium]]></title>
        <description><![CDATA[Stories by Ashish Patil on Medium]]></description>
        <link>https://medium.com/@ashishap89?source=rss-359d5cbf33a------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*liGaWYLgbhGYkOw3DNdKuw.jpeg</url>
            <title>Stories by Ashish Patil on Medium</title>
            <link>https://medium.com/@ashishap89?source=rss-359d5cbf33a------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 23 Nov 2026 19:43:44 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@ashishap89/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[GxP Data Is Everywhere. Trusted Intelligence Isn’t.]]></title>
            <link>https://medium.com/@ashishap89/gxp-data-is-everywhere-trusted-intelligence-isnt-18f6e7a55933?source=rss-359d5cbf33a------2</link>
            <guid isPermaLink="false">https://medium.com/p/18f6e7a55933</guid>
            <category><![CDATA[data-lake]]></category>
            <category><![CDATA[gxp]]></category>
            <category><![CDATA[manufacturing]]></category>
            <category><![CDATA[me]]></category>
            <category><![CDATA[data-platforms]]></category>
            <dc:creator><![CDATA[Ashish Patil]]></dc:creator>
            <pubDate>Sun, 18 Oct 2026 07:15:17 GMT</pubDate>
            <atom:updated>2026-10-19T13:03:27.224Z</atom:updated>
            <content:encoded><![CDATA[<p>Moving beyond fragmented regulated data toward a governed, contextualized and AI-ready data foundation</p><blockquote>Part 1 | GxP Data Intelligence Platform Series</blockquote><p>Manufacturing organizations has no shortage of data. Compliance heavy Pharma major will have mix of GxP, Non-GxP, PII, PHI such a variaty of data which must be processed, governed and secured.</p><p>Every batch manufactured, sample tested, quality event investigated, material moved and process parameter recorded leaves behind a digital trail. Manufacturing Execution Systems(MES) capture production activities. Laboratory systems store analytical results. ERP platforms manage materials and transactions. Quality systems manage deviations and investigations. Process historians continuously record equipment and process parameters.</p><p>Yet having more data does not automatically create more intelligence.</p><p>When information remains distributed across systems, represented through different identifiers, interpreted differently across functions and disconnected from its business context, answering even a seemingly straightforward question about a batch, process or quality event can become surprisingly difficult.</p><p><strong>The real challenge is no longer collecting GxP data. It is turning that data into trusted intelligence with right Governance process.</strong></p><p>And that requires us to think beyond the traditional data platform.</p><h3>We Have Plenty of Data. What We Often Lack Is Context</h3><p>Imagine investigating a manufacturing batch.</p><p>The information required to understand that batch rarely exists within a single application.</p><p>The ERP system may tell us which materials were consumed. The MES may contain the production stages and execution records. LIMS may provide laboratory test results. A quality system may contain deviations or investigations. A process historian may contain thousands or millions of equipment readings generated during manufacturing.</p><p>Individually, each system provides part of the story.</p><p>But the valuable questions usually cross system boundaries:</p><blockquote>What happened during this batch?</blockquote><blockquote>Were critical process parameters within the expected operating conditions?</blockquote><blockquote>What were the corresponding laboratory results?</blockquote><blockquote>Were any deviations associated with the batch?</blockquote><blockquote>Have similar patterns occurred in previous batches?</blockquote><p>The problem quickly stops being a reporting problem. It becomes a <strong>data context problem</strong>.</p><h3>Integration Alone Doesn’t Solve the Problem</h3><p>The traditional response to fragmented enterprise data has been integration.</p><p>Extract data from different systems, move it to a central location, transform it and make it available for reporting.</p><p>That remains important, but for regulated data it isn’t enough.</p><p>Suppose a process historian records: <strong>72.4°C at 14:32:08</strong></p><p>Technically, we have data. But what does it mean?</p><p>Its value increases dramatically when that observation can be associated with:</p><blockquote><strong>Site → Manufacturing Area → Equipment → Product → Batch → Manufacturing Stage → Process Step → Timestamp</strong></blockquote><p>Now we are no longer analyzing an isolated temperature reading.</p><p>We are analyzing a process parameter within the context of a particular manufacturing activity.</p><p>That is the difference between <strong>integrating data and contextualizing data</strong>.</p><p>For GxP compliant Manufacturing orgs, contextualization is one of the most valuable capabilities of a modern data platform.</p><h3>But There’s Another Challenge: Do Your Systems Speak the Same Language?</h3><p>Bringing data together exposes another problem that often remains hidden while systems operate independently: <strong>inconsistent master data across applications</strong>.</p><p>The same real-world entity may be represented differently depending on the system.</p><p>For example:</p><ul><li>The <strong>same equipment</strong> may have different IDs or names in ERP, MES and the process historian.</li><li>The <strong>same quality test</strong> may be represented using different test codes or descriptions across laboratory and quality systems.</li><li>A <strong>product or material</strong> may have different identifiers, naming conventions or hierarchies across manufacturing, laboratory and enterprise systems.</li><li>A <strong>site, production line or process step</strong> may be structured differently from one application to another.</li></ul><p>Individually, each system can still operate correctly. The challenge appears when we try to connect the data.</p><p>Consider the same piece of equipment represented as:</p><p><strong>ERP:</strong> EQ-10245<br> <strong>MES:</strong> MIXER-05<br> <strong>Historian:</strong> BLDG2.MXR05</p><p>To a person familiar with the plant, these may clearly refer to the same equipment. To a data platform, however, they are simply three different values unless a reliable relationship exists between them.</p><p>This raises an important question:</p><blockquote><strong><em>Before connecting all your data, have you considered how you will connect the meaning behind that data?</em></strong></blockquote><p>This is where <strong>harmonized master data, canonical identifiers and cross-system mappings</strong> become critical.</p><p>At first, the objective does not necessarily have to be forcing every operational system to use exactly the same identifier. Instead, the data platform can establish a trusted mapping that says:</p><p><strong><em>ERP Equipment ID ↔ MES Equipment ID ↔ Historian Tag/Asset ↔ Common Business Equipment ID</em></strong></p><p>For the longer run, there should cross system harmonization efforts so that all systems refer one golder record.</p><p>The same principle can be applied to <strong>products, materials, batches, equipment, quality tests, sites and business processes</strong>.</p><h3>From Master Data to Business Context</h3><blockquote>Your data can be integrated and still remain disconnected if the underlying master data does not speak the same language.</blockquote><p>Once these relationships are established, something important happens.</p><p>The platform can begin connecting previously isolated pieces of information around common business entities:</p><p><strong>Product → Batch → Equipment → Process Step → Process Parameters → Laboratory Tests → Quality Events</strong></p><p>This becomes one of the foundations for true data contextualization.</p><p>Because before we can ask AI to understand our GxP data, <strong>our systems first need a consistent way to understand each other.</strong></p><h3>This is Where The Data Intelligence Platform Emerges</h3><p>A conventional data platform primarily focuses on bringing data together so it can be stored, processed, reported and analysed.</p><p>A <strong>GxP Data Intelligence Platform</strong> needs to go further.</p><p>It should bring together:</p><p><strong>Data + Context + Governance + Quality + Security + Analytics + AI</strong></p><p>The objective is not simply to create another central repository.</p><p>The objective is to establish a governed ecosystem where data progressively becomes more understandable, trustworthy and reusable as it moves from operational systems toward analytical and intelligent applications.</p><p>Each layer adds something meanigful beyond simply storing another redundant copy of the source data.</p><p>It adds structure, meaning, quality, goverance and eventually intelligence.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FF0ljD5-Ig5aZN-COxNnLA.png" /><figcaption>Journy of source system data to intelligent applications</figcaption></figure><h3>But Can We Trust the Data ?</h3><p>This is where GxP changes the conversation. Making data available is only one part of the problem.</p><p>For important regulated use cases, we may also need to understand questions such as:</p><ul><li><em>Where did the data originate?</em></li><li><em>What transformations were applied?</em></li><li><em>Which business rules influenced the result?</em></li><li><em>Who owns the data?</em></li><li><em>Who is authorised to access it?</em></li><li><em>How is sensitive information handled?</em></li><li><em>is your PII data is exposed to everyone?</em></li><li><em>is data from one manufacturing site is accessible to other site users, if that is not expected ?</em></li><li><em>What is the lineage between source and consumption?</em></li><li><em>What quality controls have been applied?</em></li><li><em>How are relevant changes and activities made traceable?</em></li></ul><p>These questions push governance from the edge of the platform toward its core.</p><blockquote><strong>Governance cannot simply be something added after the pipelines have been built.</strong></blockquote><p>Capabilities such as metadata, lineage, data quality, classification, Role based access control, Row level access restrictions, auditability and ownership need to be considered alongside the data architecture itself.</p><p>The shift is subtle but important:</p><blockquote><strong><em>Governance moves from being documentation about the platform to becoming a capability of the platform.</em></strong></blockquote><h3>Not Everything Needs the Same Level of Control</h3><p>There is another important distinction.</p><p>A platform containing GxP-related data does not necessarily mean every dataset, experiment, dashboard or analytical model should automatically receive exactly the same level of control.</p><p><strong>Intended use matters.</strong></p><p>An exploratory analysis used to discover patterns is fundamentally different from information used to support a regulated process or decision.</p><p>Treat everything with maximum controls and the platform can become unnecessarily restrictive.</p><p>Apply insufficient controls and the organisation introduces a different kind of risk.</p><p>A modern GxP data architecture therefore needs a <strong>risk-based approach</strong>, where the level of governance and control is appropriate to the intended use of the data and the application consuming it.</p><p>This balance between <strong>control and innovation</strong> will become increasingly important as data platforms expand beyond reporting into advanced analytics and AI.</p><h3>And Then Comes AI</h3><p>Generative AI has made this conversation significantly more interesting.</p><p>Organisations increasingly want users to interact with enterprise information through natural language.</p><p>Imagine asking:</p><blockquote>Show me batches where similar process behaviour was observed and summarize the related quality events.</blockquote><p>The AI model may be impressive but underneath that question lies a much harder data problem.</p><p>The system must understand what a batch is. It must connect manufacturing information to relevant process data. It may need to relate laboratory and quality events. It must respect security boundaries and understand which information the user is permitted to access.</p><p>Most importantly, the underlying data needs to be trustworthy enough for the intended use.</p><p>This is why the enterprise AI journey often starts long before the AI model.</p><p>A more sustainable progression is:</p><h4>Trusted Data → Business Context → Governance → Intelligence → AI</h4><p>If the underlying enterprise data remains fragmented, inconsistently defined or poorly governed, placing an AI interface over it does not fix the foundation.</p><p>It can simply make the underlying weaknesses easier to access.</p><h3>From System-Centric Data to Data Products</h3><p>There is another mindset change worth considering.</p><p>Historically, enterprise data has often been organized around systems:</p><ul><li>ERP data</li><li>MES data</li><li>Laboratory data</li><li>Historian data</li><li>Quality data</li></ul><p>But consumers do not necessarily think in systems.</p><p>A manufacturing leader may think about <strong>batch performance</strong>.</p><p>A quality professional may think about <strong>deviation trends</strong>.</p><p>A process engineer may think about <strong>critical process parameters</strong>.</p><p>A supply-chain user may think about <strong>product availability or material movement</strong>.</p><p>A more mature Data Intelligence Platform therefore begins shifting the conversation from <em>which system contains the information?</em> toward <em>which business concept are we trying to understand?</em></p><p>That is where governed <strong>Data Products</strong> and contextual data models become powerful.</p><p>Instead of repeatedly joining disconnected datasets for every new use case, organizations can progressively create reusable, trusted business-level representations of their data.</p><h3>The Destination Isn’t More Data</h3><p>For years, data transformation programmes have focused heavily on moving more data into centralized platforms.</p><p>That solved an important problem. But the next challenge is different.</p><p>Success should not simply be measured by the number of systems connected, tables created or terabytes stored.</p><p>The more meaningful question is:</p><blockquote><strong><em>How easily can trusted data be transformed into useful business intelligence?</em></strong></blockquote><p>A GxP Data Intelligence Platform should progressively make it possible to move from:</p><p><strong>Data → Context → Understanding → Decision → Intelligence</strong></p><p>That requires Data Engineering.</p><p>It requires governance and Master data management.</p><p>It requires security and quality.</p><p>It requires business context.</p><p>And increasingly, it creates the strong foundation upon which analytics and AI can operate more responsibly.</p><h3>The Real Transformation Starts Before AI — Bigger Picture</h3><p>The future of GxP data is not about building a bigger data lake or moving more information into one platform.</p><p>It is about creating a foundation where data from manufacturing, laboratory, quality and enterprise systems can be <strong>connected, harmonized, contextualized, governed and trusted</strong>.</p><p>That requires a fundamental shift:</p><blockquote><strong>From moving data to connecting meaning.</strong><br><strong>From system-specific masters to consistent business entities.</strong><br><strong>From isolated datasets to contextualized data products.</strong><br><strong>From governance as documentation to governance embedded in the data lifecycle.</strong><br><strong>From dashboards that explain what happened to intelligence that helps us understand what could happen next.</strong></blockquote><p>And perhaps most importantly, <strong><em>from asking where the data is to being confident in what the data is telling us.</em></strong></p><p>The excitement around AI makes this transformation even more urgent. AI can make enterprise knowledge easier to discover, analyse and interact with, but it cannot compensate for fragmented identities, inconsistent context or untrusted data foundations.</p><p>So before asking:</p><blockquote><strong><em>“How do we bring AI into GxP?”</em></strong></blockquote><p>there may be a more fundamental question worth asking:</p><blockquote><strong><em>“Is our GxP data ready to become intelligence?”</em></strong></blockquote><p>Because the organizations that solve <strong>trust, context and governance</strong> will be better positioned to unlock the next wave of AI/BI.</p><p><strong>GxP data is already everywhere.</strong></p><p><strong>The next frontier is making it connected, contextualized and trusted enough to become intelligence.</strong></p><p>And that is where the GxP Data Intelligence Platform journey begins but remember thats not the end, its just the start.</p><h3>Up Next | Part 2</h3><p><strong>Designing the GxP Data Intelligence Platform: From Architecture to Trusted Intelligence</strong></p><p>In Part 2, we move from the <strong>why</strong> to the <strong>how</strong>, exploring reference architecture and the major building blocks required to create a scalable GxP Data Intelligence Platform.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=18f6e7a55933" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Apache Superset — Rich Open Source Visualization Platform]]></title>
            <link>https://medium.com/analytics-vidhya/apache-superset-rich-open-source-visualization-platform-a13785944c83?source=rss-359d5cbf33a------2</link>
            <guid isPermaLink="false">https://medium.com/p/a13785944c83</guid>
            <category><![CDATA[big-data]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[apache-superset]]></category>
            <category><![CDATA[data-engineering]]></category>
            <category><![CDATA[data-visualization]]></category>
            <dc:creator><![CDATA[Ashish Patil]]></dc:creator>
            <pubDate>Sat, 21 Sep 2019 07:43:26 GMT</pubDate>
            <atom:updated>2019-09-26T08:29:41.072Z</atom:updated>
            <content:encoded><![CDATA[<h3>Apache Superset — Rich Open Source Visualization Platform</h3><p>Another ambitious Pythonic project from creators of Apache Airflow.</p><p>It’s a Data Visualization tool initially designed by Airbnb and later open sourced for the community.</p><p>Superset is a Data Exploration platform designed to be visual, intuitive and interactive. It allows to slice, dice and visualize data.</p><p>It’s written in python and uses Flask as web framework library.</p><p>Apache Superset being an open source tool in visualization category has added new capabilities for data engineers in big data ecosystem.</p><h3>Key Features</h3><ol><li>It supports multiple types of visualizations with filters.</li><li>It supports all the data sources that support SQL Alchemy.</li><li>Superset allows caching for loading and sharing dashboards.</li><li>Easy, attractive and interactive view that allows data exploration.</li><li>Supports querying using SQL.</li><li>It comes with security features like Authentication, User Management and Roles.</li></ol><h3>Installation and Configuration</h3><p>Let’s try to get first look of Superset UI, which I initially found it similar to Airflow kinda, which is very obvious as it is also using the same Flask library as a web framework.</p><p>Along with installation, in the end i will also mention some errors i came across while going through this process. So this will help to have installation commands and probable issues at one place in one article.</p><p>Let’s start …</p><p>I am using Linux machine on GCP to install Apache Superset.</p><p>Apache Superset has some OS-level dependencies, which needs to be installed prior to installing superset</p><pre>sudo yum upgrade python-setuptools</pre><pre>sudo yum install gcc gcc-c++ libffi-devel python-devel python-pip python-wheel openssl-devel libsasl2-devel openldap-devel</pre><p>I have installed Python 3.6 and created separate virtual environment for Superset installation.</p><pre>python3.6 -m venv superset_virtualenv</pre><p>Let’s activate this virtual environment,</p><pre>source environments/superset_virtualenv/bin/activate</pre><p>Before installing python packages and Superset, we need to upgrade pip utility to latest version,</p><pre>pip install — upgrade setuptools pip</pre><p>Now, we will first download list of all the required packages which are prerequisites for Superset otherwise installation process gives errors. This requirement list is available at Superset github repository.</p><pre>wget <a href="https://raw.githubusercontent.com/apache/incubator-superset/master/requirements.txt">https://raw.githubusercontent.com/apache/incubator-superset/master/requirements.txt</a></pre><pre>pip install -r requirements.txt</pre><p>Now, this is time to install Superset</p><pre>pip install superset</pre><p>This will install latest version of Apache Superset. If no error observed we can assume the successful installation of superset.</p><p>Now, initialise the database where superset keeps all of its metadata.</p><pre>superset db upgrade</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/1*G9iZMt7AmK2XXLvpb1g7CA.png" /><figcaption>superset database initialisation</figcaption></figure><p>Create an admin user, here we will be prompted to set username, first and last name before setting a password.</p><pre>fabmanager create-admin — app superset</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/1*OyBZsuLHvrTbuPndmpXgaA.png" /><figcaption>superset user creation</figcaption></figure><p>Maintain user and password details for future references.</p><p>If you have worked with Apache Airflow, it provides some example DAG’s for users to play with. On the same line Superset also comes with some examples which we need to load initially. Let’s do this,</p><pre>superset load_examples</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/1*XJj_doFz-omRnkpWwaeRcA.png" /><figcaption>Load sample Examples</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/1*52PNikDcVHp4PpE6Krl67g.png" /></figure><p>Superset also uses fab based user authentication model which comes with default roles and permissions. Let’s initialise so that the default roles are made available.</p><pre>superset init</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/1*xsqIAPdkYU15n5Mr9l1lSg.png" /><figcaption>Initialise default Roles and Permissions</figcaption></figure><p>Now, we are ready to start Superset server.</p><pre>superset runserver -d</pre><p>This will start Superset development web server on port 8088. To run on another port we can use -p parameter.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/1*zU7glCC7_CPiXfJYNBb1vg.png" /><figcaption>Run Superset Server</figcaption></figure><p>The URL for Superset web server will be <a href="http://localhost:8088/"><strong>http://localhost:8088</strong></a><strong>. </strong>login using the credential entered while creating the admin user.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/1*6MR3ZmR-nWrts4hPaiJtKw.png" /><figcaption>Login screen</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/1*2g1xvsCM6GHtn_qqnK0rRA.png" /><figcaption>Post login</figcaption></figure><p>If we go to Dashboards tab, will see sample example dashboards we loaded to play with like World Bank Data and Births.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/1*HhYRosoRb0sLleQqzp3NUA.png" /><figcaption>World Bank Data Dashboard</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/1*1HSf5ppzIMAE8PoyeWlVXA.png" /><figcaption>Births Dashboard</figcaption></figure><p>So, that’s it. It&#39;s a great tool to explore on how it fits into BI ecosystem for dashboarding and visualization needs and also it is being used by some companies for their requirements as it is available as open source with lot of benefits.</p><p>But then where does it lack while competing with more robust and licensed tools like Tableau:</p><ol><li>As its open source one need to rely on community for bug fixes.</li><li>Currently it doesn’t support NoSQL databases.</li><li>Tableau can access and join multiple tables from same or different databases whereas in Superset we need to create views for multiple table joins. So we should know how to write SQL queries.</li><li>As Superset is still in incubation, it’s still growing and maturing hence currently it has limited customisation options and dashboard features, but it is growing fast.</li></ol><h3>Errors while Installation</h3><p>I am mentioning some errors which I encountered while Superset installation. Hope this will be useful while you start with your installation process,</p><ol><li><strong>While using fabmanager command, flask version conflict occurs.</strong></li></ol><p>This issue causes lot of headache if Flask version requirement is not satisfied. So upgrade pip utility and reinstall flask.</p><pre>pip install — upgrade setuptools pip<br>pip install — upgrade flask</pre><h4>2. Error: cannot import name ‘_maybe_box_datetimelike’ while creating admin user.</h4><p>Go to &lt;path to your virtual env&gt;/superset_virtualenv/lib/python3.6/site-packages/superset.</p><p>And replace the two occurrences of <strong>_maybe_box_datetimelike</strong> with <strong>maybe_box_datetimelike</strong> in <strong>dataframe.py</strong> file. Now, re-run the user creation step.</p><p><strong>Issue Reference:</strong> <a href="https://github.com/apache/incubator-superset/issues/6770">https://github.com/apache/incubator-superset/issues/6770</a></p><h4>3. ModuleNotFoundError: No module named ‘flask.exthook’</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/1*7r3xg2w9GaT7toOqo2L1xg.png" /></figure><p>To avoid this issue, as i mentioned above before installing Superset first install all the required dependent packages using requirement.txt.</p><pre>wget <a href="https://raw.githubusercontent.com/apache/incubator-superset/master/requirements.txt">https://raw.githubusercontent.com/apache/incubator-superset/master/requirements.txt</a></pre><pre>pip install -r requirements.txt</pre><pre>pip install — upgrade superset</pre><pre>pip install sqlalchemy==1.2.18</pre><p><strong>Issue Reference:</strong> <a href="https://www.gitmemory.com/issue/apache/incubator-superset/7861/511873236">https://www.gitmemory.com/issue/apache/incubator-superset/7861/511873236</a></p><p>I hope, this article will help you understand what Apache Superset is and how to install it to play around nice visualizations which Apache Superset provides.</p><p>For more details and road map please check superset documentation at below link,</p><p><a href="https://superset.incubator.apache.org/">Apache Superset (incubating) - Apache Superset documentation</a></p><p>Find github repository code at below link,</p><p><a href="https://github.com/apache/incubator-superset">apache/incubator-superset</a></p><p>Thanks for reading this article. Happy learning!</p><p><strong>#ApacheSuperset #Python #DataEngineering</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a13785944c83" width="1" height="1" alt=""><hr><p><a href="https://medium.com/analytics-vidhya/apache-superset-rich-open-source-visualization-platform-a13785944c83">Apache Superset — Rich Open Source Visualization Platform</a> was originally published in <a href="https://medium.com/analytics-vidhya">Analytics Vidhya</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Python 3: Two brothers under single roof]]></title>
            <link>https://medium.com/plumbersofdatascience/python-3-two-brothers-under-single-roof-a552eb93912a?source=rss-359d5cbf33a------2</link>
            <guid isPermaLink="false">https://medium.com/p/a552eb93912a</guid>
            <category><![CDATA[python]]></category>
            <category><![CDATA[python3]]></category>
            <category><![CDATA[data-engineering]]></category>
            <category><![CDATA[linux]]></category>
            <category><![CDATA[google-cloud-platform]]></category>
            <dc:creator><![CDATA[Ashish Patil]]></dc:creator>
            <pubDate>Sun, 10 Feb 2019 15:11:49 GMT</pubDate>
            <atom:updated>2019-02-10T15:11:49.132Z</atom:updated>
            <content:encoded><![CDATA[<p>Yes, you got it right. Two brothers, two different versions of Python, 2 and 3 on the same Linux machine.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/414/1*GdWRWOx-HBSJ8N3BC8GkUQ.jpeg" /><figcaption>Image Credits: Python.org</figcaption></figure><p>Have you ever worked with both on the same Linux system ? That’s really cool to play with.</p><p>This article is nothing but a step by step guide to help you configure Python 3 version on the Linux based system like AWS EC2 or EMR instances where Python 2.7 exists by default.</p><p>Most of the times we use python 2 versions for our programming needs. But nowadays lot of applications are moving out of support for python 2 , so there is a strong need to migrate all our version 2 codes to python 3 because there are some constructs in python 2 which does not support in Python 3 and hence needs revamp.</p><p>So lets install/build python 3 in such a way that both the versions of python i.e. 2 and 3 can co-exist on the same system.</p><p>This is very well possible by building alternate python versions on system where another version of python already exists.</p><p>The process is simple but you may face some issues due to lack of some modules necessary for python build process. Hence consolidating all those error resolutions and came up with extensive installation process which i failed to find on google. Hope this will help.</p><p>Lets go step by step to build python 3 on Linux based system. Following are the environment details,</p><p>OS: RHEL Linux VM on GCP</p><p>Python 3 version: 3.5.6</p><p>I would recommend that before starting build process please go through readme files provided in zip files downloaded for python 3. It has lot of clear instructions which gives clear idea about process.</p><blockquote>Below is the step by step guide for successful build of Python 3.5.6</blockquote><p>Update system to latest versions and get source file for Python 3.5.6 then unzip the files.</p><p><em>sudo yum update</em></p><p><em>wget </em><a href="https://www.python.org/ftp/python/3.5.6/Python-3.5.6.tar.xz"><em>https://www.python.org/ftp/python/3.5.6/Python-3.5.6.tar.xz</em></a></p><p><em>tar -xvf Python-3.5.6.tar.xz</em></p><p>Pre-requisites to start build process for Python is following modules are required to complete it successfully, hence lets install those first,</p><p><em>sudo yum groupinstall “Development tools”</em></p><p><em>sudo yum install gcc gcc-c++ zlib zlib-devel libffi-devel openssl-devel<br>readline-devel tk-devel gdbm-devel lzma docutils yum-utils</em></p><p><em>sudo yum install bzip2-devel ncurses-devel sqlite-devel db4-devel libpcap-devel xz-devel expat-devel</em></p><p>Another important thing to remember is Python 3 requires SSL module to exist on system hence make sure openssl component is present, to check this</p><p><em>sudo find / -name ‘openssl*’</em></p><p>It will show locations like <em>/usr/include/openssl</em>.</p><p>Now go to file Modules/Setup.dist present in Python3.5.6 installable folder downloaded and change following lines for SSL as given below,</p><p><em>cd /home/downloads/Python-3.5.6/</em></p><p><em>cd Modules</em></p><p><em>vi Setup.dist</em></p><h4>Search for SSL and uncomment last lines having path for openssl.</h4><p><em># Socket module helper for SSL support; you must comment out the other</em></p><p><em># socket line above, and possibly edit the SSL variable:</em></p><p><em>#SSL=/usr/local/ssl</em></p><p><strong><em>SSL=/usr/include/openssl</em></strong></p><p><em>_ssl _ssl.c \</em></p><p><em>-DUSE_SSL -I$(SSL)/include -I$(SSL)/include/openssl \</em></p><p><em>-L$(SSL)/lib -lssl -lcrypto</em></p><p>Save the changes and now we are ready to run build process steps as given below,</p><p><em>cd Python-3.5.6</em></p><p><em>./configure — enable-optimizations</em></p><p><em>make</em></p><p><em>make test</em></p><p><em>sudo make altinstall</em></p><p>As per the documentation — enable-optimizations parameter helps to optimise the entire build process whereas altinstall parameter used will install python 3 without overwriting existing python version.</p><blockquote>Creating Virtual Environment<br>Virtual environments are always been useful for handling version dependencies for different applications. This helps multiple applications with different version requirements to coexist on single platform.</blockquote><p>Create new directory to create virtual environments.<br><em>mkdir environments</em></p><p><em>cd environments</em></p><p>Following command will create virtual environment using installed python 3 version<br><em>python3.5 -m venv my_sample_virtualenv</em></p><p>This will create new directory my_sample_virtualenv with all required python 3 binaries.</p><blockquote>Now, lets Activate this virtual environemnt</blockquote><p><em>source environments/my_sample_virtualenv/bin/activate</em></p><p>Once virtual environment is activated, you are ready to install and configure other applications which are depending on Python 3 on top of it which will use Python 3 binaries installed under Python 3 virtual environment.</p><p>Hope this becomes your starting point for your Python 3 journey.</p><p>Happy Learning ….. !!!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a552eb93912a" width="1" height="1" alt=""><hr><p><a href="https://medium.com/plumbersofdatascience/python-3-two-brothers-under-single-roof-a552eb93912a">Python 3: Two brothers under single roof</a> was originally published in <a href="https://medium.com/plumbersofdatascience">Plumbers Of Data Science</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Apache Spark basics for Dummies like Me]]></title>
            <link>https://medium.com/@ashishap89/apache-spark-basics-for-dummies-like-me-c9d7297c21eb?source=rss-359d5cbf33a------2</link>
            <guid isPermaLink="false">https://medium.com/p/c9d7297c21eb</guid>
            <category><![CDATA[big-data]]></category>
            <category><![CDATA[etl]]></category>
            <category><![CDATA[apache-spark]]></category>
            <category><![CDATA[data-engineer]]></category>
            <category><![CDATA[data-science]]></category>
            <dc:creator><![CDATA[Ashish Patil]]></dc:creator>
            <pubDate>Mon, 29 Oct 2018 15:34:53 GMT</pubDate>
            <atom:updated>2018-11-04T06:24:10.411Z</atom:updated>
            <content:encoded><![CDATA[<h3>Apache Spark basics for Dummies</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/340/1*Fs4sofTkNbTBw56r5xAPTg.png" /></figure><p>I believe, when you start a journey, it is always good to share your experiences, so that someone else who is starting the same journey wouldn’t have to tackle the same problems wasting valuable time and efforts, reinventing the wheels. Instead inventing different things would benefit others in the community.</p><p>Coming from Database background, i feel there are always some questions come to our mind which are very basic but plays important role in some of our use cases. Hence, It is exciting to explore kind of capabilities Spark provides to tackle similar problems we tackled with legacy systems.</p><p>Here are some of them came across,</p><blockquote><strong>1. Is Spark case-sensitive ?</strong></blockquote><p>By default Spark is case insensitive, however we can make it case sensitive by using configuration setting, set spark.sql.caseSensitive true or spark.sql(“set spark.sql.caseSensitive=true”)</p><blockquote><strong>2. Can we CAST columns to diff types, like Oracle or Teradata.</strong></blockquote><p>Yes, it is very well possible to cast columns in Spark with help of withColumn() method.</p><p>df.withColumn(“Emp_id”, col(“emp_id”).cast(“long”))</p><p>Similar to select * , cast(emp_id as long) as Emp_id from Table in SQL.</p><blockquote><strong>3. Is it possible to sort NULL values.</strong></blockquote><p>Spark provides parameters asc_nulls_first,asc_nulls_last etc. along with orderBy() method to sort NULL values along with other column combinations.</p><p>For optimisation it is recommended to use sortWithinPartitions() method, which sorts within partitions before other transformation.</p><blockquote><strong>4. Can we Insert/Update rows into Spark dataframes ?</strong></blockquote><p>Unlike pandas dataframes, Spark dataframes are immutable. As an alternative, we may join/union two dataframes to generate final dataframe having same schema, sequence and number of columns as unions are performed based on location and not on the schema.</p><blockquote><strong>5. What’s the Entry point for writing Spark scripts.</strong></blockquote><h4><strong>Prior to Spark version 2.0:</strong></h4><p>sparkContext was the main entry point to all spark functionality. Initially sparkConf object is required to be created, which stores configuration parameters like application name, num of cores and executor memory etc. In order to use SQL, HIVE, and Streaming API’s separate contexts need to be created.</p><p><em>Example (In Scala) :</em></p><p>creating sparkConf :</p><p>val conf = new SparkConf().setAppName(“MasterDataAnalysis”).setMaster(“local[4]”).set(“spark.executor.memory”, “2g”)</p><p>creating sparkContext:</p><p>val sc = new SparkContext(conf)</p><p>The SparkConf associated with a given application is immutable once it is passed to the SparkContext.</p><p>That means that all config decisions must be made before a SparkContext is instantiated.</p><h4><strong>SPARK version 2.0 onwards:</strong></h4><p>SparkSession provides a single point of entry to interact with all the underlying Spark functionality and allows programming Spark with DataFrame and Dataset APIs.</p><p>No need to create separate contexts.</p><p><em>Example (In Scala) :</em></p><p>val spark = SparkSession.builder.appName(“TrendDataAnalysis”).getOrCreate()</p><p>Configuring properties:</p><p>spark.conf.set(“spark.executor.memory”, “2g”)</p><p>Hope the content is helpful. Would love to share similar interesting facts coming across the spark journey in future.</p><p>Happy Learning !!!</p><p><em>Reference: Learning Spark Holden Karau &amp; Matei Zaharia</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c9d7297c21eb" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Dynamic Dependency Generation with Apache Airflow Scheduler]]></title>
            <link>https://medium.com/plumbersofdatascience/dynamic-dependency-generation-with-apache-airflow-scheduler-eac45444b088?source=rss-359d5cbf33a------2</link>
            <guid isPermaLink="false">https://medium.com/p/eac45444b088</guid>
            <category><![CDATA[big-data]]></category>
            <category><![CDATA[data-engineering]]></category>
            <category><![CDATA[etl]]></category>
            <category><![CDATA[apache-airflow]]></category>
            <category><![CDATA[spark]]></category>
            <dc:creator><![CDATA[Ashish Patil]]></dc:creator>
            <pubDate>Wed, 17 Oct 2018 12:17:29 GMT</pubDate>
            <atom:updated>2019-11-16T15:33:04.381Z</atom:updated>
            <content:encoded><![CDATA[<h3>Apache Airflow : One stop solution to manage your Data Calendar</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*y8cdcH_cYTnNrPt02v80OA.jpeg" /><figcaption>Image Source: unsplash.com</figcaption></figure><p>Apache Airflow is one of the scheduler which is used by lot of enterprises to orchestrate their data pipelines.</p><p>It is very efficient platform to schedule the data processing jobs which can be based on calendar based trigger or event based trigger. It also allows to define the dependency between multiple jobs using upstream and downstream operators.</p><p>Based on the dependencies, Airflow generates a DAG and runs tasks.</p><p>One pain point here is, Having limited number of tasks is not a big deal for manually creating dependencies among those tasks using operators but challenge arises when we have hundreds of tasks in our data pipelines or in ETL execution plans.</p><p>To handle such use-cases we have to have some way to dynamically generate such dependencies between tasks which needs to be part of entire data workflow.</p><p>Below is such an example where i tried to generate dependencies dynamically in Airflow using single python script.</p><p>When this script is placed in <em>/airflow/dags/</em> folder Airflow automatically generates tasks along with the hierarchy of dependencies.</p><p>Airflow stores all its task history in metadata database. On the similar grounds, the idea is to hold metadata for all tasks of data workflow in same metadata database (but a different table) and generate DAG out of it.</p><p>So, before writing code we need to prepare metadata in a format required for us. I stored this metadata in MySQL.</p><blockquote><strong>Metadata Preparation:</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nOKTIaVHo3N7953ppCEFiA.png" /><figcaption>Metadata table in MySQL with Tasks data</figcaption></figure><p>Airflow has two measure components, <strong>Webserver </strong>and <strong>Scheduler</strong>, <strong>Workers</strong> <em>(when we run airflow in celery mode)</em>.</p><p>To start Airflow, we need to start webserver and scheduler services. Once scheduler is up it picks up dag files (nothing but a .py files) stored under folder <em>/airflow/dags</em></p><p>For my example, below is the python code, which should be placed in Airflow’s <em>~/dags</em> folder as python script,</p><blockquote><strong>Airflow DAG Script:</strong></blockquote><pre>#Import inbuilt module<br>import os</pre><pre>#Import MySQL module for mysql connectivity<br>import MySQLdb<br>import pandas as pd</pre><pre>#Import Airflow module and Operator<br>from airflow import DAG<br>from airflow.operators.bash_operator import BashOperator<br>from datetime import timedelta,datetime</pre><pre>default_args = {<br> ‘owner’: ‘airflow’,<br> ‘depends_on_past’: False,<br> ‘start_date’: datetime.today(),<br> ‘email’: [‘<a href="/service/mailto:airflow@example.com">airflow@example.com</a>’],<br> ‘email_on_failure’: False,<br> ‘email_on_retry’: False,<br> ‘retries’: 1,<br> ‘retry_delay’: timedelta(minutes=5),<br>}</pre><pre>dag = DAG(<br> dag_id=’Dynamic_DAG_Example’,<br> default_args=default_args,<br> description=’A Dynamic DAG from Metadata Database’,<br> schedule_interval=timedelta(days=1))</pre><pre>db = MySQLdb.connect(host=”localhost”, user=”airflow”, passwd=”airflow”, db=”dag_metadata”)</pre><pre>df = pd.read_sql(“select dag_id,task_id,task_name,script_path,script_name,task_type,dependents from dag_metadata.tasks where dag_id=’dynamic_dag_from_metadata_example’ order by dag_id,task_id”, con=db)</pre><pre>for idx,row in df.iterrows():<br> dag_id = row[‘dag_id’]<br> task_id = row[‘task_id’]<br> task_name = row[‘task_name’]<br> script_path = row[‘script_path’]<br> script_name = row[‘script_name’]<br> task_type = row[‘task_type’]<br> dependents = row[‘dependents’].split(“|”) #Holds TASK_ID’s separated by pipe</pre><pre>t1 = BashOperator(<br> task_id=task_name,<br> bash_command=script_path+script_name+’ ‘,<br> dag=dag)<br> <br> #Based on Dependent TASK_ID upstream tasks will be tagged here <br> for d in dependents:<br> if d == ‘’:<br> continue<br> for idx,row in df[df[‘task_id’] == int(d)].iterrows():<br> t2 = BashOperator(<br> task_id=row[‘task_name’],<br> bash_command=row[‘script_path’]+row[‘task_name’]+’ ‘,<br> dag=dag)<br> t1.set_upstream(t2)</pre><p>Once the script is placed in dags folder. Initialize airflow metadata database,</p><pre>airflow initdb</pre><p>Airflow will refresh the metadata and will rebuild DAG from new code. You can see the DAG in web UI, as shown below,</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*f8Ze8-YiTTNcZRjH2jY0Sw.png" /><figcaption>Airflow DAG</figcaption></figure><p>So, as can be seen single python script would automatically generate Task’s dependencies even though we have hundreds of tasks in entire data pipeline by just building metadata.</p><p>This way, the method can help in building different kinds of data pipelines like spark jobs, executing machine learning models, event based triggers etc.</p><p>Airflow also provides different kinds of operators for different needs, like Python operator, SSH operator and operators specific to different databases etc.</p><p>Hope the content is helpful and please let me know if you have any better options or better ideas for addressing similar kind of scenarios.</p><p>Happy learning.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=eac45444b088" width="1" height="1" alt=""><hr><p><a href="https://medium.com/plumbersofdatascience/dynamic-dependency-generation-with-apache-airflow-scheduler-eac45444b088">Dynamic Dependency Generation with Apache Airflow Scheduler</a> was originally published in <a href="https://medium.com/plumbersofdatascience">Plumbers Of Data Science</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[What you inspired to be, Data Scientist or Data Engineer ?]]></title>
            <link>https://medium.com/plumbersofdatascience/what-you-inspired-to-be-data-scientist-or-data-engineer-630afd1aa7f2?source=rss-359d5cbf33a------2</link>
            <guid isPermaLink="false">https://medium.com/p/630afd1aa7f2</guid>
            <category><![CDATA[big-data]]></category>
            <category><![CDATA[data-engineer]]></category>
            <category><![CDATA[apache-spark]]></category>
            <category><![CDATA[data-engineering]]></category>
            <category><![CDATA[data-science]]></category>
            <dc:creator><![CDATA[Ashish Patil]]></dc:creator>
            <pubDate>Wed, 04 Jul 2018 15:31:33 GMT</pubDate>
            <atom:updated>2019-02-05T15:14:59.568Z</atom:updated>
            <content:encoded><![CDATA[<p>Being surrounded by positive waves of emerging technologies into the field of data science, it is obvious for one to think and plan in the same way.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/602/1*cetCGqY85nShX2wBNsDDnQ.png" /><figcaption>Image Source: Photo from DataCamp</figcaption></figure><p>But before moving too ahead, let’s take a pause and try to understand two measure branches of single but bigger tree.</p><p>There is a blurred distinguishing line between these two exciting fields, Data Engineering and Data Science. Each having its own significance and are interdependent.</p><p>Data engineering creates a base for data science to grow and excel.<br>Nowadays data is available in different size and formats ( files, relational etc.), at different locations ( on-premise, cloud etc.), IoT and this data is being generated at very high speed. These different data sources needs to be integrated by combination of multiple processes and techniques to acquire relevant business data and then churn it, transform it, and bring them into standard format which can be then consumed by Data Science team to build and apply models on top of it to derive better insights like trends, predictions, marketing strategies, customer group tagging etc.</p><p>All the initial data preparation work is much more important in which Data Engineering plays a vital role. It uses wide array of tools and technologies for different kinds of data processing requirements. For example,</p><p>Programming/Scripting — Python, Java, Scala, Bash scripting<br>Batch data processing — Spark, Hadoop Map Reduce<br>Real-time data streaming — Kafka, Spark streaming, Apache Storm, cloud (AWS Kinesis, Google cloud pub/sub )<br>Distributed storage — HDFS, NFS, Cloud (AWS S3, Google cloud storage)<br>Containerization — Docker, Kubernetes<br>Scheduling, Monitoring — Oozie, Airflow,NiFi</p><p>Even if one want to apply any machine learning processes on the data, there are ML libraries and platforms available like Spark MLLib, MLFlow and Cloud services (AWS SageMaker, Google cloud ML) etc. and much more.<br>So there are wide list of tools which data engineer uses to generate single version of truth.</p><p>Now, once all the required data is available, data science starts its magic using various tools like Machine learning algorithms, Deep learning, neural networks and much more advanced technologies where large data is processed and visual reports (using different visualization tools like Tableau, Qlik etc.) are generated which are easy to understand for the business users.</p><p>Only purpose to write here is before jumping and diving deep into the ocean we must know where, when and how to start.</p><p>Anyone could easily get overwhelmed with these new concepts and technologies and will think of getting into one but at the end you will end up confusing yourself without clear vision and goal.</p><p>Some people work in mix of both the Roles i.e. data engineer and data scientist and some perform only one depending on the requirements and usecases. So, what are the deciding factors to learn and grow ?</p><p>1. Your interests.<br>2. How your current role and experience is going to help for acquiring new skills.<br>3. How those new skills are aligned to future technologies.<br>4. Industry-wise scope and acceptance of tools and technologies.</p><p>Data engineering is the field which has lot to explore and learn. Only needed is passion and right direction.</p><p>At the end, its a matter of individual interest, passion and love for Technolgy. There can be All-rounders who play best of both efficiently and it is part of their daily job.</p><p>So, Happy learning and yes, do not forget to share what you learn :-)</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=630afd1aa7f2" width="1" height="1" alt=""><hr><p><a href="https://medium.com/plumbersofdatascience/what-you-inspired-to-be-data-scientist-or-data-engineer-630afd1aa7f2">What you inspired to be, Data Scientist or Data Engineer ?</a> was originally published in <a href="https://medium.com/plumbersofdatascience">Plumbers Of Data Science</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>