<?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 Nishit Kamdar on Medium]]></title>
        <description><![CDATA[Stories by Nishit Kamdar on Medium]]></description>
        <link>https://medium.com/@nishitkamdar?source=rss-5ea589cd1158------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*pubtXwyzwOu4RBIeuwRsXg.jpeg</url>
            <title>Stories by Nishit Kamdar on Medium</title>
            <link>https://medium.com/@nishitkamdar?source=rss-5ea589cd1158------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 27 Nov 2026 23:34:50 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@nishitkamdar/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[The Ultimate Lakehouse Vision and its key solution components]]></title>
            <link>https://medium.com/google-cloud/the-ultimate-lakehouse-vision-and-its-key-solution-components-051fec8aa5d6?source=rss-5ea589cd1158------2</link>
            <guid isPermaLink="false">https://medium.com/p/051fec8aa5d6</guid>
            <dc:creator><![CDATA[Nishit Kamdar]]></dc:creator>
            <pubDate>Wed, 09 Jul 2025 17:59:30 GMT</pubDate>
            <atom:updated>2025-07-16T07:49:50.850Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*XNr9DugwoZSMfKFn" /><figcaption>Lakehouse on Iceberg</figcaption></figure><h3><strong>Lakehouse</strong></h3><p>While ‘<strong><em>Lakehouse</em></strong>’ term was coined by Databricks around 2017, the first Lakehouse came in much earlier in 2006 when Hadoop was released. It was Hadoop’s promise to move away from expensive Datawarehouse platforms like Teradata / Exadata to an Open, Unified, Cost-effective Datalake architecture that laid the foundations of what is referred to as the ‘<strong>Lake-house’</strong> architecture today. Hive became the first Lakehouse and soon a host of other engines like Impala, Tez, Kudu etc evolved.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ohS3yC8Nr2Il9-zjF2d3jw.png" /><figcaption>Lakehouse Journey</figcaption></figure><p>However, Hadoop ecosystem had the following issues that led to the rise of Hyperscalers taking away its market share:</p><ol><li>Hadoop <strong>ecosystem</strong> consisted of 20+ OSS products which were difficult to manage, integrate and operate.</li><li>Hadoop was <strong>pre-cloud a</strong>nd therefore there were limitations in terms of ther amount of Capex resources one could provision for cluster’s control plane, data plane, network and storage, to work effectively at scale.</li><li><strong>Coupled architecture:</strong> One of the biggest disadvantages of the Hadoop architecture was that the Compute and Storage was co-located on the cluster nodes, thereby making it impossible to scale one without scaling the other. Back in 2010, I was tasked with building a Petabyte platform where we built our first Decoupled Storage and Compute platform and the results were magical— (more details here — <a href="https://www.linkedin.com/pulse/decoupled-storage-compute-paradigm-shift-building-modern-kamdar/?trackingId=5uojWLvcQZW6Zh6AV7REuA%3D%3D">Decoupled Architecture</a>). It’s one of the most important innovations to have happened in the data platform architectures and it’s also a core tenet of Lakehouse architecture.</li><li><strong>Optimized</strong> <strong>for Write-Once-Read-Many: </strong>Hadoop was not optimized for Random writes, Low latency updates, ACID.</li><li><strong>Performance</strong>: This was the last straw! In spite of a host of enhancements, like Tez, Hive-LLAP and others,Hadoop warehouses couldn’t deliver the required performance on the consumption layer as compared to that of the specialized appliances.</li></ol><h4><strong>Rise of the Cloud Native Warehouse and Managed Hadoop Services:</strong></h4><p>The hyperscalers were quick to capitalize on the Hadoop challenges and 2 key solutions emerged:</p><ol><li><strong>Pre-Processing Layer Solution: </strong>To manage the complexities of Hadoop and its ecosystem, services like EMR, Dataproc, Databricks offered managed Hadoop services to take away the complexity and offer the flexibility and scale of the Cloud. Managed Hadoop continues to be the de-facto solution for the Pre-processing layer of the Data platform architectures even today.</li><li><strong>Consumption Layer: </strong>To provide the performance required on the consumption layer — Cloud Native Solutions like Bigquery, Redshift Snowflake etc became the new age Specialized Datawarehouse Solutions providing ease of use, serverless platforms and petabyte scale operations.</li></ol><h4><strong>Back to the Lakehouse!</strong></h4><p>One of the key challenges with Cloud Native architectures was that the data was stored internally within these solutions and in their proprietary format (much like Teradata and Exadata), thereby making it difficult for any other systems to operate on it.</p><p>This led to re-imagining Hadoop-like datalake architecture, combining it with the innovations in the Open Table Formats like Iceberg and Delta and leveraging the power of Cloud to solve the inherent issues with Hadoop. Databricks led the charge and coined this revised way of building data platforms as the <strong>Lakehouse</strong> architecture.</p><p>From data stores inside of Specialized Warehouses like Teradata to the Hadoop Datalake architectures to going back to Cloud Native storage and finally back on to the Object Stores — “Life comes full circle” :-)</p><h3><strong>The Lakehouse Vision:</strong></h3><p>Quite often, the Lakehouse architecture, I come across, just operates on a Single BI/AI engine. Is this really the ultimate goal? If its just to use a single query Engine, why move it out of the native solution at all?</p><p><strong><em>So, what should be the vision?</em></strong></p><p>To get the best of the Lakehouse architecture,</p><blockquote><strong><em>The ultimate aim should be to build an open platform that allows for “multiple engines” to inter-operate on “one Copy of data” with “unified governance”</em></strong></blockquote><p>As shown below, in a Lakehouse architecture, multiple engines like Biglake, Databricks, Snowflake or OSS Spark, Trino etc should be able to co-exist.</p><p>One should be able to create a table using say BigLake, the updates of which should automatically reflect in the other engines and similarly the other engines should be able to read or write into the same Iceberg table with the unified governance applied to all the engines at the table level.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*lguqavgEO48Isplj" /><figcaption>Lakehouse Vision</figcaption></figure><p>This gives the flexibility to choose the right engine that is the most performant for your workloads, it avoids lock-in into a particular engine and it also allows to mix and match these engines for different types of workloads or advancements that differentiates them.</p><h4><strong>So how do we go about achieving this?</strong></h4><p>Following are the 3 key solution components:</p><ol><li>An <strong>open storage format </strong>to store the data</li><li>An <strong>catalog</strong> that manages the metadata and access control to the data</li><li><strong>BI / AI Engines</strong> that supports Lakehouse architecture</li></ol><p>Let’s explore them in detail:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/596/1*O2qel5g9o8IvNwpn_AMRZg.png" /><figcaption>Lakehouse Strawman</figcaption></figure><h3>1. Open Storage Format — ICEBERG</h3><p>It’s now clear that, <a href="https://iceberg.apache.org/"><strong>Apache Iceberg</strong></a> has come out as a clear winner across <a href="https://hudi.apache.org/">Apache Hudi</a> and <a href="https://delta.io/">Apache Delta</a>. Google and Snowflake had already pivoted to Iceberg as their format of choice and with Databricks’s Tabular acquisition, they are also moving towards Iceberg.</p><p><strong>What is Iceberg?</strong></p><p>Built by Netflix and donated to the Apache Software Foundation, Iceberg is an open-source table format built to store extremely large, slow-moving tabular data. Iceberg solves many challenges around scale, usability, and performance degradation when working on extremely large data sets. Iceberg supports industry standard file formats such as Apache Parquet, ORC, and Avro. ACID compliance, schema evolution, hidden partitioning, time travel, and performance improvements are several other features that make Iceberg very desirable.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/545/0*96O_laSasVYzg4en" /></figure><p>At it’s core, Iceberg is not a storage engine or a query engine itself. Instead, it defines a standard way to structure and manage the metadata of tables. This allows various powerful data processing engines like Apache Spark, Trino, Bigquery, Snowflake etc to interact with the data in a consistent and efficient manner.</p><h3>2. Data Catalog</h3><p>Data Catalog is the crown jewel and the most critical component of the Lakehouse architecture. Broadly, there are 2 types of Catalogs:</p><ol><li><strong>Runtime Catalog</strong>: Runtime catalogs, also known as Technical Catalogs, provide key technical details about the table, it’s metadata, security etc to query engines at runtime for processing. e.g Hivemetastore, Glue, Gravitino, Biglake Metastore etc)</li><li><strong>Management Catalog: </strong>Management catalog provides capabilities like Discovery, Lineage, Business metadata, Quality e.g Dataplex, Collibra etc</li></ol><p>With the Cloud Native Warehouses, Runtime catalogs were almost non-existent in the Data architectures as they were an integral part of the Cloud Native engines. However, with the data now moving out of the native storage, Data Catalogs are being re-imagined as the “<strong>control plane” </strong>for Data discovery &amp; Governance in a Lakehouse architecture.</p><p>Following are the key features required in the Data Catalog:</p><ol><li><strong>Support for Iceberg REST Standard (IRS):</strong> An Iceberg REST catalog is a backend service that implements a standardized REST API to manage Apache Iceberg tables. It acts as a universal translator or a standardized bridge between data processing engines and the actual storage where the table metadata is kept.</li><li><strong>Multi-engine Read support:</strong> The catalog should have the capability to support multiple query engines to connect and read the Iceberg tables.</li><li><strong>Multi-engine Write support: </strong>The catalog should have the capability to support Iceberg table writes from multiple engines. This is extremely critical.</li><li><strong>Fine-Grained Governance: </strong>The catalog should have the capability to unify fine-grained Governance across all the query engines.</li></ol><p>As shown below, with a Catalog that supports all of the above, an OSS Spark engine user can write into an Iceberg table. A BigLake user can query and get the latest updates without having to do manual manifest file exports to sync the data between the two query engines. The Biglake user can also write back into the same table and the OSS Spark user can get the updates automatically. All of this, with the fine-grained access control applied to users coming from both the query engines.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vCGVLQUpfrKeeYN6sdjfIA.png" /><figcaption>Multi-Engine Read/Write on Lakehouse</figcaption></figure><p>The success of Lakehouse vision to have multiple engines inter-operate solely depends on capabilities of the Data Catalog listed above and hence it one of the most critical solution of the Lakehouse architecture</p><p><strong>Catalog Federation:</strong></p><p>Each query engine has it’s own Catalog offering and there is little interoperability between them today. This may change in the future, but if you have to realize the multiple query engine vision, Catalog Federation has to be thought out, incase the query engines you choose rely on their own Catalog offering. By federating, each of the Catalogs can sync the changes to the underlying iceberg table that their query engines have updated and provides a consistent updated view to their respective query engine users.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/832/1*LJfZJN6hjYerPxWnOqMZCw.png" /><figcaption>Catalog Federation Options</figcaption></figure><p>What are the ways to Federate?</p><ol><li><strong>IRS</strong>: Iceberg REST specification standardized the access to the services that each of the catalog provides and therefore it’s easy for one catalog to get the updates from the other catalog via IRS pull requests.</li><li><strong>Federation</strong>: Some catalogs have native integration capabilities (like most of them federate with Hivemetastore), thereby allowing to query the catalog and get the required details.</li><li><strong>Listener Interface:</strong> While IRS provides the pull mechanism, it will require constant polling of the target Catalog and can result in a stale view, if there are operations that happen while the pull is in progress. I would imagine in the future, there would be some kind of a listener interface that the target catalog provides, implementing which, the source catalog will get real-time events of the underlying table updates from the target catalog.None of the catalogs support this at the moment.</li></ol><h3>3. AI/BI Query Engine:</h3><p>The 3rd and the heart of the Lakehouse architecture is the Query Engine itself. “The buck stops here!” The ultimate responsibility of delivering a successful Lakehouse platform rests on the maturity of the Query Engine.</p><p>Following are the 2 major factors that will define the success of AI/BI Engines:</p><ol><li>Best in class <strong>Price:Performance:</strong> Every customer wants the most performant and cost effective solution. We see various competitive TPC-DS and TPC-H benchmarks from vendors, each claiming they are better than others. It’s best to do a PoC and try various query engines and decide what’s best for your workloads. It’s going to be a battle of query engines that give the best <strong>price:performance</strong> on the Iceberg format.</li><li><strong>Futuristic</strong>: <strong>Gen AI and Agentic</strong> innovations are moving ahead at break-necking speed and the vendors who are at the top of their game in integrating these innovations into their product will clearly have an edge. Things like <strong>Autonomous Data Platforms</strong>, <strong>Data Engineering Agents,</strong> Governance Agents , Data Science Agents, <strong>integrating Gen AI</strong> models into the SQL semantics etc — all of which help customers to innovate and accelerate their Data to AI journeys will gain substantial market share!</li></ol><p><strong>Summary</strong>:</p><p>Like they say in the Gen AI world that “<strong>It will not be a single provider or model to rule them all</strong>”<strong>,</strong> in the Data Platform world as well, multiple AI/BI query engines will co-exist and inter-operate based on the key technological advancements and differentiators they bring to the table.</p><p>To get the best out of these engines, it’s important to build your Data Platform Architectures on the ultimate Lakehouse Vision of building an Open, Unified, Inter-operable Multi-engine Data and AI Platform!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=051fec8aa5d6" width="1" height="1" alt=""><hr><p><a href="https://medium.com/google-cloud/the-ultimate-lakehouse-vision-and-its-key-solution-components-051fec8aa5d6">The Ultimate Lakehouse Vision and its key solution components</a> was originally published in <a href="https://medium.com/google-cloud">Google Cloud - Community</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Dataplex — Data Lineage for Spark Applications | Data Governance | Part — 4 Contd..]]></title>
            <link>https://medium.com/google-cloud/dataplex-data-lineage-for-spark-applications-data-governance-part-4-contd-58912a5fbc9b?source=rss-5ea589cd1158------2</link>
            <guid isPermaLink="false">https://medium.com/p/58912a5fbc9b</guid>
            <category><![CDATA[dataplex]]></category>
            <category><![CDATA[google-cloud-platform]]></category>
            <category><![CDATA[spark]]></category>
            <category><![CDATA[data-lineage]]></category>
            <category><![CDATA[data-governance]]></category>
            <dc:creator><![CDATA[Nishit Kamdar]]></dc:creator>
            <pubDate>Wed, 25 Oct 2023 10:27:05 GMT</pubDate>
            <atom:updated>2025-05-28T18:20:42.264Z</atom:updated>
            <content:encoded><![CDATA[<h3>Data Lineage for Spark Applications | Data Governance | Part — 4 Contd..</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*WKiLkKLm6AYT9vyh" /><figcaption>Photo by <a href="https://unsplash.com/@polarmermaid?utm_source=medium&amp;utm_medium=referral">Anne Nygård</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>This is in continuation of the Data lineage <a href="https://medium.com/@nishitkamdar/dataplex-data-lineage-data-governance-part-4-eedd6ae8186a">Part 4.0</a> blog post focussing on the Data Lineage for the Spark Applications.</p><h3>Data Lineage for Spark Applications:</h3><p>The Spark jobs are primarily executed through GCP Dataproc Service and via Dataproc Serverless. We will look at both the examples.</p><h3>1.0 Lineage for Spark jobs on Dataproc GCE Cluster</h3><p>The Lineage for Spark Jobs on Dataproc GCE is supported <strong>out-of-the-box. </strong>It requires enabling lineage on the Cluster level or at the Job level.</p><p>Once you enable the lineage feature in your Dataproc cluster or Dataproc Spark job, the jobs capture lineage events and publish them to the Dataplex Data Lineage API. Dataproc integrates with the Data Lineage API through OpenLineage, using the OpenLineage Spark plugin.</p><h4>1.1. Enabling Lineage in Dataproc</h4><p><strong>a) Cluster level at creation time</strong></p><ol><li>All jobs report lineage unless explicitly disabled at job level.</li><li>To disable specific jobs from reporting lineage, include the Spark property spark.extraListener with value of null.</li><li>Once enabled, lineage cannot be disabled.</li></ol><p><strong>b) Cluster level at creation time</strong></p><ol><li>At job level at submission time Set the property spark.extraListener with value io.openlineage.spark.agent.OpenLineageSparkListener at job submission time.</li></ol><h4>1.2. What’s supported &amp; not</h4><p>a) Supported:</p><ol><li>Data lineage is available for all Dataproc Spark jobs</li><li>Dataproc Compute Engine 2.0.74+ and 2.1.22+ images</li><li>Lineage is available for BigQuery and Cloud Storage data sources.</li></ol><p>b) Not supported:</p><ol><li>SparkR</li><li>Spark Structured Streaming</li></ol><p>Let’s test it!</p><h4>1.3 Create a Dataproc Cluster</h4><pre>PROJECT_ID=`gcloud config list --format &quot;value(core.project)&quot; 2&gt;/dev/null`<br>PROJECT_NBR=`gcloud projects describe $PROJECT_ID | grep projectNumber | cut -d&#39;:&#39; -f2 |  tr -d &quot;&#39;&quot; | xargs`<br>LOCATION=&quot;us-central1&quot;<br>SUBNET=lab-snet<br>SUBNET_URI=&quot;projects/$PROJECT_ID/regions/$LOCATION/subnetworks/$SUBNET&quot;<br>UMSA_FQN=&quot;lab-sa@$PROJECT_ID.iam.gserviceaccount.com&quot;<br>DPGCE_CLUSTER_NM=lineage-enabled-spark-cluster-$PROJECT_NBR<br>SPARK_BUCKET=dataproc-lineage-spark-bucket-$PROJECT_NBR<br>SPARK_BUCKET_FQN=gs://$SPARK_BUCKET<br>DPMS_NM=lab-dpms-$PROJECT_NBR</pre><p>Grant the User managed Service account “Lineage Admin” role</p><pre>gcloud projects add-iam-policy-binding ${PROJECT_ID} \<br>    --member=serviceAccount:${UMSA_FQN} \<br>    --role=roles/datalineage.admin</pre><pre>gcloud dataproc clusters create $DPGCE_CLUSTER_NM \<br>   --project $PROJECT_ID \<br>   --subnet $SUBNET \<br>   --region $LOCATION \<br>   --enable-component-gateway \<br>   --bucket $SPARK_BUCKET \<br>   --scopes=cloud-platform \<br>   --master-machine-type n1-standard-4 \<br>   --master-boot-disk-size 500 \<br>   --num-workers 2 \<br>   --worker-machine-type n1-standard-4 \<br>   --worker-boot-disk-size 500 \<br>   --image-version 2.1.22-debian11 \<br>   --optional-components JUPYTER \<br>   --dataproc-metastore projects/$PROJECT_ID/locations/$LOCATION/services/$DPMS_NM \<br>   --properties &#39;dataproc:dataproc.lineage.enabled=true&#39; \<br>   --impersonate-service-account $UMSA_FQN \<br>   --scopes https://www.googleapis.com/auth/cloud-platform</pre><p>Note the --properties &#39;dataproc:dataproc.lineage.enabled=true&#39; \ . This will enable the Lineage at the cluster level.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*ZdfeEo7Lm296MGMP.png" /></figure><h4>1.4 Run the Spark job</h4><p>I have written a pyspark job to create a Chicago crimes curated table from the raw table similar to the Bigquery and Cloud composer example in the previous blog.</p><pre>gcloud dataproc jobs submit pyspark gs://raw-code-${PROJECT_NBR}/pyspark/chicago-crimes-analytics/curate_crimes.py \<br>--cluster=$DPGCE_CLUSTER_NM \<br>--project $PROJECT_ID \<br>--region $LOCATION  \<br>--id $JOB_ID  \<br>--impersonate-service-account $UMSA_FQN \<br>--jars=gs://spark-lib/bigquery/spark-bigquery-with-dependencies_2.12-0.29.0.jar \<br>--properties=spark.openlineage.namespace=$PROJECT_ID,spark.openlineage.appName=$JOB_NM \<br>-- --projectID=$PROJECT_ID --tableFQN=&quot;oda_curated_zone.crimes_curated_spark_dataproc&quot; --peristencePath=&quot;gs://curated-data-$PROJECT_NBR/crimes-curated-spark-dataproc/&quot;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*yvA1UzN9KXXLyavl.png" /></figure><p>The Spark job creates the parquet files for the curated table and stores them in the curated bucket.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*jIVMSKiNo7GczsYY.png" /></figure><h4>1.4.1 Dataplex Discovery in action</h4><p>Since this zone is set up for discovery scans in dataplex, Dataplex discovery will register this new table created by Spark into Data Catalog as well as create an external table in Bigquery.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*PHHBLV4JXqUjoNnQ.png" /></figure><p>Navigate to BigQuery and you should see a BQ external table-</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/640/0*3g9zWP6aFAwYWBn_.png" /></figure><h4>1.5 — Create Data Products from the Curated Table</h4><p>Next, we will create the 4 data products from the Curated table using Spark jobs.</p><pre>baseName=&quot;crimes-by-year-spark-dataproc&quot;<br>JOB_ID=&quot;$baseName-$RANDOM&quot;<br>reportName=&#39;Chicago Crime Trend by Year&#39;<br>reportDirGcsURI=&quot;gs://product-data-${PROJECT_NBR}/$baseName&quot;<br>reportSQL=&#39;SELECT cast(case_year as int) case_year,count(*) AS crime_count FROM oda_curated_zone.crimes_curated_spark_dataproc GROUP BY case_year;&#39;<br>reportPartitionCount=1<br>reportTableFQN=&quot;oda_product_zone.crimes_by_year_spark_dataproc&quot;<br>reportTableDDL=&quot;CREATE TABLE IF NOT EXISTS ${reportTableFQN}(case_year int, crime_count long) STORED AS PARQUET LOCATION \&quot;$reportDirGcsURI\&quot;&quot;<br><br>gcloud dataproc jobs submit pyspark gs://raw-code-${PROJECT_NBR}/pyspark/chicago-crimes-analytics/crimes_report.py \<br>--cluster=$DPGCE_CLUSTER_NM \<br>--project $PROJECT_ID \<br>--region $LOCATION  \<br>--id $JOB_ID  \<br>--impersonate-service-account $UMSA_FQN \<br>--jars=gs://spark-lib/bigquery/spark-bigquery-with-dependencies_2.12-0.29.0.jar \<br>--properties=spark.openlineage.namespace=$PROJECT_ID,spark.openlineage.appName=$baseName \<br>-- --projectNbr=$PROJECT_NBR --projectID=$PROJECT_ID --reportDirGcsURI=&quot;$reportDirGcsURI&quot; --reportName=&quot;$reportName&quot; --reportSQL=&quot;$reportSQL&quot; --reportPartitionCount=$reportPartitionCount --reportTableFQN=&quot;$reportTableFQN&quot; --reportTableDDL=&quot;$reportTableDDL&quot;</pre><p>Repeat this for Month, Week and Hour Data Products.</p><p>All the assets created will be registered in dataplex and Bigquery.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*O5b8AmsjVZshRMlq.png" /></figure><h4>1.6 — Lets look at the lineage generated</h4><p>To summarize what we did above, we used a BigQuery native table (oda_raw_zone.crimes_raw) as our source and created 4 external Hive tables (in Dataproc Metastore/Hive Metastore) on it and we persisted data in the Cloud Storage.</p><p>Goto — Bigquery -&gt; oda_raw_zone.crimes_raw table</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/637/0*lbh8qvyGJJKnf-8N.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*6gBgMKfKlPDxE8Ps.png" /></figure><p>Click on the Dataproc Icon and it will show the details of the Dataproc Spark job and it’s job runs.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/743/0*34xJe8xtNFLeE8_u.png" /></figure><h4>1.7. The Lineage Namespace</h4><p>In the Spark job command below, we added properties for lineage-</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*smRGFAMkyuz99pIh.png" /></figure><p>Here is where it manifests-</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/693/0*XGxT9zFzAOfc1ZJX.png" /></figure><p>It’s important to have a unique spark.openlineage.appName value for a Dataproc Spark process, but not for Dataproc Spark process runs. If you have unique values per run, there will be an explosion of Dataproc process icons, one for each run.</p><p>In summary, using the out-of-the-box Lineage support, Dataplex allows you to easily capture the lineage for Spark Applications from within Dataproc on GCE clusters.</p><h3>2.0 Lineage for Spark jobs on Dataproc Serverless</h3><p>Dataproc Serverless is not a natively supported service with Dataplex automated lineage capture at the moment. So, we will use a <strong>Custom Lineage</strong> <strong>feature in Cloud Composer.</strong></p><p>We will repeat what we did with the lineage of BigQuery using Airflow DAG, except, we will use Apache Spark on Dataproc Serverless instead.</p><h4>2.1. The Airflow DAG with custom lineage — run on Cloud Composer</h4><p>I have created a Composer DAG that creates Curated and Data Products tables using Dataproc Serverless.</p><p>The code additionally has “Inlets” and “Outlet” attributes that creates custom lineage.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*HCQYaHnYTSYEkK0S.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/722/0*qg06anmxs9d3qRyA.png" /></figure><p>Copy the code in the DAGs folder and run it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*kqol_A023cAJn2Xb.png" /></figure><p>Once the job completes, navigate to the Bigquery UI and click on the external table, oda_curated_zone.crimes_curated_spark table. It shows the lineage of the Dataproc jobs captured through Composer.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*2xR_i4pkjJYxoWs6.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*yoNNhvTYQ_dTd4ha.png" /></figure><p>In summary, Dataplex captures the Lineage of the Spark applications run through Dataproc Serverless via Composer “<strong>Inlet</strong>” and “<strong>Outlet</strong>” specifications.</p><p><strong>Conclusion:</strong></p><p>Spark applications are one of the most commonly used transform mechanisms in the Enterprise Data platform and therefore it is important to capture their Lineage. Dataplex provides an out-of-the-box support and easy configurations to capture Lineage from the Spark Applications on GCE Cluster or via Dataproc serverless that helps get an end-to-end visibility of the data pipelines.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=58912a5fbc9b" width="1" height="1" alt=""><hr><p><a href="https://medium.com/google-cloud/dataplex-data-lineage-for-spark-applications-data-governance-part-4-contd-58912a5fbc9b">Dataplex — Data Lineage for Spark Applications | Data Governance | Part — 4 Contd..</a> was originally published in <a href="https://medium.com/google-cloud">Google Cloud - Community</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Dataplex —Data Lineage | Data Governance | Part — 4]]></title>
            <link>https://medium.com/google-cloud/dataplex-data-lineage-data-governance-part-4-eedd6ae8186a?source=rss-5ea589cd1158------2</link>
            <guid isPermaLink="false">https://medium.com/p/eedd6ae8186a</guid>
            <category><![CDATA[google-cloud-platform]]></category>
            <category><![CDATA[data]]></category>
            <category><![CDATA[dataplex]]></category>
            <category><![CDATA[data-governance]]></category>
            <category><![CDATA[data-lineage]]></category>
            <dc:creator><![CDATA[Nishit Kamdar]]></dc:creator>
            <pubDate>Fri, 20 Oct 2023 10:14:30 GMT</pubDate>
            <atom:updated>2025-04-28T05:47:38.080Z</atom:updated>
            <content:encoded><![CDATA[<h3>Data Lineage | Data Governance | Part — 4</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*WKiLkKLm6AYT9vyh" /><figcaption>Photo by <a href="https://unsplash.com/@polarmermaid?utm_source=medium&amp;utm_medium=referral">Anne Nygård</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><h3>Data Lineage:</h3><p>Data Lineage depicts the lifecycle of data. It describes where the data comes from, where it moves, and how it changes as it travels through various processes and systems within your organization. It provides a traceable route, marking the data’s origin, the transformations it undergoes, and its final destination.</p><p>With rising data volume spread across data silos, it can be challenging for organizations to ensure users have a self-service mechanism to discover, understand and trust the data. Organizations constantly struggle with questions such as:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IlJy5xmu4uWh_WAVOJmTKw.png" /></figure><p>To answer the above questions, organizations need to track how data is sourced and transformed, which can be complex and requires significant effort.</p><h3>Dataplex Data Lineage</h3><p>Dataplex data lineage provides an out-of-the-box solution to solve for the challenges stated above. It describes each lineage relationship by detailing <strong>what happened</strong> and <strong>when it happened</strong> in an interactable lineage graph, providing data observability.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/947/1*1yE8K_JNDDgk4rKvHlI4EQ.gif" /></figure><p>By simply enabling the Lineage tracking, it supports the following solutions today with many more in the pipeline.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SC5AgWHuuwu1RFDvIy-3zQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*saHdmlRWY23kmSfCH-bxYA.png" /></figure><h3>1. Data Lineage with BigQuery</h3><p>For creating Lineage in Bigquery, we will create the following pipeline.</p><ol><li>Create a staging table from the Chicago crimes public dataset in the staging layer.</li><li>Create a raw table from the staging table in the raw layer.</li><li>Apply some transformations to the raw layer table and create a curated version in the curated layer.</li><li>Use a curated table and create 4 data products in the Products zone.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*ggyQcoxGf3V_sMFT.png" /></figure><h4>1.1. Create a Staging Table</h4><pre>bq --location=us-central1 mk \<br>    --dataset \<br>    $PROJECT_ID:oda_crimes_staging_ds</pre><pre>bq --location=us-central1 query \<br>--use_legacy_sql=false \<br>&quot;CREATE OR REPLACE TABLE oda_crimes_staging_ds.crimes_staging AS SELECT * FROM bigquery-public-data.chicago_crime.crime&quot;</pre><p>Reload the BQ UI, you should see the table created. Query the table-</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*5_X_OAolYa7pqZHR.png" /></figure><h4>1.<strong>2. Create a Raw table</strong></h4><pre>CREATE OR REPLACE TABLE<br>  oda_raw_zone.chicago_crimes_raw AS<br>SELECT<br>  *<br>FROM<br>  oda_crimes_staging_ds.crimes_staging;</pre><h4>1.<strong>3. Curate Chicago Crimes Data</strong></h4><p>Let’s add some temporal attributes like Case Year, Month etc to the raw Chicago Crimes which we will use in the Data Products. Create in the Curated Zone.</p><pre>CREATE OR REPLACE TABLE<br>  oda_curated_zone.chicago_crimes_curated AS<br>SELECT<br>  *,<br>  CAST(year AS Integer) AS case_year,<br>  FORMAT_DATE(&#39;%B&#39;,date) AS case_month,<br>  FORMAT_DATE(&#39;%d&#39;,date) AS case_day_of_month,<br>  FORMAT_DATE(&#39;%k&#39;,date) AS case_hour,<br>  EXTRACT(DAYOFWEEK<br>  FROM<br>    date) AS case_day_of_week_nbr,<br>  FORMAT_DATE(&#39;%A&#39;,date) AS case_day_of_week_name<br>FROM<br>  oda_raw_zone.chicago_crimes_raw;</pre><h4>1.4<strong>. Create Data Products</strong></h4><p>On the curated data, let’s use the attributes created to do the analysis of the crimes by Year, Month, Day and Hour.</p><p>Note that we persist the results in the consumption zone. From an access perspective, think of this zone as the reporting mart that you would give access to without granting access to the curated data.</p><pre>CREATE OR REPLACE TABLE<br>  oda_product_zone.chicago_crimes_by_year AS<br>SELECT<br>  case_year,<br>  COUNT(*) AS crime_count<br>FROM<br>  oda_curated_zone.chicago_crimes_curated<br>GROUP BY<br>  case_year;</pre><pre>CREATE OR REPLACE TABLE<br>  oda_product_zone.chicago_crimes_by_month AS<br>SELECT<br>  case_month AS month,<br>  COUNT(*) AS crime_count<br>FROM<br>  oda_curated_zone.chicago_crimes_curated<br>GROUP BY<br>  case_month;</pre><pre>CREATE OR REPLACE TABLE<br>  oda_product_zone.chicago_crimes_by_day AS<br>SELECT<br>  case_day_of_week_name AS day,<br>  COUNT(*) AS crime_count<br>FROM<br>  oda_curated_zone.chicago_crimes_curated<br>GROUP BY<br>  case_day_of_week_name;</pre><pre>CREATE OR REPLACE TABLE<br>  oda_product_zone.chicago_crimes_by_hour AS<br>SELECT<br>  case_hour AS hour_of_day,<br>  COUNT(*) AS crime_count<br>FROM<br>  oda_curated_zone.chicago_crimes_curated<br>GROUP BY<br>  case_hour;</pre><h4>1.5<strong>. The Lineage Graph</strong></h4><p>BigQuery lineage is captured by default, without the need for any orchestration tool.</p><p>Goto Bigquery → Click on the chicago_crimes_curated table → Click on Lineage.</p><p>It will show the entire lineage graph of the pipeline we executed above. The Curated table shows 4 Data Products tables created.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PhcbeFIAVMZrIWnikdIiGw.png" /></figure><p>Going a step back, Curated table shows as created from Chicago_crimes_raw table.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*iZrNSqPZYssBUXxo7L9S2Q.png" /></figure><p>Click on the “magnifying glass” symbol between the two tables. Its called Lineage “<strong>Process</strong>”. It captures the transformation details, in our case, the query that created the Curated table from Raw.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nDHEXAMhWbBVOyo6qHJrAw.png" /></figure><p>Going further back, it shows the staging table that we created from crimes public dataset.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*19qdPEjeV1i5RNQH9egl1g.png" /></figure><p>and finally the public dataset itself.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2Ene0W8etdxUq_Fo8zBQyg.png" /></figure><p>This is how Dataplex Lineage for Bigquery captures the entire end-to-end lineage — fully automated and out-of-the-box without any coding or configurations.</p><h3><strong>2. Data Lineage with Cloud Composer</strong></h3><p>Data lineage is available for:</p><ul><li>Cloud Composer 2 environments running versions 2.1.2 and later with Airflow versions 2.2.5 and later.</li><li>Cloud Composer 2 environments in the same regions as <a href="https://cloud.google.com/data-catalog/docs/concepts/regions">Data Catalog regions that support data lineage</a>.</li></ul><h4>2.1. <strong>Enable Data Lineage on Composer Environment:</strong></h4><p>Cloud Composer Environments have to be enabled for Data Lineage on each of the environments.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zlrFYJLE7TaN6Knzp5LNGg.png" /></figure><p>Once the feature is enabled, running DAGs that utilize any of the supported operators causes Cloud Composer to report lineage information to the Data Lineage API.</p><p>Please check the following link for the supported operators: <a href="https://cloud.google.com/composer/docs/composer-2/lineage-integration#supported-operators">https://cloud.google.com/composer/docs/composer-2/lineage-integration#supported-operators</a></p><h4>2.2. The Data Engineering Pipeline DAG</h4><p>We will create the following DAG.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_Kqj4Nclxv4Ig28HRxkehg.png" /></figure><p>Its very similar to the Bigquery exercise above. The main difference is instead of running BQ commands directly, we will use DAG to create a curated table from Raw and 4 data products.</p><h4>2.3. Review the Airflow DAG Python script</h4><pre>from airflow import models<br>from airflow.operators import dummy_operator<br>from airflow.providers.google.cloud.operators import bigquery<br>from airflow.utils import trigger_rule<br>from datetime import datetime<br>from airflow.utils.dates import days_ago<br><br><br>PROJECT_ID = models.Variable.get(&#39;project_id&#39;)<br><br><br>CURATE_CHICAGO_CRIMES = f&quot;&quot;&quot;<br>CREATE OR REPLACE TABLE<br>  `{PROJECT_ID}.oda_curated_zone.crimes_curated` AS<br>SELECT<br>  *,<br>  CAST(year AS Integer) AS case_year,<br>  FORMAT_DATE(&#39;%B&#39;,date) AS case_month,<br>  FORMAT_DATE(&#39;%d&#39;,date) AS case_day_of_month,<br>  FORMAT_DATE(&#39;%k&#39;,date) AS case_hour,<br>  EXTRACT(DAYOFWEEK FROM date) AS case_day_of_week_nbr,<br>  FORMAT_DATE(&#39;%A&#39;,date) AS case_day_of_week_name<br>FROM<br>  oda_raw_zone.crimes_raw;<br>&quot;&quot;&quot;<br><br>TREND_BY_YEAR = f&quot;&quot;&quot;<br>CREATE OR REPLACE TABLE<br>  `{PROJECT_ID}.oda_product_zone.crimes_by_year` AS<br>SELECT<br>  case_year,<br>  COUNT(*) AS crime_count<br>FROM<br>  oda_curated_zone.crimes_curated<br>GROUP BY<br>  case_year;<br>&quot;&quot;&quot;<br><br>TREND_BY_MONTH = f&quot;&quot;&quot;<br>CREATE OR REPLACE TABLE<br>  `{PROJECT_ID}.oda_product_zone.crimes_by_month` AS<br>SELECT<br>  case_month AS month,<br>  COUNT(*) AS crime_count<br>FROM<br>  oda_curated_zone.crimes_curated<br>GROUP BY<br>  case_month;<br>&quot;&quot;&quot;<br><br><br>TREND_BY_DAY = f&quot;&quot;&quot;<br>CREATE OR REPLACE TABLE<br>  `{PROJECT_ID}.oda_product_zone.crimes_by_day` AS<br>SELECT<br>  case_day_of_week_name AS day,<br>  COUNT(*) AS crime_count<br>FROM<br>  oda_curated_zone.crimes_curated<br>GROUP BY<br>  case_day_of_week_name;<br>&quot;&quot;&quot;<br><br><br>TREND_BY_HOUR = f&quot;&quot;&quot;<br>CREATE OR REPLACE TABLE<br>  `{PROJECT_ID}.oda_product_zone.crimes_by_hour` AS<br>SELECT<br>  case_hour AS hour_of_day,<br>  COUNT(*) AS crime_count<br>FROM<br>  oda_curated_zone.crimes_curated<br>GROUP BY<br>  case_hour;<br>&quot;&quot;&quot;<br><br>with models.DAG(<br>        &#39;Chicago_Crime_Trends_From_BQ_With_OOB_Lineage&#39;,<br>        schedule_interval=None,<br>        start_date = days_ago(2),<br>        catchup=False) as dag:<br><br>    start = dummy_operator.DummyOperator(<br>        task_id=&#39;start&#39;,<br>        trigger_rule=&#39;all_success&#39;<br>    )<br><br>    end = dummy_operator.DummyOperator(<br>        task_id=&#39;end&#39;,<br>        trigger_rule=&#39;all_done&#39;<br>    )<br><br>    curate_chicago_crimes = bigquery.BigQueryInsertJobOperator(<br>        task_id=&quot;Curate_Chicago_Crimes&quot;,<br>        configuration={<br>            &quot;query&quot;: {<br>                &quot;query&quot;: CURATE_CHICAGO_CRIMES,<br>                &quot;useLegacySql&quot;: False<br>            }<br>        }<br>    )<br>    <br>    trend_by_year = bigquery.BigQueryInsertJobOperator(<br>        task_id=&quot;Trend_By_Year&quot;,<br>        configuration={<br>            &quot;query&quot;: {<br>                &quot;query&quot;: TREND_BY_YEAR,<br>                &quot;useLegacySql&quot;: False<br>            }<br>        }<br>    )<br><br>    trend_by_month = bigquery.BigQueryInsertJobOperator(<br>        task_id=&quot;Trend_By_Month&quot;,<br>        configuration={<br>            &quot;query&quot;: {<br>                &quot;query&quot;: TREND_BY_MONTH,<br>                &quot;useLegacySql&quot;: False<br>            }<br>        }<br>    )<br><br>    trend_by_day = bigquery.BigQueryInsertJobOperator(<br>        task_id=&quot;Trend_By_Day&quot;,<br>        configuration={<br>            &quot;query&quot;: {<br>                &quot;query&quot;: TREND_BY_DAY,<br>                &quot;useLegacySql&quot;: False<br>            }<br>        }<br>    )<br> <br>    trend_by_hour = bigquery.BigQueryInsertJobOperator(<br>        task_id=&quot;Trend_By_Hour&quot;,<br>        configuration={<br>            &quot;query&quot;: {<br>                &quot;query&quot;: TREND_BY_HOUR,<br>                &quot;useLegacySql&quot;: False<br>            }<br>        }<br>    )<br>  <br>start &gt;&gt; curate_chicago_crimes &gt;&gt; [trend_by_year, trend_by_month, trend_by_day, trend_by_hour] &gt;&gt; end</pre><h4>2.4. Run the Airflow DAG</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*CD7o87xIFF1ubfZx.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*QofhkS4QxZEMXuAs.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*3VMjvUwu-NaPD3sk.png" /></figure><h4>2.5. Validate the creation of tables in BigQuery</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/392/0*Kjdg2HsTLxONwksP.png" /></figure><h4>2.6. Validate the Lineage Graphs</h4><p>You will see 2 sets of graphs from Curated table to Data products — one from Bigquery exercise above and other one from current DAG run depicted by the Composer icon.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-3bxn9wWmTX_vtKyKOqFqA.png" /></figure><p>Click on one of the Composer icons. It shows details such as dag_id, task_id , runs etc.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AkvfFC_IyZvq3m4k31rGEw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HIqvwEVBwZFGkyCIWmMgxQ.png" /></figure><p>In summary, Dataplex Lineage is a powerful tool to capture the entire end-to-end lineage for Cloud Composer DAG runs out-of-the-box.</p><h3>To be Continued.</h3><p>Dataplex Data Lineage for Spark Applications</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=eedd6ae8186a" width="1" height="1" alt=""><hr><p><a href="https://medium.com/google-cloud/dataplex-data-lineage-data-governance-part-4-eedd6ae8186a">Dataplex —Data Lineage | Data Governance | Part — 4</a> was originally published in <a href="https://medium.com/google-cloud">Google Cloud - Community</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Dataplex — Data Catalog | Tagging — Operations and Business Metadata| Part — 3.2]]></title>
            <link>https://medium.com/google-cloud/dataplex-data-catalog-tagging-operations-and-business-metadata-part-3-2-d0fc27699632?source=rss-5ea589cd1158------2</link>
            <guid isPermaLink="false">https://medium.com/p/d0fc27699632</guid>
            <category><![CDATA[data]]></category>
            <category><![CDATA[data-governance]]></category>
            <category><![CDATA[google-cloud-platform]]></category>
            <category><![CDATA[data-catalog]]></category>
            <category><![CDATA[dataplex]]></category>
            <dc:creator><![CDATA[Nishit Kamdar]]></dc:creator>
            <pubDate>Wed, 18 Oct 2023 17:17:13 GMT</pubDate>
            <atom:updated>2025-04-28T05:47:53.278Z</atom:updated>
            <content:encoded><![CDATA[<h3>Data Catalog | Tagging Operational and Business Metadata| Part — 3.2</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*9Qrj9LRID6Kb7E2t" /><figcaption>Photo by <a href="https://unsplash.com/@angelekamp?utm_source=medium&amp;utm_medium=referral">Angèle Kamp</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>This is Part-3.2 of the Dataplex blog series focussed on Data Catalog. Please refer to <a href="https://medium.com/@nishitkamdar/dataplex-an-intelligent-data-fabric-data-governance-at-scale-google-cloud-part-1-ef08679dc86b">Part-1</a> &amp; <a href="https://medium.com/google-cloud/dataplex-an-intelligent-data-fabric-data-governance-at-scale-google-cloud-part-2-7a766e2e032c">Part-2</a> and <a href="https://medium.com/@nishitkamdar/dataplex-data-catalog-auto-discovery-and-metadata-harvesting-part-3-1-9162a4ed0990">Part-3.1</a> for more details on the Dataplex service.</p><h3>Tagging:</h3><p>Tagging involves adding additional pieces of <strong>metadata</strong> at a Table or a Column level to enrich, contextualize, classify, secure and analyze the underlying data.</p><p>Types of metadata:</p><ul><li><strong>Technical metadata</strong> represents the technical aspects of data, including attributes such as source and target systems, database table and field structures, data types, storage, format, location and so on. In our <a href="https://medium.com/@nishitkamdar/dataplex-data-catalog-auto-discovery-and-metadata-harvesting-part-3-1-9162a4ed0990">Part-3.1</a> — we saw how Dataplex automatically collects the Technical Metadata of the registered assets.</li><li><strong>Business metadata </strong>provides a business context and a business name for assets that are created and managed. Business metadata includes terms, information governance rules, labels, ownership etc that helps with the business interpretation of data elements in the data warehouse.</li><li><strong>Operational metadata</strong> captures the events that occurred during the run of the process, including the number of rows written, process run status, rows read, written to, various stages etc</li></ul><p>Following is a pictorial view of a table cust_tbl tagged with various metadata tags at Table and Column level, that capture more context about the underlying data.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6agqbj2_JXS3iNvWmJ6CrA.png" /><figcaption>Types of Metadata Tags</figcaption></figure><p>At the Table level, it captures the ETL status of the table updates, its lifecycle details and Quality indicators while at the Column level, it captures if the Column has PII information etc.</p><p>Data Catalog’s Tagging features provides multiple ways to create and add such metadata tags that help with the overall Data Governance of the Data platform.</p><p>Within Dataplex, Technical Metadata is collected automatically as part of the Discovery process. For capturing Additional Business and Operational metadata, Dataplex provides Tag Templates.</p><h3><strong>1. Tag Templates:</strong></h3><p>Dataplex provides ready-to-go Tag templates that are pre-defined for the Business and Operational scenarios and you can also create your own, through an intuitive UI.</p><p>Go to Dataplex → Manage Catalog → Tag Templates → Create Tag Template</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RWK7tgNu8JlEgytCxrSgvw.png" /></figure><p>We will create a new template.</p><h3><a href="https://github.com/GoogleCloudPlatform/dataplex-labs/blob/main/dataplex-quickstart-labs/02-lab-guide/module-08-3-create-tag-template-for-catalog-entry.md#11-create-a-tag-template">1.1. Create a Tag Template</a></h3><p>In the create template screen above, fill in the Template details.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*F-O8Sx00OWuzXZIA" /></figure><p>In the Fields section below → click Add fields.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*fwlXDs4b9PmxwcDD" /></figure><p>Add the following 3 entries.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*wQZKxtQkdwqFe7JS" /></figure><p>Our Template is created! It captures the name of the Steward (Business Metadata) as well as creation_date, record_count (Operational Metadata).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*mhAQ6oUWeki4HGRK" /></figure><p>Lets add this to a Table.</p><h3>1.2. Associate the Tag Template to an Asset:</h3><p>Go to Dataplex -&gt; Manage -&gt;oda lake →raw zone-&gt;crime_staging</p><p>We will add the Tag created to the following table. As shown below, the Tags(0) section at the bottom does not have any tags associated with it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0k8PapJhHJl6-baDupmSlg.png" /></figure><p>Click the Attach Tags button at the bottom right. Choose the Template we created above.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Pb3FnpIu01V2iSLI9qn76A.png" /></figure><p>Add the Business and Operational Metadata to the fields. Click Save.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Tgx_vsHotDz2YMx9FRXcNA.png" /></figure><p>This will create an instance of the Tag from the Tag Template and add it to the crimes_stage table. The Tag section of the page now shows the attached tag. You can similarly create Column level templates and attach it to the corresponding columns.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GubFyM6DHImaU_prc8VYDQ.png" /></figure><p>Apart from UI, you can also add tags programatically via API or SDK</p><ul><li><a href="https://cloud.google.com/data-catalog/docs/samples/data-catalog-quickstart">Quickstart: Attach tag to BigQuery table | Data Catalog Documentation | Google Cloud</a></li><li><a href="https://cloud.google.com/sdk/gcloud/reference/data-catalog/tags/create">gcloud data-catalog tags create | Google Cloud CLI Documentation</a></li></ul><p>Using any of the above approaches, you can create and attach tags on the assets and add additional metadata. You can also embed it into the ETL/ELT cycles and update the Tables/Columns metadata of the assets that are managed by this processes.</p><h3><strong>2. Bulk Tagging:</strong></h3><p>Some of the most common customer queries around tagging are:</p><ol><li><strong>How do I do the tagging of the historical assets</strong> that may not be touched by the daily ETL/ELT process?</li><li><strong>How do I do large scale Tagging? </strong>Writing scripts to do is extremely cumbersome and time-consuming</li><li><strong>Are there any Google tools or accelerators</strong> to help with it?</li></ol><p>Yes there is!</p><h3>2.1. Tag Engine:</h3><p>Tag Engine is an open-source extension to Google Cloud’s Data Catalog developed by <a href="https://www.linkedin.com/in/shirleycohen/">Shirley Cohen</a> from Google to automate the tagging of BigQuery tables, Views and data lake files.</p><p>The tool supports populating tags that have static metadata or dynamic metadata. Tag Engine also supports the autotagging of new assets and the refreshing of existing tags as the underlying data changes.</p><p>Following Github links provides complete details of the Tag Engine Architecture, Terraform Deployment scripts and Examples.</p><p><a href="https://github.com/GoogleCloudPlatform/datacatalog-tag-engine">https://github.com/GoogleCloudPlatform/datacatalog-tag-engine</a></p><p>Lets use Tag Engine to do bulk tagging dynamically!</p><p><strong>2.1.1. Usecase</strong></p><p>One of the most common tagging usecase is <strong>attaching Business definitions to the Columns</strong>. The Column names are often too technical or generic and needs to be tagged to have more Business context about them.</p><p>So we will use Tag Engine to solve this.</p><p><strong>2.1.1.1 — Create the Template:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vrpUDsh7mbbTS_ZG7b8eYw.png" /></figure><p><strong>2.1.1.2 — Select the Table or Columns to be tagged.</strong></p><p>I have a Taxi Dataset (Bigquery public Dataset) and quite a few tables in this dataset have Tables with <strong>Tolls_Amount</strong> and <strong>Tip_Amount</strong> columns.</p><p>I would like to update the description of these columns across my dataset with a Business definition of the Column.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*aLRou4AmpjI8ZH56m-rC0g.png" /></figure><p><strong>2.1.1.3</strong> <strong>— Set up the Business Metadata Model to be attached to Tables or Columns.</strong></p><p>The Business metadata that needs to be applied to the Tags can be externalized as a BigQuery Table.</p><p>e.g — I have set up a enterprise_glossary table in Bigquery. It consists of the actual column names in the <strong>Column_name </strong>field<strong> </strong>and its Business Definition in the<strong> formal_name </strong>field that I have gathered from my business team.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JQiaUAKofGxHjNyZ2Ssofw.png" /></figure><p>Using this information, I need to create a Column Level Tags and attach it to the Columns with its Business Definition automatically.</p><p><strong>2.1.1.4— Tag Engine Configuration:</strong></p><p>I have installed Tag Engine as an “App Engine” service. Click on the App Engine URL and it will open the home page as shown below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NGbe91IxcVV2dQARDt1uLA.png" /></figure><p>Enter Tag Template ID, Project Name and region — you can find all the info in the template.</p><p>Tag Engine will bring up the Tag Template and provide different options for creating Static and Dynamic Table and Column level tags along with import and restore options.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tktEj_L9-1BFcd6zOo46Xw.png" /></figure><p>Select the “<strong>Create Dynamic Column Tags” </strong>option as we want to generate Column level tags with dynamic values from the database.</p><p>Tag Engine provides a query input option against the fields defined in the template to fetch their values from Bigquery.</p><p>Enter the query shown below for the <strong>column_description </strong>placeholder. This query will be executed on the Bigquery glossary table to fetch the <strong>formal_name</strong> column which has the <strong>Business Definition</strong>. The<strong> $Column</strong> value of the <strong>Column_name</strong> will be dynamically passed by the Tag Engine during execution.</p><p>When the tag engine encounters Tolls_Amount or Tip_Amount as Column_name — the query will resolve to their Business Definitions as the output which the Tag engine will use to create a Tag from Tag Template and attach it to the Column.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pPjaBgD_8BgyJT5tj3fZQA.png" /></figure><p>In the <strong>Included Columns queries </strong>field<strong>, </strong>provide the Columns Query as shown above. This query allows you to choose the columns that you want the Tag Engine to tag.</p><p>The <strong>Included Tables URIs </strong>field provides the scope of the Tag Engine Execution. e.g. I have specified it as <strong>dataset/taxi_dataset/*. </strong>This<strong> </strong>means Tag engine will search the columns across the entire dataset. For doing it for a specific table, you can replace star with the specific tablename.</p><p><strong>Scheduling options: </strong>Tag Engine also provides option to execute it as on-demand or set it up as a recurring job.</p><p>Additionally, it also provides an option to <strong>create history </strong>of the tag updates and store it in Bigquery. This is very useful for operational metadata to track the changes that have happened to the Table or Column.</p><p>Click Submit.</p><p>A job will be created and executed by Tag Engine that will create the tag with their Business Definitions.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EoPqzu0hGofVpTVl7achhQ.png" /></figure><p>Lets verfiy.</p><p>Go the Dataplex Search and type one of the business definitions <strong>“Govt Taxes on Highways”. </strong>Dataplex searches through all the Business Metatags and list all the tables with the above string.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rVjz-dG9hENHp69KVEDB_g.png" /></figure><p>Click on one of the tables and click on the schema.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YurAGguoZiFPyBglRd_ppg.png" /></figure><p>You will see the Column Tags created for <strong>Tips_Amount and Tolls_Amount.</strong></p><p>Click on the template and it will show the Business Definition.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*34WgZ965nsj3ej66KHYydg.png" /></figure><p>In summary, Tag Engine is a great accelerator and an extremely flexible tool to configure and execute static and dynamic Table or Column level tags for Business and Operational metadata at scale.</p><h3>Conclusion:</h3><p>Tagging is an integral part of the Data Governance process and Data Catalog provides multiple ways to Tag Tables and Columns through its intuitive UI, SDKs and APIs.</p><p>It also provides an open-source tool to automate the large scale dynamic tagging through its Tagging Engine.</p><p>For additional details please visit:</p><p><a href="https://cloud.google.com/dataplex?hl=en">https://cloud.google.com/dataplex</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d0fc27699632" width="1" height="1" alt=""><hr><p><a href="https://medium.com/google-cloud/dataplex-data-catalog-tagging-operations-and-business-metadata-part-3-2-d0fc27699632">Dataplex — Data Catalog | Tagging — Operations and Business Metadata| Part — 3.2</a> was originally published in <a href="https://medium.com/google-cloud">Google Cloud - Community</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Dataplex — Data Catalog | Auto Discovery and Metadata Harvesting | Part — 3.1]]></title>
            <link>https://medium.com/google-cloud/dataplex-data-catalog-auto-discovery-and-metadata-harvesting-part-3-1-9162a4ed0990?source=rss-5ea589cd1158------2</link>
            <guid isPermaLink="false">https://medium.com/p/9162a4ed0990</guid>
            <category><![CDATA[data]]></category>
            <category><![CDATA[data-catalog]]></category>
            <category><![CDATA[google-cloud-platform]]></category>
            <category><![CDATA[dataplex]]></category>
            <category><![CDATA[data-governance]]></category>
            <dc:creator><![CDATA[Nishit Kamdar]]></dc:creator>
            <pubDate>Tue, 17 Oct 2023 12:35:33 GMT</pubDate>
            <atom:updated>2025-04-28T05:48:11.561Z</atom:updated>
            <content:encoded><![CDATA[<h3>Data Catalog | Auto Discovery and Metadata Harvesting | Part — 3.1</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*AFCvFTlKfRM7UwGO" /><figcaption>Photo by <a href="https://unsplash.com/@inakihxz?utm_source=medium&amp;utm_medium=referral">Iñaki del Olmo</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>This is Part-3.1 of the Dataplex blog series focussed on Data Catalog. <a href="https://medium.com/@nishitkamdar/dataplex-an-intelligent-data-fabric-data-governance-at-scale-google-cloud-part-1-ef08679dc86b">Part-1</a> &amp; <a href="https://medium.com/google-cloud/dataplex-an-intelligent-data-fabric-data-governance-at-scale-google-cloud-part-2-7a766e2e032c">Part-2</a> provides an overview of the Dataplex service.</p><h3><strong>Background</strong>:</h3><p>Data Catalog, an independent GCP service is now integrated into Dataplex Platform to provide fully managed, <strong>data discovery and metadata management</strong> service that allows you to quickly <strong>discover, manage, and understand your data</strong> in Google Cloud.</p><p>Data Catalog uses the same search technology that supports <strong>Gmail and Google Drive,</strong> allowing you to quickly find data by table name, column name, or business metadata in tags using various filters.</p><p>A data catalog makes it possible and easy for data scientists, data analysts, and other users to use and analyze datasets. Through the identification, characterization, and categorization of datasets, a data catalog keeps an organized inventory of data assets. It offers a <strong>meaningful context</strong> that enables data scientists, analysts, and other data consumers to search for and comprehend an appropriate dataset in order to derive commercial value.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1OYpltyIeWfs7kEvlV2--g.png" /></figure><p>Business stakeholders like data and business analysts use data catalogs extensively to locate and comprehend business data. Data catalogs also facilitate faster collaboration by automating data management. The most well-known data catalogs rely on crucial elements like data governance &amp; data discovery that support a successful data strategy.</p><p>Lets look at the key features of Dataplex — Data Catalog in detail:</p><h3>1.0 Automated Metadata Harvesting:</h3><p>Metadata harvesting is the automated collection of metadata descriptions from different sources to create useful aggregations of metadata and related services.</p><p>As covered in the <a href="https://medium.com/google-cloud/dataplex-an-intelligent-data-fabric-data-governance-at-scale-google-cloud-part-2-7a766e2e032c">Part-2</a> of the blog series, while creating a zone or registering an asset in dataplex, the following page is provisioned to capture the Discovery settings.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*EZiELxRFhbq7b9D8.png" /></figure><p>Based on the discovery settings, schedule etc, the Data Catalog harvester process extracts, standardizes, and indexes <strong>all the metadata information of the data asset automatically </strong>to create a unified and searchable repository in the Data Catalog.</p><p>Let’s see Automated Discovery in action.</p><h4>1.1 Register BigQuery Assets</h4><h4>1.1.1 Create a “crimes” BigQuery Dataset and Table and Register it</h4><pre>bq --location=us-central1 mk \<br>    --dataset \<br>    $PROJECT_ID:oda_crimes_staging_ds</pre><pre>bq --location=us-central1 query \<br>--use_legacy_sql=false \<br>&quot;CREATE OR REPLACE TABLE oda_crimes_staging_ds.crimes_staging AS SELECT * FROM bigquery-public-data.chicago_crime.crime&quot;</pre><p>Reload the BQ UI, you should see the table created. Query the table-</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8f71YAokhv22_dmUJWh9Eg.png" /></figure><h4>1.1.2 Register the crimes BigQuery Dataset as an asset into the RAW zone</h4><pre>PROJECT_ID=`gcloud config list --format &quot;value(core.project)&quot; 2&gt;/dev/null`<br>PROJECT_NBR=`gcloud projects describe $PROJECT_ID | grep projectNumber | cut -d&#39;:&#39; -f2 |  tr -d &quot;&#39;&quot; | xargs`<br>UMSA_FQN=&quot;lab-sa@${PROJECT_ID}.iam.gserviceaccount.com&quot;<br>LOCATION=&quot;us-central1&quot;<br>METASTORE_NM=&quot;lab-dpms-$PROJECT_NBR&quot;<br>LAKE_NM=&quot;oda-lake&quot;<br>DATA_RAW_ZONE_NM=&quot;oda-raw-zone&quot;<br>DATA_RAW_SENSITIVE_ZONE_NM=&quot;oda-raw-sensitive-zone&quot;<br>DATA_CURATED_ZONE_NM=&quot;oda-curated-zone&quot;<br>DATA_PRODUCT_ZONE_NM=&quot;oda-product-zone&quot;<br>MISC_RAW_ZONE_NM=&quot;oda-misc-zone&quot;</pre><pre>CRIMES_ASSET=&quot;chicago-crimes&quot;<br>CRIMES_STAGING_DS=&quot;oda_crimes_staging_ds&quot;</pre><pre>gcloud dataplex assets create $CRIMES_ASSET \<br>--location=$LOCATION \<br>--lake=$LAKE_NM \<br>--zone=$DATA_RAW_ZONE_NM \<br>--resource-type=BIGQUERY_DATASET \<br>--resource-name=projects/$PROJECT_ID/datasets/$CRIMES_STAGING_DS \<br>--discovery-enabled \<br>--discovery-schedule=&quot;0 * * * *&quot; \<br>--display-name &#39;Chicago Crimes&#39;</pre><p>Once the Discovery jobs finishes, the above command automatically updates the assets details into Data Catalog. Go to Dataplex and verify:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*P1Fie6G7TjFM2OOrT81L8g.png" /></figure><p>Within the oda-raw-zone, Dataplex shows “<strong>Chicago Crimes</strong>” as one of the assets which is of type <strong>Bigquery dataset</strong>.</p><p>Click on the <strong>Entities</strong> tab and it shows the Bigquery Table under the new Crime Dataset we created.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*I4OKvfFEWABpGNNfIG23yw.png" /></figure><p>Click on the Table and it will show all the Technical metadata about the table it has discovered and stored in the Data Catalog automatically.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lclqWY8yDSCHlog27sYhYg.png" /></figure><p>Lets now register a GCS storage into Dataplex.</p><h4>1.2 Register Google Cloud Storage Assets</h4><p>I have a GCS bucket which consists of the following datasets. Each of the folders have .csv data files in it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*n5i8NARZJmOUB1Gze74mAg.png" /></figure><p>Let’s register this bucket with the <strong>oda-raw-zone </strong>inside Dataplex as “Miscellaneous Datasets”</p><pre>gcloud dataplex assets create misc-datasets \<br>--location=$LOCATION \<br>--lake=$LAKE_NM \<br>--zone=$DATA_RAW_ZONE_NM \<br>--resource-type=STORAGE_BUCKET \<br>--resource-name=projects/$PROJECT_ID/buckets/raw-data-$PROJECT_NBR \<br>--discovery-enabled \<br>--discovery-schedule=&quot;0 * * * *&quot; \<br>--display-name &#39;Miscellaneous Datasets&#39;</pre><h4>1.2.1 Review the assets registered in the Dataplex UI</h4><p>Navigate to Dataplex UI -&gt; Manage -&gt; ODA-LAKE -&gt; ODA-RAW-ZONE -&gt; and check if ““Miscellaneous Datasets” is available.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pZoGirAV4GyDdhFchnUsHg.png" /></figure><p>Click on the “Miscellaneous Datasets” and it will show all the technical data of the GCS bucket including its location on GCS etc.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9cwPKNU-0ayf86VA2iGeLw.png" /></figure><h3>2.0 Automated Schema inference and external table creation</h3><p>Along with pulling all the technical metadata of the GCS bucket, Data Catalog also <strong>infers the data from the CSV files</strong> within the bucket and <strong>automatically creates an external tables in Metastore and Bigquery.</strong></p><p>Click on “Miscellaneous Datasets” page above, click on the “Entities Tab”.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GppDSmAuh4TxsIB0o2zyfg.png" /></figure><p>You will see each of the data files in the bucket listed as <strong>Table.</strong></p><blockquote><strong>But these were just .csv files on GCS — how did they become a table?</strong></blockquote><p>Dataplex automatically infers Schema for objects in Cloud Storage and creates external table definitions in Dataproc Metastore Service (Hive Metastore Service) and BigQuery.</p><p>Click on the icecream_sales_forecasting. It will show the details of the external table registered within Bigquery and Metastore.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6s3qWOf0rwxHvCdTZsPvhQ.png" /></figure><p>Click on the <strong>Schema and Column Tags </strong>to see the inferred schema.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*76cncI6_1TsdR2_KtqSriQ.png" /></figure><p>Lets also check if the same is available in Bigquery.Go to Bigquery and check for the table in the oda_raw_zone.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/456/0*Puc4FgmNW3TvvkP-.png" /></figure><p><strong>To summarize, Data Catalog’s Automated Discovery and Metadata Harvesting provides the following features :</strong></p><p>1. Assets Discovery</p><p>2. Schema Inference for objects in Cloud Storage</p><p>3. External table definition creation, based on schema inference in Dataproc Metastore Service (Hive Metastore Service)</p><p>4. External table definition based on schema inference in BigQuery</p><p>5. The tables registered as Dataplex Zone level entities</p><p>6. The tables cataloged in Data Catalog and Searchable</p><h3>3.0 Search</h3><p>Dataplex provides an intuitive search interface to search the assets by systems, Lakes , Zones, Projects etc. Goto Dataplex → Search</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*j0OF7GS58BEh8ewdCkW80w.png" /></figure><p>It also provides various faceted search to enable attribute based search</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nPcyhOFiDDCwzTOu0SG85w.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZXc9xIcadsVqu15RuGBukw.png" /></figure><h3>Conclusion:</h3><p>Data Catalog is integrated into the Dataplex service and provides fully automated Metadata Discovery, Harvesting, Automated Schema inference and external table creation out-of-the-box.</p><p>It also provides an easy-to-use Search platform for Business Users and Stewards to quickly find the registered Data assets across multiple data lakes and zones across the organization’s Data estates.</p><p>For more details please visit:</p><p><a href="https://cloud.google.com/dataplex?hl=en">https://cloud.google.com/dataplex</a></p><p><strong>We will look into the Data Catalog’s Tagging features as a continuation of the Data Catalog Blog post.</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9162a4ed0990" width="1" height="1" alt=""><hr><p><a href="https://medium.com/google-cloud/dataplex-data-catalog-auto-discovery-and-metadata-harvesting-part-3-1-9162a4ed0990">Dataplex — Data Catalog | Auto Discovery and Metadata Harvesting | Part — 3.1</a> was originally published in <a href="https://medium.com/google-cloud">Google Cloud - Community</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Dataplex — An intelligent Data Fabric | Data Governance at Scale| Google Cloud | Part — 2 |…]]></title>
            <link>https://medium.com/google-cloud/dataplex-an-intelligent-data-fabric-data-governance-at-scale-google-cloud-part-2-7a766e2e032c?source=rss-5ea589cd1158------2</link>
            <guid isPermaLink="false">https://medium.com/p/7a766e2e032c</guid>
            <category><![CDATA[unified]]></category>
            <category><![CDATA[data-governance]]></category>
            <category><![CDATA[dataplex]]></category>
            <category><![CDATA[data]]></category>
            <category><![CDATA[google-cloud-platform]]></category>
            <dc:creator><![CDATA[Nishit Kamdar]]></dc:creator>
            <pubDate>Mon, 25 Sep 2023 08:54:17 GMT</pubDate>
            <atom:updated>2023-10-17T12:45:00.555Z</atom:updated>
            <content:encoded><![CDATA[<h3>Dataplex — An intelligent Data Fabric | Data Governance at Scale| Google Cloud | Part — 2 | Organization — Lakes and Zones</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*I22cMBib0kLPNz2M" /><figcaption>Lakes and Zones</figcaption></figure><p>This is Part-2 of the Dataplex series focussed on how to set up Organization — Lakes and Zones in Dataplex. <a href="https://medium.com/@nishitkamdar/dataplex-an-intelligent-data-fabric-data-governance-at-scale-google-cloud-part-1-ef08679dc86b">Part-1</a> provides an overview of the Dataplex service.</p><h3>Dataplex organization</h3><p>One of the core tenets of Dataplex is letting you <strong>organize and manage </strong>your data in a way that makes sense for your business, <strong>without data movement or duplication</strong>. Dataplex provides logical constructs like<strong> lakes, data zones and assets</strong> to abstract away the underlying storage systems and this logical organization becomes the foundation for setting policies around data access, security, lifecycle management, and so on.</p><p><strong>Terminology:</strong></p><p>Before we begin creating the Dataplex organization, let’s look at the key terminologies.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Spw3BO0eEKuI2iSq4xR99Q.png" /><figcaption>Dataplex Terminology</figcaption></figure><h4>Lake:</h4><p>A Dataplex Lake is a logical metadata abstraction on top of your assets (structured and unstructured) representing a data domain or business unit. For example, to organize data based on group usage, you can set up a lake per department (for example, Retail, Sales, Finance).</p><h4>Zone:</h4><p>A sub-domain within a lake, useful to categorize data by stage (for example, landing, raw, curated), or (for example, Bronze, Silver and Gold).</p><p>Zones are of two types, raw and curated.</p><ul><li><strong>Raw zone:</strong> Raw zones store structured, semi-structured, and unstructured data in any format from external sources. This is useful for staging raw data before performing any transformations. Data can be stored in Cloud Storage buckets or BigQuery datasets.There are no restrictions on the type of data that can be stored in raw zones.</li><li><strong>Curated zone: </strong>Curated zones store structured data. Data can be stored in Cloud Storage buckets or BigQuery datasets.Supported formats for Cloud Storage buckets include Parquet, Avro, and ORC. This is useful for staging data that requires processing before it’s used for analysis, or for serving data that is ready for analysis. BigQuery tables must conform to a well-defined schema and Hive-style partitions.</li></ul><h4>Asset:</h4><p>An asset maps to data stored in either <strong>Cloud Storage buckets or BigQuery Datasets</strong>. You can map data stored in separate Google Cloud projects as assets into a single zone.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*958tCp9q1zgl5b2c.png" /></figure><h3><strong>Creating a Dataplex Organization:</strong></h3><p>Dataplex Organization is a logical mapping of the actual data platform architecture, and therefore its important to have a view of the as-is platform set up, so as to map it to Dataplex Lakes, Zones and Assets.</p><p>We will be using the following Consumer Banking example for setting up our Dataplex organization.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cGU-o0mQhvsNTDtw86v60g.png" /><figcaption>Consumer Banking — Data Platform</figcaption></figure><p>The Consumer Banking platform is organized as a DataMesh architecture with 4 Domain Lakes and a Central operations Lake. Each of the Lakes have 2 to 3 Zones in it with data assets across GCS bucket and Bigquery Datasets.</p><p>Let’s get started!</p><h4><strong>Step 1.0— Create a Lake:</strong></h4><p>We will start with creating Customer Domain Lake.</p><p>From the Navigation menu &gt; under Analytics &gt; select Dataplex &gt; Create new lake and enter Customer Domain lake details.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*h_73D64HO_0VnEQiQho_jA.png" /></figure><p>Click create at the bottom of the page and the lake gets listed under Manage.</p><h3><strong>Step 2.0 — Create Zones:</strong></h3><p><strong>Customer domain </strong>has 3 data zones viz. Raw, Curated and Data Products.</p><p>Click on the newly created <strong>Customer Domain data lake</strong> &gt; Click add zone.</p><p>Select Raw Zone for Raw Data and Curated for Curated and Data Products Zones.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*O039El4-nRDE3c3HdajiYw.png" /></figure><p><strong>Step 2.1 — Data Discovery:</strong></p><p>Expand the Discovery Settings options.</p><p>The Discovery settings capture the Job configurations for automatic object scanning and metadata collection for the zone. Dataplex fully automates and manages the metadata harvesting through its discovery process.</p><p>Click Enable Metadata Discovery and Enable JSON and CSV options if the files in the GCS bucket contain these file types.</p><p>You can set the frequency and schedule of the job run as well.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CJoqHfXloueTMsCW_u0CFw.png" /></figure><p>Create the Zone and repeat this task for all the 3 zones. Following will be the view of the Customer Domain once the Lake and Zones are created.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*J4eakbg8s6hAINLqCTFSQg.png" /></figure><h3><strong>Step 3.0 — Create Assets:</strong></h3><p>With the Customer Domain Lake and Zones set up, let’s now map the actual data assets to it.</p><p>Click on the Customer Domain -&gt; Raw Zone &gt; Click Add Asset</p><p>Raw data is usually stored on GCS buckets and Curated in Bigquery Dataset.</p><p>For Raw data, select type-&gt; Storage Bucket and specify GCS bucket path to Customer Raw Data bucket.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*v0PdGBO9AW7UXyAoMu9CNw.png" /></figure><p>Select Discovery settings as inherit, if you wish to continue the Zone level discovery setting or override if you wish to exclude some objects from the bucket for this asset and click submit. The Raw Asset will be created within the Raw Data Zone.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RHYtRjT0LYNK2yg_bxyYdA.png" /></figure><p>Click on the Raw Asset Zone and it will show all the details of the data assets mapped. The External URL shows the GCS bucket name and the automatic metadata harvesting, Dataplex now has all the details of the data assets.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cRqPyIMUbcJi2JvlQ70O6Q.png" /></figure><p>Repeat the same process to register Data Assets for the other 2 Zones.</p><p>Repeat the same process for all the remaining Consumer Banking Data Lakes to complete the creation of the entire DataMesh on Dataplex as shown below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*29rubNzrulMvb-Nvj-lUCQ.png" /></figure><p>Yay!! You have successfully created a full hierarchy of the Customer Domain Lake in Dataplex!!!</p><p><strong>Explore the Dataplex Organization:</strong></p><p>With the entire organization set up and assets linked, we should now be able to <strong>search and discover </strong>all the assets we have linked to the Dataplex organization.</p><p>Once the discovery job finishes, all the metadata is loaded into Dataplex’s integrated Data Catalog service.</p><p>Go to Search -&gt; and type Customer in the search bar:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dGzKqK4Hcd_fB5YGXKbLgg.png" /></figure><p>Dataplex shows all the assets related to the “Customer” search string across Lake, Zones and Data assets we have configured.</p><p>Click on one of the Tables from the Search results.</p><p>It will open up a Bigquery like view inside of Dataplex and provides all the details of the Bigquery table like dataset, Schema, Lineage, Data Quality and Data Profile —everything within Dataplex!!!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ISXZXDI72GgKvdmVSNDUkw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hrjkLbzrAtb7Ul2OWnYgEQ.png" /></figure><p>You can also naviage to Bigquery by clicking the “Open in Bigquery” link above.</p><p><strong>GCloud Commands</strong></p><p>Along with UI, Dataplex also provides glcoud commands to create Lakes, Zones, Assets if you like to create it as a script that can be replicated to multiple environments.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*sqJJ-InkH7cIRb1f_dT4Ig.png" /></figure><p><strong>Conclusion:</strong></p><p>Google Cloud Dataplex provides an easy to use UI to create a <strong>logical organization </strong>aligned to the Data Platform Architecture. The key thing is, it does this without <strong>moving or duplicating any data assets</strong> of the platform.</p><p>Dataplex also manages and fully automates <strong>ingestion of all the metadata</strong> into its built-in Data Catalog service which we will deep dive into, in our next blog post of this series. Stay tuned!</p><p>For more details please visit:</p><p><a href="https://cloud.google.com/dataplex">https://cloud.google.com/dataplex</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7a766e2e032c" width="1" height="1" alt=""><hr><p><a href="https://medium.com/google-cloud/dataplex-an-intelligent-data-fabric-data-governance-at-scale-google-cloud-part-2-7a766e2e032c">Dataplex — An intelligent Data Fabric | Data Governance at Scale| Google Cloud | Part — 2 |…</a> was originally published in <a href="https://medium.com/google-cloud">Google Cloud - Community</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Dataplex — An intelligent Data Fabric | Data Governance at Scale| Google Cloud | Part — 1 |…]]></title>
            <link>https://medium.com/google-cloud/dataplex-an-intelligent-data-fabric-data-governance-at-scale-google-cloud-part-1-ef08679dc86b?source=rss-5ea589cd1158------2</link>
            <guid isPermaLink="false">https://medium.com/p/ef08679dc86b</guid>
            <category><![CDATA[data]]></category>
            <category><![CDATA[google-data-analytics]]></category>
            <category><![CDATA[data-governance]]></category>
            <category><![CDATA[google-cloud-platform]]></category>
            <dc:creator><![CDATA[Nishit Kamdar]]></dc:creator>
            <pubDate>Sun, 24 Sep 2023 08:05:32 GMT</pubDate>
            <atom:updated>2025-06-05T09:11:39.539Z</atom:updated>
            <content:encoded><![CDATA[<h3>Dataplex — An intelligent Data Fabric | Data Governance at Scale| Google Cloud | Part — 1 | Overview</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QzWQqrJYg0mYow_mzTfqxQ.png" /></figure><h3>Background:</h3><p>Data continues to be one of the most important assets of any enterprise. It is essential for making <strong>informed decisions</strong>, <strong>improving efficiency</strong>, and providing a <strong>competitive edge</strong>.</p><p>Over the last decade, trends like Bigdata, Digital Transformation, Smartphone and wearables, IoT devices, AI etc have led to accelerated trends that are pushing boundaries of Data Analytics architectures.</p><p><strong>Data volumes</strong> are growing massively, Data is stored across <strong>multiple data repositories</strong>, Data is stored <strong>across multiple clouds</strong> and Data is leveraged from <strong>edge-to-cloud</strong>, from applications to BI and AI.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rZYSv7FTiUUWJrorMu9ZNQ.png" /></figure><p>With such an unprecedented growth of data, one of the biggest challenges enterprises are facing is “<strong>How do I Govern it at scale?</strong>”</p><h3><strong>Challenges with the legacy approach:</strong></h3><p>With such a diverse, distributed, and complex data landscape, Legacy Data Governance techniques often fail or become too cumbersome and ineffective.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*THXmoVpZDTZBWSWzZ_LIpQ.png" /></figure><p>The data architectures of today look like the picture above, where the data assets are stored across multitude of storage systems — object store, OTLP Databases, Lakes, Warehouses, Marts, NoSQL DBs, Graphs DBs, Vector DBs etc as opposed to stored in one DataLake or a large Datawarehouse.</p><p>Therefore the legacy approach to managing them at an individual product or service level, often leads to silos, mixed security, redundant metadata and disjoint governance models. The need is to have a <strong>unified model </strong>to Data Governance that works across all the solution components.</p><h3><strong>Enter Data Fabric and Dataplex!</strong></h3><p>To solve the above Data Governance challenges of the modern data landscape, the industry pivoted towards developing <a href="https://www.gartner.com/smarterwithgartner/data-fabric-architecture-is-key-to-modernizing-data-management-and-integration"><strong><em>Data Fabric</em></strong></a><strong><em> </em></strong>model for Data governance<strong><em>(as described by Gartner in this paper)</em></strong>.</p><blockquote><em>“</em><strong><em>Data Fabric</em></strong><em> is an architecture that facilitates the end-to-end integration and management of various data assets through the use of intelligent and automated systems to manage, monitor, and govern your data</em><strong><em>”</em></strong></blockquote><h3><strong>Dataplex</strong></h3><p>Google Cloud Dataplex is an intelligent <strong>Data Fabric</strong> that provides a way to <strong>centrally manage, monitor, and govern your data </strong>across data lakes, data warehouses and data marts, and make this data securely accessible to a variety of analytics and data science tools.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Aa-d374gtUb0QvrE.jpg" /></figure><p>Dataplex provides an integrated analytics experience, bringing together the best of Google Cloud and open source tools, so you can rapidly curate, secure, integrate, and analyze data at scale. With built-in data intelligence using Google Artificial Intelligence (AI) and machine learning (ML) capabilities and a flexible consumption model, you can now spend less time wrestling with infrastructure and more time focused on driving business outcomes.</p><h3><strong>Dataplex Conceptual Architecture:</strong></h3><p>Dataplex is designed as a “<strong>Single pane of glass for management” </strong>for all your data across GCP.</p><p>As shown in the picture below, it integrates with the various underlying data storage systems and provides a Governance layer on top to manage, secure and govern all the data assets centrally thereby unifying the operating model of implementing Data Governance at Scale across your data estate.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Gi-hiCHgDM-BG_sYX24G9A.png" /></figure><h3>Dataplex — Key Features:</h3><h3><strong>1. Data organization and life cycle management</strong></h3><p>One of the core tenets of Dataplex is letting you <strong>organize and manage </strong>your data in a way that makes sense for your business, <strong>without data movement or duplication</strong>. Dataplex provides logical constructs like<strong> lakes, data zones and assets</strong> to abstract away the underlying storage systems and this logical organization becomes the foundation for setting policies around data access, security, lifecycle management, and so on.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*oqJt8ZBHSCjmNskxDigseA.png" /></figure><p>The Dataplex Organization can be applied to Central DataLake as well to the DataMesh architecture pattern.</p><p><strong>Central DataLake Pattern:</strong></p><p>Dataplex Lake and Zones can be mapped to the Data assets in the Landing, Structured and Refined zones (also known as Bronze, Silver and Gold Layers) of the Central Data Lake Architecture pattern. You can also attach data across multiple projects under the same zone.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/0*r6Na__zgknphgwQw.jpg" /></figure><p><strong>DataMesh Architecture Pattern:</strong></p><p>The data mesh architecture, first proposed in this <a href="https://martinfowler.com/articles/data-mesh-principles.html">paper</a> by Zamak Dehghani, describes a modern data stack that moves away from a monolithic data lake or data warehouse architecture to a distributed domain-specific architecture that enables autonomy of data ownership, provides agility with decentralized domain aware data management while providing the ability to centrally govern and monitor data across domains.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*33RSCgMMsYBDg7qE.jpg" /></figure><p><strong>Dataplex </strong>provides a data management platform to easily build independent <strong>data domains </strong>within a <strong>data mesh</strong> that spans your organization while still maintaining central controls for governing and monitoring the data across domains.</p><p>For example, you can create a lake per department within your organization (Customer, Operations, Sales etc.) and create data zones that map to data readiness and usage (e.g Sales Domain Zones — Raw Data, Offline Sales, Online Sales, etc.)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*KdPIBLTI0bys0urC.jpg" /></figure><h3><strong>2. Data discovery and Catalog</strong></h3><p>Dataplex automates data discovery, classification, and metadata enrichment of structured, semi-structured, and unstructured data, stored in Google Cloud and beyond, with built-in data intelligence. It manages technical, operational, and business metadata in a Data Catalog. Users can search, find, and understand it with built-in faceted-search interface using the same search technology as Gmail.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qpTik3qscYnv-uMm91KSCw.png" /></figure><h3><strong>3. Centralized security and governance</strong></h3><p>Dataplex enables central policy management, monitoring, and auditing for data authorization and classification, across data silos. Facilitates distributed data ownership based on business domains with global monitoring and governance.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*umCW74FEk-1zs9I1fr5A3w.png" /></figure><h3><strong>4. Built-in Profiling, Data quality and Lineage</strong></h3><p>Dataplex automates data quality across distributed data and enable access to data. Use automatically captured data lineage to better understand data, trace dependencies, and troubleshoot data issues.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8AE_kjn23qWPvtywoGGMBw.png" /></figure><h3><strong>5. Serverless data exploration</strong></h3><p>Interactively query fully governed, high-quality data using a serverless data exploration workbench with one-click access to Spark SQL scripts and Jupyter notebooks. It enables users to collaborate across teams with built-in publishing, sharing, and search features, and features one-click scheduling from the workbench.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KiXqcbXdZZeN58YEXCwjyQ.png" /></figure><p>We will deep-dive into each of the above areas as part of this series.</p><p><strong>Conclusion:</strong></p><p>Google Cloud Dataplex with its intelligent data fabric can help enterprises deploy an unified operating model towards Data Governance covering the entire lifecycle from Data Discovery, Organization, Cataloging, Enrichment, Quality and Security thereby allowing organizations to effectively manage their data assets at scale.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*V21sLwvSb7nSQpwV_BRhJA.png" /></figure><p>For more details please visit:</p><p><a href="https://cloud.google.com/dataplex"></a></p><p><a href="https://medium.com/@nishitkamdar/dataplex-an-intelligent-data-fabric-data-governance-at-scale-google-cloud-part-2-7a766e2e032c">Part-2</a> of the blog series on Data Organization — Lakes and Zones can he found <a href="https://medium.com/@nishitkamdar/dataplex-an-intelligent-data-fabric-data-governance-at-scale-google-cloud-part-2-7a766e2e032c">here</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ef08679dc86b" width="1" height="1" alt=""><hr><p><a href="https://medium.com/google-cloud/dataplex-an-intelligent-data-fabric-data-governance-at-scale-google-cloud-part-1-ef08679dc86b">Dataplex — An intelligent Data Fabric | Data Governance at Scale| Google Cloud | Part — 1 |…</a> was originally published in <a href="https://medium.com/google-cloud">Google Cloud - Community</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[A Complete Edge-to-Cloud Manufacturing Solution | Industry 4.0 GCP | Part -1 — Edge Platform]]></title>
            <link>https://medium.com/google-cloud/a-complete-edge-to-cloud-manufacturing-solution-industry-4-0-gcp-part-1-edge-platform-592ae6e070d?source=rss-5ea589cd1158------2</link>
            <guid isPermaLink="false">https://medium.com/p/592ae6e070d</guid>
            <category><![CDATA[industry-4-0]]></category>
            <category><![CDATA[manufacturing]]></category>
            <category><![CDATA[iiot-platform]]></category>
            <category><![CDATA[google-cloud-platform]]></category>
            <category><![CDATA[infrastructure]]></category>
            <dc:creator><![CDATA[Nishit Kamdar]]></dc:creator>
            <pubDate>Tue, 06 Dec 2022 19:43:54 GMT</pubDate>
            <atom:updated>2022-12-13T04:45:03.150Z</atom:updated>
            <content:encoded><![CDATA[<h3>A Complete Edge-to-Cloud <strong>Manufacturing Solution</strong> | Industry 4.0 | GCP | Part 1 - Edge Platform</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LmKhTY6KbzPIVACVMknLZg.jpeg" /></figure><p>This is Part-1 of the 3-part series on the Google Cloud’s Manufacturing Solution. The focus of this blog will be on the <strong>Edge Platform</strong> of the integrated suite offered by Google Cloud.</p><h3><strong>Background:</strong></h3><p><strong>Industry 4.0</strong> is revolutionising the way companies manufacture, improve and distribute their products. Manufacturers are advancing on their digital transformation journey, leveraging the best of technology innovations in <strong>Industrial Internet of Things (IIoT),</strong> <strong>Cloud computing and Analytics, AI</strong> and machine learning into their production facilities and throughout their operations to <strong>reduce cost, improve operational efficiencies</strong>, better products and services, strengthen competitiveness and deliver sustainable growth.</p><p>Implemented successfully, these solutions deliver irresistible returns. Across a wide range of sectors, it is not uncommon to see <strong>30%-50%,</strong> reductions in <strong>machine downtime</strong>, <strong>10%-30%</strong> percent increases in <strong>throughput</strong> and <strong>15%-30% </strong>percent <strong>improvements</strong> in labor productivity</p><h3><strong>The Challenge:</strong></h3><p>Nearly two thirds of <a href="https://www.mckinsey.com/industries/automotive-and-assembly/our-insights/clearing-the-air-on-cloud-how-industrial-companies-can-capture-cloud-technologys-full-business-value">manufacturers already use cloud solutions</a>, according to McKinsey. However, the biggest challenge they face is in <strong>scaling digital transformation projects from proof of concept to production</strong>.</p><p>The scalability challenges revolve around the following key requirements:</p><ol><li><strong>IIoT Platform: </strong>An Enterprise grade, <strong>fully connected</strong>, <strong>Scalable,</strong> <strong>Edge-to-Cloud</strong> Industry 4.0 platform is required.</li><li><strong>Edge Connectivity</strong>: Ability of the Edge platform to <strong>connect</strong> into all the Industrial assets like sensors, PLCs, SCADA, MES of various make, model and versions is key.</li><li><strong>Scalable Central Data Platform</strong>: A central, scalable, Data platform that provides a <strong>common data model </strong>with built-in data normalization and <strong>context-enrichment </strong>capabilities.</li><li><strong>Advance AI &amp; Analytics:</strong> Ability of the platform to provide integrated Advance <strong>Analytics and AI</strong> capabilities to build and deploy Machine learning models on to the shop floor.</li></ol><h3><strong>Introducing Google Cloud’s — Manufacturing Solution:</strong></h3><p>To ensure manufacturers can scale their digital transformation efforts into production, Google Cloud announced a <strong>new manufacturing solution suite</strong> early this year that focuses on solving the the key factors highlighted above.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WaOcGnq_x1dAGaKxgxo76Q.png" /><figcaption>Intelligent Manufacturing Suite</figcaption></figure><p>Let’s take a look at the new solutions as we follow the data journey, from the factory floor to the cloud:</p><ol><li><strong>Manufacturing Connect: </strong>is the factory edge platform co-developed with <a href="https://litmus.io/">Litmus Automation</a> that quickly connects with nearly any manufacturing asset via an extensive library of<strong> 250-plus out-of-the-box supported machine protocols </strong>through UI configurations. It translates machine data into a digestible dataset and sends it to the Manufacturing Data Engine for processing, contextualisation and storage. By supporting containerised workloads, it allows manufacturers to run <strong>low-latency data visualisation, analytics and ML</strong> capabilities directly on the edge.</li><li><strong>Manufacturing Data Engine: </strong>is the foundational cloud solution to process, contextualize and store factory data. The cloud platform can acquire data from any type of machine, supporting a wide range of data, from telemetry to image data, via a private, secure, and low cost connection between edge and cloud. With built-in data normalization and <strong>context-enrichment capabilities, it provides a common data model,</strong> with a factory-optimized data lakehouse for storage.</li><li><strong>Analytics: </strong>Built on Manufacturing Data Engine is an out-of-the-box integration with <strong>Looker</strong> templates that delivers a dashboarding and analytics experience. As an <strong>easy-to-use, no-code data and analytics</strong> model, it empowers manufacturing engineers and plant managers to quickly create and modify <strong>custom dashboards, adding new machines, setups, and factories</strong> automatically. The solution enables drill down into the data against KPIs, or on-demand to uncover new insights and improvement opportunities throughout the factory.</li><li><strong>AI-Driven Operations Optimisation: </strong>integrates the best of Google AI and machine learning platform and services to solve for key manufacturing usecases like <strong>Predictive Maintenance, Machine-Level anomaly detection, Visual inspection</strong> etc. These ML models can be trained and deployed seamlessly onto the shopfloor for real-time low latency inference in the matter of weeks.</li></ol><p>Lets deep-dive into the <strong>Manufacturing Connect </strong>solution which is the <strong>enterprise grade Edge Platform</strong> from Google Cloud.</p><h3>Edge Platform - <strong>Manufacturing Connect</strong></h3><p>Manufacturing Connect Platform — co-developed by Google and <a href="https://litmus.io/">Litmus Automation</a>, provides a highly scalable, purpose-built, edge platform to power Analytics and AI on the factory floors.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rdwhIU1sa7v8-5EeYmnW6Q.png" /></figure><p>Following are the key strengths of the MCE platform:</p><h3><strong>1. Connectivity:</strong></h3><p>MCE comes with an inbuilt library of <strong>250+ </strong>supported machine protocols that can connect into thousands of industrial assets like sensors, PLCs, SCADA, MES systems of different make, model and version. This is one of the <strong>biggest differentiator</strong> of the platform.</p><p>Some of the large conglomerates in India have been able to use MCE to connect into PLCs that were extremely dated. Using MCE, they are now able to leverage the data that was not accessible for years and include these assets into their Industry 4.0 initiatives.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Oc9zfM0YQd0zbNSh00xV2Q.png" /></figure><p><strong>Intuitive UI for Connectivity:</strong></p><p>MCE provides a complete <strong>no-code portal </strong>to configure connection to the Industrial assets and set up all the tags within the asset.</p><p>Enclosed is an example view of the MCE portal. The “<strong>DeviceHub</strong>” section allows adding new device to the MCE platform by entering Device Type, Driver IP and Port.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AKnYp6s0eeZ6mMjibu4rvQ.png" /></figure><p>The DeviceHub as the name suggests, becomes a hub of all the connections to the various assets of plant. Once connected, the device shows a green <strong>Connected</strong> status as shown below. The UI also provides a stop and start option at the device level.</p><figure><img alt="" src="https://cdn-images-1.medium.com/proxy/0*FJeAPySKLDdx1bw2" /></figure><p><strong>Tags: </strong>Once the devices are set up, all the tags specific of particular device (e.g Body Stamping m/c shown below) can be added either one-by-one or can be uploaded in bulk as a csv file.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9XX5Lxl-v-AY-Kyg0lXt6Q.png" /></figure><p>Each tag can be assigned its own messaging topic where the IIoT payload will be delivered.</p><figure><img alt="" src="https://cdn-images-1.medium.com/proxy/1*2QK-n2MKXtx65Tt6FH2s5A.png" /></figure><p>In summary, MCE provides an extremely easy to use UI to set up Assets and Tags and connect them through 250+ out-of-the-box connectors.</p><h3>2. Edge Intelligence:</h3><p>Edge Intelligence provides the core Data and AI capabilities inside of MCE. Following are the key components of the platform that drives intelligence on the factory floor.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ERiA31SYZle4Yn9cfOgSbw.png" /></figure><ol><li><strong>Local Storage: </strong>The storage layer consists of native <strong>messaging broker</strong> system. All the tags configured in the Connectivity section, can be configured to deliver the IIoT payloads to their corresponding <strong>Topics</strong>. MCE also provides <strong>InfluxDB</strong> <strong>Timeseries</strong> database to store data locally.</li><li><strong>Data Processing: </strong>MCE provides a rich <strong>UI based, no-code Analytics workflow </strong>builder much like the ETL tools, to build data pipelines to collect, cleanse, merge, transform and store data. It also provides various inbuilt <strong>statistical functions </strong>for anomaly detection, Arima filters etc.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*iYfnLdNyXrult4QhpkJwgw.png" /></figure><p><strong>3. Analytics: </strong>MCE allows any dockerized application to be installed on its platform. Therefore, popular analytics tools like <strong>Grafana, Nagios</strong> etc can be installed and used for Advance analytics. Following are some of the example Grafana dashboards on <strong>OEE, Downtime and Anomaly Detection</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*n8muI33C3gcXEKxikTRDxQ.png" /></figure><p>4 . <strong>AI-ML: </strong>AI-ML models<strong> </strong>created on Google Cloud platform can be exported and <strong>hosted as a Docker containers</strong> integrated into the MCE edge. Will cover more on this in part-2 of the series.</p><p>In summary, MCE provides an extensive <strong>Edge Intelligence Platform</strong> to collect, store, process, analyze and visualize plant data to power Analytics and AI at scale on the factory floor.</p><h3>3. Seamless Google Cloud Integration:</h3><p>MCE fully integrates with Google Cloud platform and provides a complete end-to-end, Edge-to-Cloud solution for building and deploying Industry 4.0 case studies at scale.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DSWrh_N4fEJrOBF2piqp4g.png" /><figcaption>Google Cloud Integration</figcaption></figure><p>The “<strong>Integrations</strong>” tab allows creating an integration with Google Cloud <strong>PubSub</strong> through an easy to use UI. Once the integration is set up, MCE Edge Topics can directly be mapped to the Google Cloud <strong>PubSub topics </strong>either one-to-one, or one-to-many as required. This will allow seamless flow of the IIoT data from Edge-to-Cloud.</p><p>MCE also provides a toggle switch at each Tag to select if the user wants to send data to the cloud or just keep it within Edge.</p><p>Once data flows into <strong>PubSub —</strong> it is available for the rest of the<strong> Google Cloud ecosystem for Advance Analytics and AI.</strong></p><h3>Completing the picture!</h3><p>True to the title of this blog, here’s the complete picture of the end-to-end, Edge-to-Cloud Enterprise grade Google Cloud Manufacturing Solution!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3rUgLmdnAHa6FtLTeHk7Zw.png" /><figcaption>Edge-to-Cloud Integrated Platform</figcaption></figure><p>Stay tuned for the Part-2 of the series which will focus on the most fundamental element of the solution — <strong>Google Cloud - Data Engine.</strong></p><h3><strong>Conclusion:</strong></h3><p>Google cloud’s new manufacturing solution provides an integrated solution to solve for complex manufacturing challenges at scale. The emphasis is on making critical technology, such as Cloud and AI, accessible, easier to use and deeply embedded in manufacturers’ day-to-day operations, to un-cover new insights and to optimize operations in entirely new ways.</p><p>For more details please visit: <a href="https://cloud.google.com/solutions/manufacturing-data-engine">https://cloud.google.com/solutions/manufacturing-data-engine</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=592ae6e070d" width="1" height="1" alt=""><hr><p><a href="https://medium.com/google-cloud/a-complete-edge-to-cloud-manufacturing-solution-industry-4-0-gcp-part-1-edge-platform-592ae6e070d">A Complete Edge-to-Cloud Manufacturing Solution | Industry 4.0 GCP | Part -1 — Edge Platform</a> was originally published in <a href="https://medium.com/google-cloud">Google Cloud - Community</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Visual Inspection AI | A differentiated service for Manufacturing Industry| Google Cloud]]></title>
            <link>https://medium.com/google-cloud/visual-inspection-ai-a-differentiated-service-for-manufacturing-industry-google-cloud-d2ac14ff600d?source=rss-5ea589cd1158------2</link>
            <guid isPermaLink="false">https://medium.com/p/d2ac14ff600d</guid>
            <category><![CDATA[computer-vision]]></category>
            <category><![CDATA[visual-inspection]]></category>
            <category><![CDATA[manufacturing-solutions]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[google-cloud-platform]]></category>
            <dc:creator><![CDATA[Nishit Kamdar]]></dc:creator>
            <pubDate>Wed, 14 Sep 2022 18:48:58 GMT</pubDate>
            <atom:updated>2022-12-13T04:44:39.682Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*diM0MAKs3wy3UmIN.jpeg" /></figure><h3>Background:</h3><p><strong>Industry 4.0</strong> is revolutionising the way companies manufacture, improve and deliver their products. Manufacturers are integrating cutting-edge new technologies, including Internet of Things (IoT), Edge Computing , AI and machine learning into their production facilities and throughout their operations.</p><p><strong>Production quality</strong> and <strong>Yield</strong> are two of the industry’s top performance metrics. Poor production quality control results in significant operational and financial costs in the form of low yield, increased inventory, high recalls, claims, and repairs. In fact, the American Society for Quality estimates that for many organizations, <strong>cost of quality is as high as </strong><a href="https://asq.org/quality-resources/cost-of-quality"><strong>15–20% of annual sales revenue</strong></a><strong>,</strong> or billions of dollars annually for larger manufacturers.</p><p>Therefore, it’s extremely important for manufacturers to embrace the new age technology advancements and look at new ways to improve Product quality and Yield.</p><h3>What is Visual Inspection AI?</h3><p><strong>Visual Inspection</strong> (VI) is the process of examining a component or piece of equipment using one’s naked eye to look for flaws.</p><p><strong>Visual Inspection AI</strong> is a computer science discipline that trains machines to make sense of images and visual data the same way people do. Visual inspection AI uses the best of <strong>Deep Learning technologies </strong>to emulate Vision capabilities of human beings, and build a cognitive understanding of image attributes to point out anomalies in them, just as a person would but with much greater speeds and accuracies.</p><h3>What are the problems with current Visual Inspection approaches?</h3><ul><li><strong>Manual:</strong> Most visual inspection jobs are done <strong>manually</strong>. This is time consuming, highly dependent of the skills of the operator, prone to errors, and also costly.</li><li><strong>Machines:</strong> Another approach is using <strong>Specialized inspection machines </strong>that use <strong>Ultrasonics, Radiography</strong> etc. These are extremely expensive and purpose-built to solve for very specific problems only and are not extensible across variety of usecases.</li><li><strong>AI: Generic Computer Vision models</strong> used for inspection are not purpose-built to solve for manufacturing usecases. These are models that are trained on a dataset for general purpose Vision AI usecases around face , object , sentiments, colors, places detection etc and therefore require extremely large datasets to train for Visual inspection usecases from scratch and even then struggle to deliver the required accuracies.</li></ul><h3>Introducing Google Cloud Visual Inspection AI (VIAI)</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/640/1*9i-jKUMvNmMPobmjpDma8g.gif" /></figure><p>Google teams faced the same challenges as highlighted above, in its manufacturing of pixel phones and invested years in solving for the quality related challenges. <strong>Visual Inspection AI</strong> — a state-of-the-art deep learning based Visual inspection AI platform, is a culmination of above effort, that provides a purpose-built AI based quality inspection platform specifically designed to solve for the manufacturing problems.</p><p>Following are some of the key highlights of Visual Inspection AI Service:</p><ul><li><strong>Superior computer vision and AI technology</strong>: VIAI customers improved <strong>accuracy by up to 10x </strong>compared with general purpose ML approaches. It can detect the tiniest defects by supporting ultra-high resolution images (up to 100M pixels) using Computer vision technology that Forrester ranked as the <a href="https://cloud.google.com/blog/products/ai-machine-learning/forrester-names-google-cloud-a-leader-in-the-new-wave-for-computer-vision-platforms">leader in the industry</a>.</li><li><strong>Run autonomously on-premises</strong>: Manufacturers can run inspection models at the network edge or on-premises. The inspection can run either in Google Cloud or fully autonomous on your factory shop floor.</li><li><strong>Short time-to-value</strong>: Customers can <strong>deploy in weeks</strong>, rather than months with traditional machine learning (ML) solutions. Built for process and quality engineers, no computer vision or ML experience required.</li><li><strong>Get started quickly, with little effort</strong>: VIAI can build accurate models with up to <strong>300x fewer </strong>human-labelled images<strong> </strong>than general purpose ML platforms. Legacy solutions require thousands of labelled images.</li><li><strong>Goes beyond anomaly detection</strong>: Unlike competing solutions that use simple anomaly detection, VIAI’s deep learning allows customers to train models that detect, classify, and precisely locate <strong>multiple defect types </strong>in a single image.</li><li><strong>Highly scalable deployment</strong>: Manufacturers can flexibly deploy and<strong> </strong>manage the lifecycle of ML models, scaling the solution across production lines and factories.</li></ul><p>Like a lot other google services, Visual Inspection AI service is now available as a public service and its the same service that inspects millions of pixel phones as shown in the image above.</p><h3>Which use cases does Visual Inspection AI solve for?</h3><p>Google Cloud’s Visual Inspection AI platform solves for 3 distinct Manufacturing use cases :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rzU4tiaARMbUJ7a7Vs3I-A.png" /></figure><h4>1) Image Anomaly Detection:</h4><p>Anomaly detection model detects anomalies at an image level. The training needs to include images with and without anomalies and the model will be able to distinguish between the same. Anomaly detection can be used across a variety of industrial use-cases like defective parts identification, parts wear and tear detection, deformation, packaging and labelling anomalies etc</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/326/1*R-vcWfS6ZzfaYBLOP_CA8g.png" /></figure><h4>2) Cosmetic inspection:</h4><p>Cosmetic inspection locates even tiniest and most complex defects (dents, scratches, cracks, deformations, etc.) on any kind of surface. It has the capability to detect multiple defects types(scratch, dent)as well as identify multiple occurrences of the defects types which is very unique.</p><p>Cosmetic inspection can be used for a variety of use-cases like Paint shop surface inspection, body shop welding seam inspection, press shop inspection (scratch, dents, cracks, staining), product surface check (glue spill, mesh deformation, scratches, bubbles,) etc.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/302/1*ovnDa6i-wY7GVpoU_TgNrg.png" /></figure><h4>3) Assembly inspection</h4><p>Assembly inspection detects even the most subtle defects at various stages of the assembly process (wrong, misplaced, missing, rotated, or deformed components).Assembly inspection can be used in the assembly areas of industrial production to check for packaging inspection, board assembly inspection etc</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/396/1*XN5SzQxBEqhfXIGsee50hA.png" /></figure><h3>Wait! How is VIAI different from Google Cloud Vision AI or AutoML Vision?</h3><p><strong>Vision AI Vs Visual Inspection</strong></p><p>Vision API offers powerful <strong>pre-trained Vision model hosted and trained by Google</strong>. It is used for <strong>generic Vision AI services</strong> like detecting objects, faces, sentiments, colors, reading text etc via REST API services. Its not purpose-built to solve for the manufacturing usecases and it also does provide a platform like Visual inspection to allow for training model using your own datasets.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*77D21zaItj8CYem7JyLBbQ.png" /></figure><p><strong>AutoML Vision Vs Visual Inspection</strong></p><p>AutoML Vision is a platform that allows for training of your own custom machine learning models. However, AutoML Image/Video service is best for creating generic Vision models for usecases like face, objection, places, sentiment detection etc.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7FP7ZsnqZuMQHZwqBiosFQ.png" /></figure><p>Visual Inspection, on the other hand, while similar to AutoML platform, leverages industrial datasets and models, pioneered by Google, to solve for the three specific manufacturing usecases stated above. It’s a domain based industry solution as compared general purpose AutoML vision service.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RCyropg0H90JoooFM70AAg.png" /></figure><h4>OK! So, how does one go about building a Visual Inspection service?</h4><p>VIAI platform provides 4 easy steps in building an VIAI service through an intuitive UI and does not require any code.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*eUnGogpIl0wl4Zv-o0VSrg.png" /></figure><ol><li><strong>Image collection :</strong> The first step is collecting images and saving those them in Cloud storage. These images are for defective as well as non-defective items.</li><li><strong>Image Labelling: </strong>Each image has to be annotated to identify and label the items as defective or correct. For Cosmetic Inspection, this could include annotating multiple defects types and occurrences.</li><li><strong>Model Training: </strong>Once the labelling is complete, the model training phase commences. The training is broken down into several steps. The initial training uses an aspect of AI called <strong>active learning</strong> which helps suggest items to be labelled.The second step uses these newly labelled items to improve the accuracy.</li><li><strong>Model deployment:</strong> On completion of the training, a new VIAI model is created and stored in the registry. The model is ready to be exported as a container to the plant or factory for deployment and live predictions.</li></ol><h3>Let’s go and build a model!</h3><p>We will be building a <strong>Cosmetic Visual Inspection model </strong>to identify <strong>scratches</strong> and <strong>dents</strong> on the surface of the Pixel phone as shown below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/254/1*1aiF9z9CwNf-MjrzWvR4YQ.png" /></figure><p><strong>Step 1 : Image collection: </strong>Navigate to the Visual Inspection service in Google Console and click on Create Datasets.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bp7agroySn61iPOY-q4H5w.png" /></figure><p>Specify a dataset name →Select Cosmetic Inspection as Objective, Bounding Box as annotation type → Click Create. This will create a new dataset collection.</p><p>Next, upload the training images to the dataset by uploading it directly from your computer or via loading the images into GCS, creating a CSV and specifying the same in the import file path below.</p><p>On completion, all the images will be uploaded into the dataset.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*v0EZQeALbjwQIe9y7HWTJA.png" /></figure><p><strong>Step 2 : Image Labelling (Annotations)</strong></p><p>On the dataset screen, select <strong>Defects </strong>tab beside the browse option.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kG7HaWTTXI4Mwh-rntBPPQ.png" /></figure><p>Click — Add Defect Type and add 2 types of defects: <strong>Dent and Scratch</strong>. The pixel phone surface has these two types of defects which we will annotate and map to the corresponding defect types.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZI91sIxT0KUrInSTOEtL8Q.png" /></figure><p>Once complete, you will see them listed with different colors on the left hand side as shown below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*oWS187ctF7z8yYapu_wOnQ.png" /></figure><p>We will now begin with image annotation.Click on an image to open annotation view.Click “<strong>Add Bounding Box</strong>” icon from the palette.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pqbM6dz5JPHzwjmdcYuoCg.png" /></figure><p>Draw polygon around the defect on the pixel phone and map it to the configured defect types.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GExH7wvCaN7gWXmzHTIHRg.png" /></figure><p>Repeat it for all the training images.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ja9d8oaPDutFVJUgKiye4g.png" /></figure><p>Now, we are ready with the training dataset, so let the model training begin!</p><p><strong>Step -3 Model Training:</strong></p><p>Click — <strong>Start Training</strong> button on the right side. This will kick start the training process in the background and depending on the number of images and complexity, it will take between 24 to 48+ hours to train the model.</p><p>On completion of training, a new custom cosmetic model for inspecting your pixel phone is created!</p><p>Click on the Model options on the left menu. Drill down inside the Model title you will see the model.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*z7YtgvEcy6UDHswMw7uzPw.png" /></figure><p><strong>Evaluation: </strong>Click on the model name and it will take you to the evaluation page which contains details of the model evaluation metrics like Precision, Recall, Confusion matrix etc thereby providing a view of accuracy of the model.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gmHceQxC8xNC97l5i9AOFg.png" /></figure><p><strong>Model Testing:</strong></p><p>Now that the model is ready, lets test it before deploying it to production.</p><p>Click on the “Test &amp; Use’ tab beside Evaluation to get to the following page.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HNHxY1UO_T8Vibg6XL2Xzw.png" /></figure><p>To test the Visual inspection model, a<strong> Solution Artifact</strong> needs to be created. Solution artifact is the actual container containing our trained model.</p><p>Click on the “Create Solution Architect” option. It provides 2 types of provisioning.</p><ol><li><strong>Online Testing :</strong> This option is to create an online version of the model which you can use to test upto 20 images at no cost. Fill in details as shown below and click continue.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nxTlyqv98b7hGF0XzSD3EQ.png" /></figure><p><strong>2. Deployment:</strong></p><p>This is to create a deployment artifact for production. It takes in additional details like the number of camera streams and number of month of usage to derive cost of using this model. <strong>This is a fixed cost</strong> <strong>that allows for any number of images to be processed via the model </strong>as opposed to be charged on the number of images processed.</p><p>The deployment model will be typically created after the online-testing model created above is tested and good to go.</p><p>Fill in the appropriate details and click continue.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RyLW7CJbpEDHKV4g2cYLEQ.png" /></figure><p>On completion of the above activity, the platform will create both the artifacts as shown below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*85klEg8qvTZ_pn2giGB1gQ.png" /></figure><p>Click on the “Create Test” option on the screen.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qB-79iYYSMZiTpMWY2L7Ng.png" /></figure><p>Choose the online-testing model in the dropdown and provide the sample test images CSV and an output path for the model to write the output. Click create to run the batch.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1006/1*r4rOPdb30hb31hfRrl_Obw.png" /></figure><p>The batch process will pick up each of the test image provided as an input, process it through the cosmetic inspection model and store the output jsonl file and the images into the output location specified.</p><p>To make it more intuitive, the platform has integrated an output page that shows all the defects identified in the image with its annotations.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yY3YAGXzQcG2jl--4UTpEg.png" /></figure><p>To see this — Click on the path generated in the ‘Storage’ column and the following page appears showcasing the results of model inference on the test image, annotated with the defects types specified in right side.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rCKWhRpcbxPWFESU1BnZHw.png" /></figure><p>Click on the “Preview Images” to change the image and review all the test images for the accuracy of cosmetic inspection model and see how the tiniest of the scratches and dents have been properly identified by the model- Bravo!</p><p><strong>Step -4 Model Deployment:</strong></p><p>The VIAI model can be deployed both on on Google Cloud or on-prem.</p><p><strong>On-prem deployment:</strong></p><p>Lets look at on-prem deployments as it is the most commonly requested option by customers.</p><p><strong>Hardware Requirements:</strong></p><p>Before the model can be deployed on-prem, the required hardware provisions needs to be done.</p><ol><li><strong>Edge server</strong> : We recommend Nexcom X300 Edge industrial PC with GPU as an optimum hardware specs for edge analytics. It supports all key camera stream protocols like Genicam, RTSP etc</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*I5qcnNFdnj1TT8TBjelcAA.png" /></figure><p>2. <strong>Camera</strong>: Following is the proposed specification of the camera and it needs to support one of the above protocols.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/296/1*NrBNEZ98Fny-7yaVPiorIg.png" /></figure><p>3. <strong>Lighting</strong>: Lighting is key to get a consistent quality and a clear image of the source for the overall success of the model output.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/322/1*zVfiby_6MqsQU9u6vzVH8w.png" /></figure><p><strong>End-to-End Reference Architecture:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LYJNnoxxOXt_ifHqZO_0WQ.png" /></figure><p><strong>VIAI Edge Set Up:</strong></p><p>With the required hardware in place, VIAI provides an Edge Server software that can be installed on the industrial PC. The software stack is represented by the green block above. The software provisions all the required components on the edge through an automated script and it also provision the Google Cloud back-end services.</p><p>Our Cosmetic Model is now ready for prime-time. The model we generated through the “Create solution artifact” Deployment option above is stored in the Google Cloud Container registry. Using configuration, the Edge server pulls the container from the registry and deploys it on to the K8s Cluster on Edge server.</p><p>The images captured by the cameras from the production line can be processed through the model hosted on the VIAI server and the inference can be used to automated the Quality inspection.</p><p>At a periodic intervals, the inference details and training images can be sent over to the cloud for re-training the models and the refined model can be deploy back on to the edge server to constantly tune and improve on the model performance.</p><p><strong>Hurray! You have successfully created and deployed a Cosmetic Inspection Model!!</strong></p><h3>Conclusion:</h3><p>Advancements in Artificial Intelligence and Edge Computing have led to a whole new ways of looking at traditional challenges in the Quality and inspection areas of Manufacturing. By employing cutting-edge Deep Learning technologies in Visual inspection, industries can get much higher precision, scale, throughput at a lower cost and with little to no human interventions.</p><p>Google is a pioneer in building Artificial Intelligence based technology solutions like Visual Inspection. For more details, pls visit → <a href="https://cloud.google.com/solutions/visual-inspection-ai">https://cloud.google.com/solutions/visual-inspection-ai</a></p><p>Happy Edge Analytics!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d2ac14ff600d" width="1" height="1" alt=""><hr><p><a href="https://medium.com/google-cloud/visual-inspection-ai-a-differentiated-service-for-manufacturing-industry-google-cloud-d2ac14ff600d">Visual Inspection AI | A differentiated service for Manufacturing Industry| Google Cloud</a> was originally published in <a href="https://medium.com/google-cloud">Google Cloud - Community</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Measuring and Improving Speech-to-Text Accuracy | Google Cloud Platform]]></title>
            <link>https://medium.com/google-cloud/measuring-and-improving-speech-to-text-accuracy-google-cloud-platform-eba62c50b8ac?source=rss-5ea589cd1158------2</link>
            <guid isPermaLink="false">https://medium.com/p/eba62c50b8ac</guid>
            <category><![CDATA[google-ai]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[google-cloud-platform]]></category>
            <category><![CDATA[google-speech-to-text]]></category>
            <dc:creator><![CDATA[Nishit Kamdar]]></dc:creator>
            <pubDate>Wed, 09 Mar 2022 19:14:31 GMT</pubDate>
            <atom:updated>2022-12-13T04:44:19.582Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-V47O9e3T_LxR3P-lcpR0g.png" /></figure><p><strong>What is Speech-to-Text?</strong></p><p>Speech-to-text(STT), or automatic speech recognition (ASR) is a technology that enables human speech to be converted automatically into text through computational linguistics.</p><p>It is one of key areas of the Artificial intelligence that has strived over decades, to come as close as possible to human capabilities of speech recognition using breakthrough advancements in the Deep Learning technologies.</p><p>These advancements have led to Speech-to-text’s adoption in our everyday personal use on phones, homes applications to industrial applications like call-analytics and agent assist, Media subtitling, Clinical documentation, Content search etc.</p><h3><strong>What are we solving for using STT?</strong></h3><p><strong>Problem statement:</strong> Customer is an Asset Management Company and as part of their onboarding journey and policy registration process, they record a video testimony of their customers who agree to the terms and conditions of the policy. This is used as a legal admissible evidence should there be a conflict of interest in future. As part of an compliance audit conducted on the video archives, quite a few non-compliances were found in terms of some videos without any voice, some with incomplete or missing facts and some with too much background noise making it difficult to understand what the customer was speaking.</p><p><strong>Solution: </strong>The Group IT team embarked on an initiative to introduce a Speech-to-Text transcription service to transcribe the Customer video testimonials and approve and store it only if the transcriptions are accurate in terms of capturing the key facts. The Group IT team started the initiative but were not able to get the required accuracies and reached out to us.</p><p>In this blog we will see how we helped the customers measure and improve the accuracy of their Speech-to-Text requirements using GCP’s Speech-to-Text service.</p><h3><strong>ASR under-the-hood and Google Speech-to-Text!</strong></h3><p>Before we jump into improving the accuracy, it is important to</p><ol><li>Have a high level understanding of how the ASR systems function.</li><li>How do we measure the outcome to improve the same?</li></ol><h3><strong>ASR — System Architecture</strong></h3><p>This is an extremely simplified diagram to get a give a high level understanding of the system.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6BSiwhp-PsbmsLAH-2qMHg.png" /><figcaption>Google Speech-to-text</figcaption></figure><p>The system takes an audio input in from the user as chunks of 10–25 milliseconds speech frames to process and develop what’s called an <strong>acoustic model. </strong>The <strong>Acoustic model</strong> looks at the audio wave forms or the spectrogram and converts these waveforms into <strong>phonemes</strong>.</p><p>A <strong>phoneme</strong> is distinct unit of sound in a specified language that makes up a word. The example below shows 3 distinct phonemes that make up the words “five” and “four” in english. These word to phoneme mappings are developed by experts and can be thought of equivalent of alphabets that make up the word but using phonetics.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5jW5fmW4IxkUtJIozs_SDA.png" /></figure><p>These Phonemes word predictions are then fed into what is known as a <strong>Language model</strong>.</p><p><strong>Language Model</strong> provides a way interpret how the words should be ordered for a particular language and these models are developed by training on lots and lots of text in that particular language. Language Model looks at the groupings and series of phonemes and tries to transcribe the output as a series of word lattice which are sent as an output.</p><p>So, in a very simple way, thats how the speech gets transcribe into text.</p><h3>Measurement: Word Error Rate (WER)</h3><p>Speech to Text output is measured in <strong>Word Error Rate(WER)</strong> which is the combination of three types of transcription errors which can occur:</p><ul><li><strong>Insertion Error </strong>(<strong>I</strong>) — Words present in the hypothesis transcript that are not present in the ground truth (human transcription)</li><li><strong>Substitution errors</strong> (<strong>S</strong>) — Words that are present in both the hypothesis and ground truth but not transcribed correctly</li><li><strong>Deletion errors </strong>(<strong>D</strong>) — Words that are missing from the hypothesis but present in the ground truth</li><li><strong>Total number of words (N) </strong>— total words in the ground truth transcript</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/298/0*496zornM1bbvjYec" /></figure><p><strong>WER</strong> is calculated by adding all the errors (S+D+1) and dividing it by total number of words (N) in the ground truth transcript. Therefore the aim is be to have as much lower <strong>WER </strong>as possible.</p><h3><strong>Measuring and Improving the accuracy</strong></h3><p>With this background, let’s try and work through the problem of the AMC customer.I will be using the following ground truth to simulate the customer’s recorded testimonial and benchmark its accuracy:</p><p>“<em>I Nishit Kamdar am applying for a guaranteed income milestone policy from cymbal direct insurance. I confirm to pay the premium amount of rupees 50000 for a period of 5 years on an annual basis. I am based in Mumbai at 789 Alpine Regency Main Street Fort Mumbai 400001 and my contact number is 98211 65243 kindly consider this as my approval to process the application.”</em></p><h3><strong>Iteration </strong>—<strong>1 : Reviewing current configuration and accuracy</strong></h3><p>Following is the python sdk code that the group IT were trying out:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*b_DNJxp0KRPo-E9noRydVA.png" /></figure><p><strong>WER: </strong><em>Green strikethrough texts are the errors in transcription and yellow highlights are the ground truth text.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tlmpoVgXpUJilIYTQ_JMkg.png" /></figure><p>The WER of the current configuration was extremely high at <strong>37.88%</strong> bringing the overall STT accuracy down to<strong> 60+%.</strong></p><h3><strong>Iteration — 2 : Language Code</strong></h3><p>One of the key issue with the above configuration is <strong>language_code=en-US. </strong>Google speech-to-text provides <strong>125+ languages </strong>which include <strong>variants</strong> of these languages country-wise. So, for English language, it provides <strong>40+ variants </strong>of the way the english language is spoken in these countries. Since this is for indian customers, let’s change it to the indian variant.</p><p>Config updated to english for India — en-IN</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*z8PKdFnDLfpbsAv32thZyw.png" /></figure><p><strong>WER: </strong>The WER dramatically drops to 10+% giving close to <strong>90%+</strong> accuracy by making this change alone and therefore this is one of the most important configurations to review.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4M12vZBByJGv9iZSwwo-EA.png" /></figure><h3><strong>Iteration -3 : Transcription Model</strong></h3><p>Another key area to review is the context of the speech that is being transcribed. The context differs across various domains as shown below and therefore one should look for specific models for the type of transcription being done to get better accuracy.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uKeNCBva_ZSP3BYbb5hV3Q.png" /></figure><p>Google text-to-speech supports the following models as of today. These are available for specific languages only and are constantly evolving.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CDNSI0pc17Z-yo9oe77DAA.png" /></figure><p>Since none of the models apply to our scenario, we will go with the “default” one.</p><h3><strong>Iteration — 4 : Speech Adaptations — Phrase Hints and Boost</strong></h3><p>In our Iteration-2 output, we still see some <strong>proper nouns</strong> <strong>or rare words </strong>(People and Company name) Address and phone number related errors.</p><p>To address this, GCP provides <strong>Speech adaptions</strong> which are mechanisms to provide hints to the ASR to bias it to get the required output. There are 3 types of adaption features — phrase hints, boosts and Class tokens.</p><p><strong>Phrase hints</strong> provides an ability to define words or long phrases in the configuration request, that may be present in the speech, so that the system takes it into account and baises towards that particular piece of information .</p><p><strong>Boost</strong> allows you to add numerical weights to these phrase hints to adjust the strength of speech adaptation effects on your transcription results.</p><p>So let’s update the config with a <strong>Speech_Contexts </strong>parameter, passing the proper nouns and boosting its weight.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZxUOHerqsbkb1e7P5zk2dw.png" /></figure><p><strong>Output:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ea4uxYHVMRvIKNKYdVRsQg.png" /></figure><p>Both the proper nouns <strong>Nishit and Cymbal </strong>have now been transcribed correctly using the speech adaption phrase hints and boost feature thereby improving the transcription.</p><p><strong>Boost</strong> is also useful when dealing with words that exactly sound the same. like “fair and fare,” or “weather and whether”.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1GWnAHkYZyurhlHzf7jLNw.png" /></figure><p>The phrase hints and boosts could be used in 2 ways:</p><ol><li><strong>Static list</strong> : You could set up a dictionary of the key words which are unique to your domain or business and pass it as a parameter with each request to transcribe it correctly. Google STT also provides a way to store a collection of thousands of items and pass the collection ID so that you do not have to send all the items for every request. Example of static list could a list of indian medicine names which may not be standard words that can be used for medical transcription.</li><li><strong>Dynamic Parameters: </strong>It is not always possible to build a static list, like e.g for transcribing names, you can’t have a list of all the possible names built as a collection. In such cases, you can pass this parameters from upstream processes as parameters and create the config object dynamically.</li></ol><h3><strong>Iteration — 5 : Speech Adaptations — Classes</strong></h3><p>We are still left with phone number related errors and that’s where the <strong>Classes </strong>feature of speech adaptation will be helpful.</p><p><strong>Classes</strong> represent common concepts that occur in natural language, such as defining monetary units, addresses and calendar dates.</p><p>For example, if an audio recording contains “<strong>My house is at 123 Main Street</strong>”, the output expected would be (“123”) as numbers rather than ordinal (“one-hundred twenty-third”) even if its spoken like that.</p><p>This is where the Class token can be defined as [“My house is $ADDRESSNUM”] where $ADDRESSNUM is the class token that biases STT to transcribe numbers within the address. Similar to address token, there are various other class tokens for date, phone number, etc — Refer to <a href="https://cloud.google.com/speech-to-text/docs/class-tokens">https://cloud.google.com/speech-to-text/docs/class-tokens</a> to see the list of class tokens available per language. GCP STT also always you to define your own custom class tokens.</p><p>In our example, we have some inconsistencies with phone number, so I have added the phone num token below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QasXs8jvtrTrHL5RwZ-21A.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6K3vxZNQRaI5bRgI6JRa-Q.png" /></figure><p>The overall WER has dropped to <strong>3% </strong>thereby increasing the accuracy <strong>97% from 60+% </strong>by using the various configurations and optimisation techniques. There are other small errors which again can be fine tuned through a combination of adaptions. However, I have all the key facts I need in the testimonial, transcribed accurately and therefore I am happy with the 97% accuracy.</p><p>Along with these optimisations, there are also some Best Practices sampling rates and loseless codec that will help in providing an optimal input to the STT service which can be found at <a href="https://cloud.google.com/speech-to-text/docs/best-practices">https://cloud.google.com/speech-to-text/docs/best-practices</a></p><p><strong>Summary:</strong></p><p>Speech is hard and extremely complex under-the-hood. The expectations from ASRs should not be to get 100% accuracy but to leverage its potential to accelerate your transcriptions and drive business outcomes.</p><p>Google Cloud Platform’s Speech-to-text is built on decades of Google’s research and contribution to the ASR space and is one of leading Speech recognition and transcription service in the industry. With its Speech Adaptions, it also provides mechanism to tune and bias the engine to improve the accuracy of the transcription. For more details, please visit:</p><p><a href="https://cloud.google.com/speech-to-text">https://cloud.google.com/speech-to-text</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=eba62c50b8ac" width="1" height="1" alt=""><hr><p><a href="https://medium.com/google-cloud/measuring-and-improving-speech-to-text-accuracy-google-cloud-platform-eba62c50b8ac">Measuring and Improving Speech-to-Text Accuracy | Google Cloud Platform</a> was originally published in <a href="https://medium.com/google-cloud">Google Cloud - Community</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>