<?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 Anagha Khanolkar [Google] on Medium]]></title>
        <description><![CDATA[Stories by Anagha Khanolkar [Google] on Medium]]></description>
        <link>https://medium.com/@c_a_c_t_u_s?source=rss-c3fd47c9a471------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*6zUuwt_Z1DgjKtqVDPHhXA.jpeg</url>
            <title>Stories by Anagha Khanolkar [Google] on Medium</title>
            <link>https://medium.com/@c_a_c_t_u_s?source=rss-c3fd47c9a471------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 02 Dec 2026 23:27:39 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@c_a_c_t_u_s/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[Lakehouse Demystified — Part 5: Just enough about Managed Service for Apache Airflow]]></title>
            <link>https://medium.com/google-cloud/lakehouse-demystified-part-5-just-enough-about-managed-service-for-apache-airflow-d4f11517458b?source=rss-c3fd47c9a471------2</link>
            <guid isPermaLink="false">https://medium.com/p/d4f11517458b</guid>
            <category><![CDATA[lake-house]]></category>
            <category><![CDATA[google-cloud-platform]]></category>
            <category><![CDATA[data]]></category>
            <category><![CDATA[apache-airflow]]></category>
            <dc:creator><![CDATA[Anagha Khanolkar [Google]]]></dc:creator>
            <pubDate>Thu, 11 Jun 2026 14:41:05 GMT</pubDate>
            <atom:updated>2026-06-12T02:42:56.651Z</atom:updated>
            <content:encoded><![CDATA[<p>Welcome to Part 5 of the <strong>Lakehouse Demystified</strong> blog series — a practical guide to lakehouse on Google Cloud. My goal is to share an <strong>opinionated architectural perspective</strong> rooted in practical experience, providing depth and implementation-ready clarity through reference architectures, best practices, and minimum viable code. This series is created for <strong>lakehouse practitioners</strong> and <strong>future-state builders</strong> — the architects and engineers striving to master the “art of the possible” on Google Cloud while cutting through the noise of information overload.</p><p>In the series, so far, I have covered Managed Service for Apache Spark, Lakehouse runtime catalog, and aspects of Knowledge Catalog. This blog post covers the<strong> lakehouse pipeline orchestration</strong> from an Apache Spark angle and features the Google Cloud product — ‘<strong>Managed Service for Apache Airflow</strong>’.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HJrlN1tTO1JSNizIrHVI5Q.png" /><figcaption>Figure 0: Lakehouse stack on Google Cloud</figcaption></figure><p>When I sat down to write this, I had one specific reader in mind: someone who already knows the lakehouse paradigm, Apache Spark and Apache Airflow, but needs to get up and running on Google Cloud services as fast as possible. This post gives you just enough detail, along with a minimum viable functional sample as a hands-on lab to simplify your learning journey. It is dense by design, so grab a coffee — this is a crash course.</p><h3>1. [Recap] Lakehouse reference architecture</h3><p>In <a href="https://medium.com/p/6ac3e5051794">blog 2</a> of the series, I covered lakehouse reference architecture on Google Cloud. A core component is the lakehouse orchestration and once again, Google Cloud’s solution is ‘<strong>Managed Service for Apache Airflow</strong>’ (formerly called Cloud Composer).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WXfdqKAhMfcBRrXdIfSEYA.png" /><figcaption>Figure 1: Lakehouse Reference Architecture for Google Cloud</figcaption></figure><p>Let’s explore what the <strong>Managed Service for Apache Airflow</strong> is — starting with a gentle introduction to Apache Airflow for those new to it.</p><h3>2. Apache Airflow — an overview</h3><h4>2.1. Elevator pitch</h4><p><a href="https://github.com/apache/airflow"><strong>Apache Airflow</strong>®</a> is a robust, mature and widely adopted open-source platform for developing, scheduling, and monitoring <strong>batch-oriented workflows</strong>. Airflow’s <strong>extensible Python framework</strong> enables you to build workflows connecting with any technology of choice. A <strong>web-based UI</strong> helps you visualize, manage, and debug your workflows. You can run Airflow in a variety of configurations — from a single process on your laptop to a <strong>distributed system capable of handling massive workloads</strong>. Apache Airflow is becoming more and more <a href="https://airflow.apache.org/use-cases/mlops/"><strong>commonly used for MLOps</strong></a>. ~<a href="https://airflow.apache.org/blog/airflow-survey-2025/">40% of users use it for <strong>MLOps + GenAI</strong></a>.</p><p>Apache Airflow <strong>workflows are defined in </strong><a href="https://airflow.apache.org/docs/task-sdk/stable/index.html"><strong>Python</strong></a>. This “workflows as code” approach brings several advantages:</p><ul><li><strong>Dynamic pipelines</strong>: enables dynamic pipeline generation and parameterization.</li><li><strong>Extensibility</strong>: The Airflow framework includes a plethora of built-in operators (templatized repeatable tasks) with the ability to extend/create your own operators</li><li><strong>Flexible</strong>: Airflow leverages the <a href="https://jinja.palletsprojects.com/">Jinja</a> templating engine, allowing rich customizations.</li></ul><h4>2.2. Airflow infrastructure at a glance</h4><p>An <strong>Airflow environment</strong> is a self-contained deployment of Apache Airflow. It provides the complete infrastructure and runtime necessary to programmatically author, schedule, and monitor complex data pipelines and workflows.</p><p><strong>Key components of an Airflow environment</strong></p><p>An Airflow environment contains several core components as shown in the figure below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tOPtopFTBOMm4yNrzDDuJw.png" /><figcaption>Figure 2.2: Apache Airflow architecture from Airflow documentation</figcaption></figure><p>The following are descriptions of a few of the components:</p><ul><li>Web Server: The user interface (UI) used to manage DAGs, view logs, and monitor execution statuses.</li><li>Scheduler: The process that continuously evaluates your pipeline definitions and triggers tasks when their dependencies are met.</li><li>Workers: The actual compute resources (processes or containers) that execute the tasks.</li><li>Metadata Database: A database (e.g., PostgreSQL or MySQL) that stores the states of all tasks, user permissions, and variables.</li><li>Executor: The mechanism that defines how and where tasks run (e.g., locally, on a cluster, or via Kubernetes).</li></ul><p>Resources granted to each of these components can be adjusted based on workloads, concurrency and scale requirements.</p><p>Given the number of Airflow components (services) under the hood and potential points of failure, it is safe to say that managing Apache Airflow environments is a non-trivial task and requires knowledge of sizing, securing, scaling, tuning, configuring high availability, configuring cluster policies, upgrading, installing dependencies, configuring monitoring, alerting, metrics, priorities to name a few; And then there is the management and monitoring aspect.</p><h4>2.3. Airflow pipeline concepts</h4><p>The following are just a few of the core concepts and features that a data engineer developing pipelines deals with.</p><p><strong>2.3.1. DAG (Directed Acyclic Graph) </strong><br>The DAG is the pipeline definition in Python that is submitted for execution on schedule. The DAG is a model that encapsulates everything needed to execute a workflow. DAG attributes include the following and more:<br><strong>Schedule:</strong> When the workflow should run.<br><strong>Tasks:</strong> <a href="https://airflow.apache.org/docs/apache-airflow/stable/core-concepts/tasks.html">tasks</a> are discrete units of work that are run on workers. <br><strong>Task dependencies</strong>: The order and conditions under which <a href="https://airflow.apache.org/docs/apache-airflow/stable/core-concepts/tasks.html">tasks</a> execute.<br><strong>Callbacks</strong>: Actions to take when the entire workflow completes.<br><strong>Parameters</strong>: Any runtime parameters to pass such as project_id, user managed service account, subnetwork name etc and any other operational details.<br><strong>Pause, Resume, Trigger</strong>: You can pause, resume or trigger DAGs on demand<br><strong>Concurrent runs: </strong>There are configurations to prevent concurrent runs.</p><p>Here is a sample DAG from the Airflow documentation. Note the DAG schedule, and the ‘hello_task’ task which uses BashOperator, and the ‘say_your_name_task()’ task with plain Python function with task decorator and finally on the last line, the order of execution of tasks.</p><pre>from datetime import datetime<br>from airflow.sdk import DAG, task<br>from airflow.providers.standard.operators.bash import BashOperator<br><br># A Dag represents a workflow, a collection of tasks<br>with DAG(dag_id=&quot;demo&quot;, start_date=datetime(2022, 1, 1), schedule=&quot;0 0 * * *&quot;) as dag:<br>    # Tasks are represented as operators<br>    hello_task = BashOperator(task_id=&quot;hello&quot;, bash_command=&quot;echo hello&quot;)<br><br>    @task()<br>    def say_your_name_task():<br>        print(&quot;airflow&quot;)<br><br>    # Set dependencies between tasks<br>    hello_task &gt;&gt; say_your_name_task()</pre><p><strong>2.3.2. Tasks </strong><br>The discrete actions in the pipeline. The individual nodes or steps inside your DAG (e.g., ingest data into bronze layer with Spark, persist transformed data into gold layer in BigQuery). In the snippet above, ‘hello_task’ and `say_your_name_task()` are tasks.</p><p><strong>2.3.3. Operators </strong><br>Pre-built and repeatable templates (like the DataprocBatchOperator or BashOperator) that specify what a specific task should do. In the snippet above, ‘hello_task’ uses the BashOperator</p><p><strong>2.3.4. Task dependencies </strong><br>The specification on how tasks relate to one another (e.g., tasks for silver layer curation cannot start until tasks for bronze layer completes successfully). In the snippet above `hello_task &gt;&gt; say_your_name_task()` defines the order of execution.</p><p>I have merely skimmed the surface. There is more to the Airflow environment and there are other pipeline constructs that provide fine-grained control for engineers that are covered in the <a href="https://airflow.apache.org/docs/apache-airflow/stable/index.html"><strong>Apache Airflow documentation</strong></a>. But this blog is not about Apache Airflow, it is about Google Cloud’s <strong>Managed Service for Apache Airflow</strong>. So, let’s switch gears and get into the product and its salient features.</p><h3>3. About Managed Service for Apache Airflow</h3><h4>3.1. About the product</h4><p><strong>Managed Service for Apache Airflow (formerly Cloud Composer)</strong> is a fully managed workflow orchestration service built on Apache Airflow — the leading open source orchestration solution for data &amp; AI workloads.</p><h4>3.2. Value proposition of the product</h4><p>From a practitioner point of view, Airflow administrators look for ease of provisioning, patching, upgrades, securing, scaling, monitoring and optimizations to name a few. Data engineers look for simplicity of DAG authoring, familiarity, openness, reliability, extensibility, troubleshooting, and where needed, hybrid integration. Their employers look for reliability, security, governance, portability, and cost efficiency. Managed Service for Apache Airflow caters to the needs of all the three personas — Airflow administrators, data engineers and their leadership.</p><p>Managed Service for Apache Airflow provides ease of deployment of what is a non-trivial distributed infrastructure, with enterprise grade security features, fully managed infrastructure, robust scaling, monitoring and logging, configurable alerting, in-place upgrades, hybrid and multi-cloud integration support, first class operators for Google Cloud services, high availability, business continuity features, cost efficiency, and technical support without compromising DAG portability with zero vendor lock-in. Further, there is agentic troubleshooting assistance and a plethora of agents in development that will help with environment optimizations, upgrades and more, all from a chat window in the Managed Airflow user interface.</p><p>From a Total Cost of Ownership (TCO) perspective, Managed Service for Apache Airflow eliminates over tens of thousands in annual hidden operational toil, allowing your elite data engineering teams to focus on building pipelines, not managing infrastructure. You can use the Google Cloud calculator to price your data and orchestration workload — from <a href="https://cloud.google.com/products/managed-service-for-apache-airflow/pricing?e=48754805">here</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*0toIMOZpR6iDRFFmF6H60A.png" /><figcaption>Figure 3.1: Illustrative TCO example</figcaption></figure><h4>3.3. Versions of the product and considerations</h4><p>The service gives you the following options to choose from -<br>1. <a href="https://docs.cloud.google.com/composer/docs/composer-2/composer-overview">Managed Airflow — Gen 2 (old)</a><br>2. <a href="https://docs.cloud.google.com/composer/docs/composer-3/composer-overview">Managed Airflow — Gen 3 (new) </a>— RECOMMENDED</p><p>Read the <a href="https://docs.cloud.google.com/composer/docs/composer-versioning-overview">documentation</a> comparing the versions thoroughly to understand differences and nuances to help with choosing the right generation.</p><p>Google Cloud is strategically investing in Gen 3. The focus of this blog post is <strong>Managed Airflow — Gen 3</strong>. Managed Airflow Gen 3 has various Airflow versions to choose from between <a href="https://docs.cloud.google.com/composer/docs/composer-versions#images-composer-3">Airflow 2 and Airflow 3</a>. Best practice is to choose versions that have extended timelines for upgrades.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/911/1*ZNeFcaxZ7XzHM3EOJECsRw.png" /><figcaption>Figure 3.3: Managed Airflow versions</figcaption></figure><p>That was a high-level overview. Let’s look at the service from a practitioner lens.</p><h3>4. Practitioner lens — basics of Managed Airflow Gen 3 - provisioning and administration</h3><p>Basic questions an Airflow administrator tasked with managing environments might ask are addressed below-</p><h4>4.1. Hosting of the Managed Airflow environment</h4><p>The environment is hosted in a Google Cloud owned and managed project that we will refer to from hereon as the tenant project. It has its own network and the provisioning of the environment configures the network attachment to the end user’s network. Only the Cloud Storage bucket that hosts DAGs, plugins, logs are in the end user’s Google Cloud project.</p><h4><strong>4.2. Provisioning the Airflow environment</strong></h4><p>The following are available to provision Managed Airflow environments — <a href="https://docs.cloud.google.com/sdk/gcloud/reference/composer">gcloud</a>, <a href="https://docs.cloud.google.com/composer/docs/reference/rest">API</a>, <a href="https://docs.cloud.google.com/python/docs/reference/composer/latest">Python client libraries</a>, <a href="https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/composer_environment">Terraform</a>. The complementary <a href="https://github.com/GoogleCloudPlatform/lakehouse-solutions/blob/main/solutions/spark-serverless-features/lab-manuals/ts4-manual.md">hands-on lab</a> covers Terraform provisioning.</p><h4>4.3. APIs to be enabled</h4><p>The full list is available <a href="https://docs.cloud.google.com/composer/docs/composer-3/enable-composer-service#required-services">here</a></p><h4>4.4. Time taken to provision an environment</h4><p>~20 minutes.</p><h4>4.5. Type of infrastructure used under the hood</h4><p>The managed infrastructure is Kubernetes based and is abstracted out and inaccessible to the end user.</p><h4>4.6. Airflow software versioning</h4><p>This is abstracted into the construct of the Managed Airflow <a href="https://docs.cloud.google.com/composer/docs/composer-versions#images">image version</a>. Currently, Bring Your Own (BYO) image is not supported.</p><h4>4.7. Airflow CLI</h4><p>If you are partial to Airflow CLI commands, airflowctl and corresponding <a href="https://docs.cloud.google.com/composer/docs/composer-3/access-airflow-cli">gcloud</a> commands are available.</p><h4>4.8. Networking</h4><p>Managed Airflow supports both private IP and public IP infrastructure. When you create the Managed Airflow environment, you have to supply your subnet if you need it to integrate with your network in which case each Managed Airflow environment requires a maximum of 4 dedicated IP addresses, regardless of scale.</p><p>The <a href="https://docs.cloud.google.com/composer/docs/composer-3/create-environments#networking">documentation</a> clearly explains the options and considerations. For quick reference, Managed Airflow supports the below from a networking point of view:</p><ul><li><a href="https://docs.cloud.google.com/composer/docs/composer-2/configure-private-ip">Public IP and Private IP environments</a></li><li><a href="https://docs.cloud.google.com/composer/docs/composer-2/configure-private-service-connect">Private Service Connect environments</a></li><li><a href="https://docs.cloud.google.com/composer/docs/composer-2/configure-shared-vpc">Shared VPC environments</a></li><li><a href="https://docs.cloud.google.com/composer/docs/composer-2/configure-vpc-sc">VPC Service Controls</a></li><li><a href="https://docs.cloud.google.com/composer/docs/composer-2/configure-authorized-networks">Authorized networks</a></li><li><a href="https://docs.cloud.google.com/composer/docs/composer-2/configure-privately-used-public-ip">Privately used public IP ranges</a></li></ul><p>As mentioned previously, Managed Airflow supports hybrid and cross cloud workload orchestration so long as the networking is in place.</p><h4>4.9. Environment sizes and considerations</h4><p>Managed Airflow environments come in t-shirt sizes of small, medium, large and extra large, along with Google Cloud’s recommendations based on tests done — shown below and detailed <a href="https://docs.cloud.google.com/composer/docs/composer-3/scale-environments#presets">here</a>. The size can be modified post provisioning.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/877/1*vGM7QJ3mkTyYrfpnLY66Zg.png" /></figure><h4>4.10. Scaling</h4><p>Vertical scaling/scaling up is adding more power to an existing Airflow environment or increasing resources allocated to a specific Airflow service that appears resource starved. Horizontal scaling is adding more capacity with the same resource specifications such as adding more workers when there is heavy load. Managed Airflow service supports <strong>vertical scaling</strong> and <strong>horizontal scaling out and graceful horizontal scaling in</strong>.</p><p>Managed Airflow environments can be <a href="https://docs.cloud.google.com/composer/docs/composer-3/scale-environments#scale-vertically-horizontally">scaled</a> vertically by going up from a size point of view. Managed Airflow services (worker, scheduler, triggerer, DAG processor) can be scaled up by giving them more resources — vCPU, memory and storage.</p><p>Managed Airflow environments can be scaled horizontally by adjusting the minimum and maximum number of workers, and adjusting the number of schedulers, DAG processors, and triggerers.</p><p>These configurations can be modified based on baseline, idle, peak, off-peak orchestration workloads.</p><p>Recent versions of Airflow requires underlying services to be allocated more resources than prior versions — plan accordingly.</p><h4>4.12. Security</h4><p>Managed Airflow supports encryption at rest, uniform bucket level access, IAM permissions for service accounts and users, private IP environments, shielded VMs for compute, customer managed encryption keys, VPC service controls to provide perimeter protection and prevent exfiltration, webserver network ACLs, secret manager to store sensitive information and meets a variety of compliance standards, all covered <a href="https://docs.cloud.google.com/composer/docs/composer-3/composer-security-overview">here</a>.</p><p>Managed Airflow secures your environments using Identity and Access Management (IAM), giving you precise control over who interacts with your resources and what actions they can take. Instead of a one-size-fits-all security model, this flexible approach allows you to secure your environments through:</p><ul><li><strong>Targeted role assignments:</strong> Grant specific permissions directly to individual users or service accounts.</li><li><strong>User managed service accounts:</strong> Managed Airflow natively uses service accounts to manage resources and execute tasks, but you can opt for a user-managed service account (recommended) to strictly customize those underlying permissions.</li><li><strong>Granular UI access:</strong> You can configure exact permission levels for your team.</li><li><strong>Workforce identity federation:</strong> You can seamlessly grant environment access to external identities outside of your immediate Google Cloud organization.</li></ul><h4>4.13. Airflow environment variables and configuration management</h4><p>These can be configured at provisioning time and updated post-provisioning with glcoud commands.</p><pre>gcloud composer environments update ENVIRONMENT_NAME \<br>  --location LOCATION \<br>  --update-airflow-configs=KEY=VALUE,KEY=VALUE,...</pre><pre>gcloud composer environments update ENVIRONMENT_NAME \<br>  --location LOCATION \<br>  --update-env-variables=KEY=VALUE...</pre><h4>4.14. UI options</h4><p>Managed Service for Apache Airflow offers its own UI that has multiple tabs, rich with features, and it also supports the open source Airflow UI.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4_JuVs2sb-4g2QlncJUSNw.png" /><figcaption>Figure 4.12–1: UI in Managed Service for Apache Airflow</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*u0cYIHvrO3Em5vmzAKra8w.png" /><figcaption>Figure 4.12–2: Airflow UI</figcaption></figure><h4>4.15. Managing Python dependencies</h4><p>There are various options with considerations to install Python dependencies detailed in the <a href="https://docs.cloud.google.com/composer/docs/composer-3/install-python-dependencies#options">documentation</a> that cover private environments as well.</p><h4>4.16. Custom plugins</h4><p><a href="https://docs.cloud.google.com/composer/docs/composer-3/install-plugins">Custom plugins</a> are supported with some caveats. The documentation covers this thoroughly.</p><h4>4.17. Connections</h4><p>Airflow connections store credentials and other connection information, such as user IDs, connections strings, and passwords. The DAGs use connections to communicate and access resources in Google Cloud and other services from your DAGs. Learn <a href="https://docs.cloud.google.com/composer/docs/composer-3/manage-airflow-connections">more</a>.</p><h4>4.18. Email notifications</h4><p>This is supported and detailed in the <a href="https://docs.cloud.google.com/composer/docs/composer-3/configure-email">documentation</a>.</p><h4>4.19. Constraints</h4><p>Organization policies on Google Cloud allow fine grained resource control at an organization level. Setting up constraints is typical in large organizations. Learn <a href="https://docs.cloud.google.com/composer/docs/composer-3/create-custom-constraints">more</a>.</p><h4>4.20. Cost-center chargeback</h4><p>Cost center chargeback can be done via environment labels.</p><p>Environment labels are key-value pairs that you can assign to your environments. For example, if owner:sales-team is a custom label, then owner is the key, and sales-team is the value. Each environment can have multiple labels, but the label keys for a single environment must be unique. You can assign the same key and value to several environments.</p><p>Environment labels that you assign to your environments are visible in billing reports, so you can break down costs based on both keys and values from the labels.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Zxunhev0UDAyiwWLl8qQMQ.png" /><figcaption>Figure 4.20: Product level billing attribution</figcaption></figure><h4>4.21. [Observability] Logging</h4><p>There are three types of logs- environment logs, DAG logs and audit logs.</p><p><strong>4.21.1. Environment logs </strong><br>These are streamed to Cloud Logging<br>You can apply Cloud Logging filter to get to these-</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3K7TXWqbVJ43v0qKS02thQ.png" /><figcaption>Figure 4.21.1.1: Environment audit logs</figcaption></figure><p><strong>4.21.2. DAG logs</strong><br>These are written to the Airflow bucket in the user environment. You can access them in the service UI at a task level, retry level as shown below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_gSsVu7kv8iaAwBNRR1jhg.png" /><figcaption>Figure 4.21.1. 2a. DAG logs in Managed Airflow UI</figcaption></figure><p>They are also available in the Airflow UI-</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YLcZE-NQUaw9-Jnx344k1w.png" /><figcaption>Figure 4.21.1. 2b. DAG logs in Airflow UI</figcaption></figure><p><strong>4.21.3. Audit logs</strong></p><p>Google Cloud services generate audit logs that record administrative and access activities within your Google Cloud resources. These are streamed to Cloud Logging. To access these, after enabling audit logging, apply filter in Cloud Logging studio —</p><pre>protoPayload.serviceName=&#39;composer.googleapis.com&#39;</pre><h4>4.22. [Observability] Monitoring</h4><p>Each Managed Airflow environment has its own monitoring dashboard. Managed Airflow UI has many monitoring tiles preconfigured.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/396/1*fSgD17tlh7Y78RQxHp4ANg.png" /><figcaption>Figure 4.22.1: Monitoring tabs</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*J1SnuRAcNRF6Fp0orRDf9g.png" /><figcaption>Figure 4.22.2: Monitoring — overview</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3zPSgcdEShhbWj898F_9fA.png" /><figcaption>Figure 4.22.3: Monitoring — overview continued</figcaption></figure><p>There is monitoring at a granular level. Resource starvation at a process level can be tracked for example. There is tens of metrics that can be tracked — detailed in the <a href="https://docs.cloud.google.com/composer/docs/composer-1/use-monitoring-dashboard#metrics">documentation</a>. These metrics can be opened in <a href="https://docs.cloud.google.com/composer/docs/composer-1/monitor-environments">Cloud Monitoring</a> for further details.</p><p>The <a href="https://github.com/GoogleCloudPlatform/lakehouse-solutions/blob/main/solutions/spark-serverless-features/lab-manuals/ts4-manual.md#l526-review-the-monitoring-tab---overview">hands-on</a> lab provides a complete visual walkthrough of monitoring in Managed Airflow. Monitoring at an Airflow component level is critical to sizing, scaling and providing a robust and stable platform for data engineers and Managed Airflow provides state of the art monitoring.</p><h4>4.23. [Observability] Alerting</h4><p>Alerting is configurable from the Managed Airflow monitoring dashboard. Triggers/thresholds, and notifications including notification channels can be configured.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*P1TxPT4IATB4NjTuFK_fhg.png" /><figcaption>Figure 4.23: Alerting</figcaption></figure><h4>4.22. Optimizing cost and performance</h4><p>Cost optimization from an Airflow administration point of view is achievable through right-sizing environments for peak and off-peak times. Performance optimization is a vast topic with environment level tuning and DAG level design time considerations but at the very least, Airflow needs adequate resources and scale for running DAGs quickly.</p><h4>4.23. [Operational readiness] <strong>High availability</strong></h4><p><a href="https://docs.cloud.google.com/composer/docs/composer-3/set-up-highly-resilient-environments">High Availability</a> (HA) can be configured in Managed Airflow — this is essentially an Airflow environment that is multi-zonal and runs across at least two zones of a selected region. Managed Airflow <a href="https://docs.cloud.google.com/composer/docs/composer-3/set-up-highly-resilient-environments#about-components">automatically distributes</a> the components of your environment between zones.</p><p>During a zonal outage, <strong>Airflow tasks that are executing in the affected zone are still interrupted</strong> and marked as failed by Airflow. When Airflow recovers, it restarts the tasks in the available zone while preserving DAG run history.</p><p>HA environments require exactly two schedulers, at least two triggerers, at least two DAG processors, minimum of two workers and two web servers. HA can be configured in both private and public IP environments.</p><h4>4.24. [Operational readiness] Failover tests</h4><p>The Airflow infrastructure cannot be failed over in zonal failure simulations. Failover tests can be simulated for the Airflow database with gcloud commands. More in the <a href="https://docs.cloud.google.com/composer/docs/composer-3/perform-failover-tests">documentation</a>.</p><h4>4.25. [Operational readiness] Snapshots of the Airflow environment</h4><p>Snapshots are point-in-time *full* backups (state) of your Airflow environment. Snapshot capture of your Airflow environment can be scheduled and persisted to the Airflow Cloud Storage bucket with appropriate retention policies. Environments can be restored from snapshots. This is particularly useful for disaster recovery. The <a href="https://docs.cloud.google.com/composer/docs/composer-3/configure-scheduled-snapshots">documentation</a> details the steps.</p><p>You can <a href="https://docs.cloud.google.com/composer/docs/composer-3/save-load-snapshots">restore</a> your Airflow environment to an earlier state via a snapshot — like a rollback. You can also do side-by-side upgrades and copy environments — create a snapshot of an live environment, create a new environment that uses a later version of Managed Airflow, then apply the snapshot to this new environment. This procedure is similar to <a href="https://docs.cloud.google.com/composer/docs/composer-1/migrate-composer-2-snapshots-af-2">migrating</a>.</p><h4>4.26. [Operational readiness] Disaster recovery</h4><p>Disaster recovery (DR) configurations such as Active-Active, Active-Standby (warm DR), or Active-On-demand DR (cold DR) are based on Recovery Point Objectives and Recovery Time Objectives of organizations.</p><p>Snapshots, with multi-region buckets are essentially the disaster recovery solution for Managed Airflow. More in the <a href="https://docs.cloud.google.com/composer/docs/composer-3/disaster-recovery-with-snapshots">documentation</a>.</p><h4>4.27. Maintenance windows</h4><p><a href="https://docs.cloud.google.com/composer/docs/composer-2/specify-maintenance-windows">Maintenance windows</a> MUST be configured (total of 12 hours each week). This is because the infrastructure upgrades happen automatically and cannot be disabled. The maintenance operation has minimal (or no) impact on the environment — if tasks last for less than 24h they will not be interrupted, the impact is only for long running tasks (&gt;24h)</p><h4>4.28. Upgrades</h4><p>There are two types of upgrades — infrastructure upgrades and Airflow software upgrades. Infrastructure upgrades happen automatically during maintenance windows. Airflow upgrades are user initiated and executed during planned maintenance windows (that don’t conflict with regular maintenance windows) and need to be done carefully. Barring any conflicts in Python dependencies that have to be resolved by the user, Managed Airflow service does in-place upgrades without changes to URLs and buckets. More in the <a href="https://docs.cloud.google.com/composer/docs/composer-3/upgrade-environments">documentation</a>.</p><h4>4.29. Quotas and Limits</h4><p><strong>4.29.1. Compute &amp; Workload Quotas</strong></p><p>4.29.1.1. CPU consumption <br>Environments are subject to per-environment CPU quota. Managed Airflow (Gen 3) provides the following metrics that report the utilization of quotas and corresponding quota limits for services used by your environment in the tenant project: <br>a) composer.googleapis.com/environment/workloads_cpu_quota <br>— CPU quota limit for Managed Airflow workloads<br>b) composer.googleapis.com/environment/workloads_cpu_quota_usage — CPU quota usage for Managed Airflow workloads</p><p>4.29.1.2. Concurrent workloads<strong><br> </strong>There is a default limit of 50 concurrent Kubernetes workloads per environment.</p><p>4.29.1.3. Limit Increases<strong><br></strong>Both the CPU quota and concurrent workload limits can be increased by raising a support ticket.</p><p><strong>4.29.2. Networking &amp; IP allocation<br></strong>You only need to allocate 4 IP addresses per Airflow environment in your customer project to establish connectivity with your custom VPC. No further workload IP planning is required on your end. No IP addresses are required if VPC connectivity is not required.</p><p>That was a summary from an administrator point of view, there is more in the Managed Airflow documentation. Let’s switch gears and look from the data engineer lens.</p><h3>5. Practitioner lens — Managed Airflow Service — Gen 3 for deploying and monitoring pipelines</h3><p>Basic questions a data engineer tasked with authoring pipelines might have are-</p><h4>5.1. How can I deploy/publish DAGs?</h4><p>The DAGs just need to be placed in the DAG directory of the Managed Airflow Cloud Storage bucket. Multiple ways to do this and are covered in the <a href="https://docs.cloud.google.com/composer/docs/composer-1/manage-dags">documentation</a>.</p><h4>5.2. How do I manage DAGs?</h4><p>The documentation covers in-depth — <a href="https://docs.cloud.google.com/composer/docs/composer-3/manage-dags">adding and updating DAGs</a>, <a href="https://docs.cloud.google.com/composer/docs/composer-3/view-dags">viewing DAGs, DAG runs and DAG tasks</a>, <a href="https://docs.cloud.google.com/composer/docs/composer-3/schedule-and-trigger-dags">scheduling and triggering DAGs</a>.</p><p>All of this is covered in the <a href="https://github.com/GoogleCloudPlatform/lakehouse-solutions/blob/main/solutions/spark-serverless-features/lab-manuals/ts4-manual.md">hands-on lab</a>.</p><h4>5.3. Are there first class operators for BigQuery and Managed Spark?</h4><p>There are a plethora of <a href="https://airflow.apache.org/docs/apache-airflow-providers-google/stable/operators/cloud/index.html">first class operators</a> for Google Cloud services and more.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZevLPWdXyxS6xOY8hoRWLg.png" /><figcaption>Figure 5.3: First class GCP operators</figcaption></figure><h4><strong>5.4. How do I configure the tasks to run as a service account?</strong></h4><p>The hands-on lab has an example of a Managed Spark serverless batch running as a service account in a DAG.</p><h4>5.5. How can I troubleshoot pipeline/task failures?</h4><p>The Managed Airflow Service UI, the Airflow UI, and Cloud Logging are all options. There is AI troubleshooting assistance available as well.</p><h4>5.6. What about Python dependencies?</h4><p>Covered in section 4.15.</p><h4>5.7. Does the Data Agent Kit extension support orchestration</h4><p><strong>If you are new to the </strong><a href="https://docs.cloud.google.com/data-cloud-extension/vs-code/overview">Google Cloud Data Agent Kit (DAK) extension</a> — it is for data engineers, data scientists, and data app developers. It lets you work with your Google Cloud resources to manage your data assets, run queries, and deploy data pipelines directly from your preferred IDE.</p><p>Yes, DAK has an Orchestration Pipelines feature. Orchestration Pipelines allow users to define their Airflow DAGs in simplified YAML format. We have also released Agentic authoring and troubleshooting skills that are included in DAK. Orchestration Pipelines once deployed run on Managed Airflow. Further in VS Code, there is drag-drop/code-free UI based authoring. More in the<a href="https://docs.cloud.google.com/data-cloud-extension/vs-code/build-pipelines"> documentation</a>.</p><h4>5.8. What about github integration?</h4><p>It is supported and is documented <a href="https://docs.cloud.google.com/composer/docs/composer-3/dag-cicd-github">here</a>.</p><h4>5.9. How do I configure event driven orchestration on Google Cloud?</h4><p>Apache Airflow has the concept of sensors for event driven orchestration. For any reason if you need to use <a href="https://docs.cloud.google.com/composer/docs/composer-1/triggering-with-gcf">Google Cloud Run Functions</a>, it is supported.</p><h4>5.10. Is there support for human in the loop pipelines?</h4><p>This is an Apache Airflow feature and is <a href="https://cloud.google.com/blog/products/data-analytics/cloud-composer-supports-apache-airflow-31?e=48754805">supported</a>.</p><h4>5.11. What about SLA management?</h4><p>This is also an Apache Airflow feature and is <a href="https://cloud.google.com/blog/products/data-analytics/cloud-composer-supports-apache-airflow-31?e=48754805">supported</a>.</p><h4>5.12. And internationalization?</h4><p>This is also an Apache Airflow feature and is <a href="https://cloud.google.com/blog/products/data-analytics/cloud-composer-supports-apache-airflow-31?e=48754805">supported</a>.</p><h4>5.13. What about agents?</h4><p>Currently there is DAG authoring by agent with Data Agent Kit in VS Code, there is troubleshooting agent assistance for DAG failures. There are several other agents on the roadmap for Airflow administrators and data engineers.</p><h4><strong>5.14. What Airflow 3 features are supported in Managed Airflow Gen 3?</strong></h4><p>This can be found in the <a href="https://docs.cloud.google.com/composer/docs/composer-versioning-overview#airflow-3-features">documentation</a>.</p><h4><strong>5.15. Do you have any guidance for migrating Airflow 2 DAGs to Airflow 3?</strong></h4><p>DAGs compatible with Airflow 2 may not work directly in Airflow 3. We have a <a href="https://docs.cloud.google.com/composer/docs/composer-3/migrate-airflow-3">migration guide</a> to simplify the upgrade.</p><p>That was just a few basics. Learn more from the <a href="https://docs.cloud.google.com/composer/docs/composer-3/composer-overview">Managed Airflow documentation</a>.</p><h3>6. Try it yourself</h3><p>I have a complementary minimum viable <a href="https://github.com/GoogleCloudPlatform/lakehouse-solutions/blob/main/solutions/spark-serverless-features/lab-manuals/ts4-manual.md">hands-on lab</a> for you to kick the tires. It is basically a Spark data engineering pipeline for standing up medallion architecture. I cover Knowledge Catalog entries and lineage of Apache Iceberg tables in the Lakehouse runtime catalog.</p><p>If you are strapped for time or don’t need to try out and just need to understand, it is rich in visuals — you can read it like a book and still get a clear picture on how to implement Airflow pipelines on Managed Service for Apache Airflow.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/813/1*ThhN3IkqhQP2WDFk_wBHdQ.png" /><figcaption>Figure 6.1: Lab solution architecture</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/842/1*LcImC_jikEELIfioAS5dCg.png" /><figcaption>Figure 6.2: Lab data</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZJNCfPyqwMPeeH5mffZ_sg.png" /><figcaption>Figure 6.3: The DAG in the lab</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/855/1*Tnvkg9inmsXAfMIwo5Yhyw.png" /><figcaption>Figure 6.4: Table of contents of the lab</figcaption></figure><h3>Credits</h3><p>Special thanks to the Managed Airflow Google Cloud team for their comprehensive review for accuracy, freshness and completeness:<br>Michal Modras — Engineering leader<br>Arun Joy Vattoly — Engineering<br>Piotr Wieczorek — Product Manager</p><h3>What’s next</h3><p>The next blog post will be about Apache Spark performance on Managed Service for Apache Spark serverless. It will be multi-part and will cover autotuning, Iceberg optimizations, storage and Bigquery connector optimizations, Lightning Engine acceleration and GPU acceleration.</p><p>Lakehouse Demystified blog series-<br><a href="https://medium.com/google-cloud/lakehouse-demystified-part-1-just-enough-about-the-lakehouse-stack-on-google-cloud-02529daa52af">Part 1: Introduction to lakehouse on Google Cloud</a><br><a href="https://medium.com/p/6ac3e5051794">Part 2: Just enough about Managed service for Apache Spark — serverless batches</a><br><a href="https://medium.com/@c_a_c_t_u_s/9a57a99a678a">Part 3: Just enough about Managed service for Apache Spark — serverless interactive sessions for Spark notebooks</a><br><a href="https://medium.com/google-cloud/lakehouse-demystified-part-4-just-enough-about-lakehouse-runtime-catalog-ea489cb1d19d">Part 4: Just enough about Lakehouse runtime catalog for Apache Iceberg and Hive</a> <br>Part 5: Just enough about Managed service for Apache Airflow for lakehouse pipeline orchestration (this blog)<br>Part 6: Just enough about performance optimization with Managed service for Apache Spark<br>Part 7: Just enough about machine learning, generative AI and agents on the lakehouse on Google Cloud<br>Part 8: Just enough about Apache Iceberg table interoperability between Apache Spark and BigQuery<br>Part 9: Just enough about Managed Service for Apache Spark clusters</p><p>And more to come..</p><p>There is a demand for lakehouse governance featuring Knowledge Catalog— this might be the next blog post. Stay tuned.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d4f11517458b" width="1" height="1" alt=""><hr><p><a href="https://medium.com/google-cloud/lakehouse-demystified-part-5-just-enough-about-managed-service-for-apache-airflow-d4f11517458b">Lakehouse Demystified — Part 5: Just enough about Managed Service for Apache Airflow</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[Lakehouse Demystified — Part 4: Just enough about Lakehouse runtime catalog]]></title>
            <link>https://medium.com/google-cloud/lakehouse-demystified-part-4-just-enough-about-lakehouse-runtime-catalog-ea489cb1d19d?source=rss-c3fd47c9a471------2</link>
            <guid isPermaLink="false">https://medium.com/p/ea489cb1d19d</guid>
            <category><![CDATA[data-lakehouse]]></category>
            <category><![CDATA[apache-iceberg]]></category>
            <category><![CDATA[apache-spark]]></category>
            <category><![CDATA[data-catalog]]></category>
            <category><![CDATA[google-cloud-platform]]></category>
            <dc:creator><![CDATA[Anagha Khanolkar [Google]]]></dc:creator>
            <pubDate>Fri, 29 May 2026 04:35:08 GMT</pubDate>
            <atom:updated>2026-06-18T15:36:34.349Z</atom:updated>
            <content:encoded><![CDATA[<p>Welcome to Part 4 of the <strong>Lakehouse Demystified</strong> blog series — a practical guide to lakehouse on Google Cloud. My goal is to share an <strong>opinionated architectural perspective</strong> rooted in practical experience, providing depth and implementation-ready clarity through reference architectures, best practices, and minimum viable code. This series is created for <strong>lakehouse practitioners</strong> and <strong>future-state builders</strong> — the architects and engineers striving to master the “art of the possible” on Google Cloud while cutting through the noise of information overload.</p><p>The focus of my <a href="https://medium.com/@c_a_c_t_u_s/6ac3e5051794"><strong>previous blog post</strong></a> was lakehouse engines and covered Managed Service for Apache Spark — serverless interactive sessions<strong> </strong>that power Spark notebooks. This blog post features the lakehouse metastore component — a managed service called ‘<strong>Lakehouse runtime catalog’ </strong>with two catalog flavors — Iceberg and Hive. It includes complementary minimum viable code samples.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UNHOqHBIjYiWm-H9vjFe5A.png" /><figcaption>Fig 0: Lakehouse stack on Google Cloud</figcaption></figure><p>When I sat down to write this, I had one specific reader in mind: someone who already knows the lakehouse paradigm and Apache Spark inside and out, but needs to get up and running on Google Cloud as fast as possible. I’ve spent too many hours scouring convoluted, cross-product documentation myself, and I completely empathize. Further, even if you have managed to find the public documentation and understand the content, it’s another matter entirely to stitch all the pieces together and stand up a functional prototype quickly. That’s why this post is dense by design. Not only will this single page give you the comprehensive context you need, but I have also provided a minimum viable functional sample as a hands-on lab to simplify your learning journey. So grab a coffee — this is your complete crash course.</p><h3>1. [Recap] Lakehouse reference architecture</h3><p>In <a href="https://medium.com/p/6ac3e5051794">blog 2</a> of the series, I covered lakehouse reference architecture on Google Cloud. A core component is the lakehouse metastore/catalog.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hvfbUmH2VGc2zXhVtTshGA.png" /><figcaption>Fig 1.0: Lakehouse reference architecture</figcaption></figure><p>Let’s explore what the lakehouse catalog offering on Google Cloud is — starting with what exactly the catalog construct is.</p><h3>2. Levelset: What is a lakehouse catalog?</h3><p>A <strong>lakehouse catalog</strong> is the centralized metadata layer and single source of truth for data and AI assets. It enables seamless data discovery, governance, and sharing across platforms without the need to copy or move underlying files.</p><p><strong>Key functions and trends:</strong></p><ul><li><strong>Centralized metadata:</strong> Keeps storage and compute in sync by maintaining a single record of schemas, locations, and file states.</li><li><strong>Unified governance:</strong> Enforces row- and column-level access controls and tracks data lineage for strict security and compliance.</li><li><strong>Engine interoperability:</strong> Allows diverse compute engines (like Spark or Trino) to query the same data concurrently using open table formats.</li><li><strong>Data federation:</strong> Enables direct querying of external databases (such as MySQL or Snowflake) without requiring costly data migrations.</li></ul><p>Popular catalogs are — Hive metastore (HMS), Apache Polaris, Google Cloud’s Lakehouse runtime catalog (formerly BigLake metastore), AWS’s Glue, Databricks’ Unity catalog, Nessie and Gravitino to name a few.</p><p>In terms of how you use the the catalog in — say Apache Spark code — its as simple as:<br>1. Create a catalog ahead of time — one time activity, covered in subsequent sections<br>2. Create a database/namespace within the catalog — also one time activity, covered in subsequent sections<br>3. Read data, transform to ensure it has structure and persist the data by registering the schema into the catalog database as a table. Below is just one of many ways to create and persist to Iceberg tables.</p><pre>customer_df.write.format(&quot;iceberg&quot;).mode(&quot;overwrite&quot;).saveAsTable(&quot;froyo_ns.s_customer_master&quot;)</pre><p>4. To work with the data in the table, you just have to read off of the table as shown below</p><pre>spark.sql(&quot;select * from froyo_ns.s_customer_master limit 2&quot;).show(truncate=False)</pre><h3>3. About the Lakehouse runtime catalog service</h3><p>(straight off of the documentation)</p><p>Google Cloud’s <strong>Lakehouse runtime catalog</strong> is a fully managed, serverless product that acts as the definitive source of truth for your lakehouse data architecture.</p><h4>Core Capabilities</h4><ul><li><strong>Seamless interoperability:</strong> Enables disparate compute engines — like BigQuery, Apache Spark, and Apache Flink — to share metadata and tables without the need to duplicate underlying files.</li><li><strong>Enhanced security:</strong> Eliminates the need for direct lakehouse storage bucket access by utilizing storage access delegation (credential vending) to securely manage permissions.</li><li><strong>Integrated governance:</strong> Connects seamlessly with Knowledge Catalog to provide centralized data lineage, quality tracking, and comprehensive governance.</li></ul><h4>Catalog flavors</h4><p>There are two catalog flavors at the time of authoring this blog — for Iceberg (GA) and Hive (private preview).</p><h4><strong>Resource hierarchy</strong></h4><p>The resource hierarchy is as follows:</p><ol><li><strong>Lakehouse runtime catalog</strong>: The top-level <strong>regional service resource</strong> in Google Cloud that hosts your metadata. The region is dependent on the Google Cloud Storage bucket that serves as lakehouse storage.</li><li><strong>Catalog</strong>: An instance of a metastore resource in the catalog (e.g. froyo_catalog). A logical container within the runtime catalog service. In the Project/Catalog/Namespace/Table (P.C.N.T) naming structure, this represents the specific catalog instance you are querying.</li><li><strong>Namespace</strong>: A logical grouping of tables within a catalog (e.g. froyo_ns). For users familiar with BigQuery, a namespace is functionally similar to a dataset.</li><li><strong>Table</strong>: The specific entity pointing to data in Cloud Storage (e.g. s_customer_master). The table metadata contains the schema, partitioning information, and a pointer to the current table state through an Apache Iceberg metadata.json file.</li></ol><p>Subsequent sections cover various features and considerations.</p><h3>4. Practitioner lens — basics of using the catalog for Apache Iceberg</h3><p>Basic questions you might have are-</p><p>1. What Google APIs do I need to enable?<br>2. What are modes to access the catalog?<br>3. Which identity to assume to work with the catalog?<br>4. How do I authenticate to the catalog?<br>5. What about authorization?<br>6. How do I create this catalog? <br>7. What are the spark session configurations for the catalog?<br>8. How do I get to the catalog UI?<br>9. Can I query a table I created from Apache Spark in BigQuery with BigQuery SQL?<br>10. What is the mapping of a catalog to a lakehouse storage bucket?<br>11. Is the catalog global or regional?<br>12. Are Apache Iceberg tables interoperable for read and write between Apache Spark and BigQuery?<br>13. What lakehouse engines are supported with Lakehouse runtime catalog?<br>14. Is there Terraform IaaC support?</p><p>If you are Google Cloud savvy, you might also wonder -<br>15. Do entries get created automatically in Knowledge Catalog when you create an Iceberg table? What about table alters — do they get synced?<br>16. Is data lineage captured? What does it look like?</p><p>Let’s get these out of the way.</p><h4>4.1. Google APIs</h4><p>The Lakehouse API needs to be enabled — biglake.googleapis.com . The following is thegcloud command to enable the API:<br>gcloud services enable biglake.googleapis.com</p><h4>4.2. Access mode</h4><p>The Lakehouse runtime catalog can be accessed via <a href="https://docs.cloud.google.com/lakehouse/docs/authentication#client-libraries">Client libraries</a>, <a href="https://docs.cloud.google.com/lakehouse/docs/authentication#gcloud">Google Cloud CLI</a> and <a href="https://docs.cloud.google.com/lakehouse/docs/authentication#rest">REST</a></p><h4>4.3. Identity to assume to work with the catalog</h4><p>Lakehouse runtime catalog supports End User Credentials, and Service Accounts.</p><p>For development purposes, you can use any of the below:</p><ul><li><a href="https://docs.cloud.google.com/lakehouse/docs/authentication#client-libs">User credentials for client libraries or third-party tools</a></li><li><a href="https://docs.cloud.google.com/lakehouse/docs/authentication#rest-requests">User credentials for REST requests from the command line</a></li><li><a href="https://docs.cloud.google.com/lakehouse/docs/authentication#sa-impersonation">Service account impersonation</a></li></ul><p>In higher environments:<br>For batch pipelines, use user managed service accounts with requisite permissions for the Lakehouse runtime catalog, and for interactive environments, end user credentials.</p><h4>4.4. Authenticating to the catalog</h4><p>There are multiple options as shown below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/838/1*SO79YSooD8PMeizTO8pxAQ.png" /><figcaption>Fig 4.4: Authentication options</figcaption></figure><p>Authentication options and commands are covered [here](<a href="https://docs.cloud.google.com/lakehouse/docs/authentication#access-control">https://docs.cloud.google.com/lakehouse/docs/authentication#access-control</a>).</p><p>With credential vending mode, you don’t have to give access to the storage bucket to your users. You give it to the catalog service account, your users get access only to Iceberg tables. Credential vending is covered in the complementary hands-on lab, as is end user credentials based authentication.</p><h4>4.5. What about authorization?</h4><p><strong>4.5.1. IAM roles</strong><br>There are three out of the box IAM roles.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/696/1*Fy5ZT_H2hQkXITPSmSbY1w.png" /><figcaption>Fig 4.5: IAM roles</figcaption></figure><p><strong>4.5.2. Access Control Lists</strong></p><p>IAM roles can be applied with ACLs at project, catalog, namespace, table levels.</p><p>Here is an example:<br>We want to give a user called Biscuit read access to the Lakehouse Iceberg table p_rdm_revenue_by_month in the froyo_ns Iceberg namespace within the Lakehouse runtime catalog for Iceberg - froyo_iceberg_lakehouse_catalog_30466744069 . Here is how you go about it…</p><ol><li>Create a policy file (lrci-policy-json) with the user or group (replace &#39;user:&#39; with &#39;group:&#39; for group access)</li></ol><pre>{<br>  &quot;bindings&quot;: [<br>    {<br>      &quot;role&quot;: &quot;roles/biglake.viewer&quot;,<br>      &quot;members&quot;: [<br>        &quot;user:biscuit@akhanolkar.altostrat.com&quot;,<br>      ]<br>    },<br>  ],<br>  &quot;etag&quot;: &quot;ACAB&quot;,<br>  &quot;version&quot;: 1<br>}</pre><p>2. Apply the policy</p><pre>gcloud alpha biglake iceberg tables set-iam-policy p_rdm_revenue_by_month lrci-policy.json --catalog=&quot;froyo_iceberg_lakehouse_catalog_30466744069&quot; --namespace=&quot;froyo_ns&quot;</pre><p>3. With this, Biscuit will only be able to access this one table and query it and does not have access to any other catalogs, namespaces or tables.</p><h4>4.6. Creating an Iceberg catalog</h4><p>To create a catalog with end user credentials (default) for authentication:</p><pre>gcloud biglake iceberg catalogs create \<br>    CATALOG_NAME \<br>    --project YOUR_PROJECT_ID \<br>    --catalog-type &#39;gcs-bucket&#39; \<br>    --credential-mode end-user </pre><p>To create a catalog with credential vending for authentication:</p><pre>gcloud biglake iceberg catalogs create \<br>    CATALOG_NAME \<br>    --project YOUR_PROJECT_ID \<br>    --catalog-type &#39;gcs-bucket&#39; \<br>    --credential-mode vended-credentials </pre><p>The above is covered in the lab.</p><h4>4.7. Spark session configurations to access the catalog</h4><p>The configurations vary based on authentication mode.</p><p><strong>4.7.1. End User Credentials for authentication</strong></p><p>The below is a sample for Managed Spark serverless interactive sessions.</p><pre>from google.cloud.dataproc_spark_connect import DataprocSparkSession<br>from google.cloud.dataproc_v1 import Session<br>from pyspark.sql import functions as F<br><br># Create the Dataproc Serverless session.<br>s8s_spark_session = Session()<br><br># Serverless runtime at authoring was 3.0 with Iceberg 1.10<br>s8s_spark_session.runtime_config.properties[f&quot;spark.sql.defaultCatalog&quot;] = ICEBERG_CATALOG_NAME<br>s8s_spark_session.runtime_config.properties[f&quot;spark.sql.catalog.{ICEBERG_CATALOG_NAME}&quot;] = &quot;org.apache.iceberg.spark.SparkCatalog&quot;<br>s8s_spark_session.runtime_config.properties[f&quot;spark.sql.catalog.{ICEBERG_CATALOG_NAME}.type&quot;] = &quot;rest&quot;<br>s8s_spark_session.runtime_config.properties[f&quot;spark.sql.catalog.{ICEBERG_CATALOG_NAME}.uri&quot;] = f&quot;https://biglake.googleapis.com/iceberg/{REST_API_VERSION}/restcatalog&quot;<br>s8s_spark_session.runtime_config.properties[f&quot;spark.sql.catalog.{ICEBERG_CATALOG_NAME}.warehouse&quot;] = f&quot;gs://{ICEBERG_LAKEHOUSE_BUCKET_NAME}&quot;<br>s8s_spark_session.runtime_config.properties[f&quot;spark.sql.catalog.{ICEBERG_CATALOG_NAME}.io-impl&quot;] = &quot;org.apache.iceberg.gcp.gcs.GCSFileIO&quot;<br>s8s_spark_session.runtime_config.properties[f&quot;spark.sql.catalog.{ICEBERG_CATALOG_NAME}.header.x-goog-user-project&quot;] = PROJECT_ID<br>s8s_spark_session.runtime_config.properties[f&quot;spark.sql.catalog.{ICEBERG_CATALOG_NAME}.rest.auth.type&quot;] = &quot;org.apache.iceberg.gcp.auth.GoogleAuthManager&quot;<br>s8s_spark_session.runtime_config.properties[f&quot;spark.sql.extensions&quot;] = &quot;org.apache.iceberg.spark.extensions.IcebergSparkSessionExtensions&quot;<br>s8s_spark_session.runtime_config.properties[f&quot;spark.sql.catalog.{ICEBERG_CATALOG_NAME}.rest-metrics-reporting-enabled&quot;] = &quot;false&quot;<br><br>spark = (DataprocSparkSession.builder<br>    .appName(APP_NAME)<br>    .dataprocSessionConfig(s8s_spark_session)<br>    .getOrCreate())</pre><p>The following is an example of configurations for Managed Spark serverless batches.</p><pre>gcloud dataproc batches submit pyspark gs://prod-code-bucket/scripts/curate_sales_data.py \<br>    --batch=&quot;curate-sales-batch-$(date +%Y%m%d-%H%M%S)&quot; \<br>    --project=&quot;$PROJECT_ID&quot; \<br>    --region=&quot;$LOCATION&quot; \<br>    --version=&quot;3.0&quot; \<br>    --subnet=&quot;projects/$PROJECT_ID/regions/$LOCATION/subnetworks/froyo-lab-snet&quot; \<br>    --service-account=&quot;froyo-lab-sa@$PROJECT_ID.iam.gserviceaccount.com&quot; \<br>    --properties=&quot;spark.sql.catalog.lakehouse=org.apache.iceberg.spark.SparkCatalog,spark.sql.catalog.lakehouse.type=rest,spark.sql.catalog.lakehouse.uri=https://biglake.googleapis.com/iceberg/v1/restcatalog,spark.sql.catalog.lakehouse.warehouse=gs://froyo-lakehouse-bucket/iceberg_data,spark.sql.catalog.lakehouse.io-impl=org.apache.iceberg.gcp.gcs.GCSFileIO,spark.sql.catalog.lakehouse.rest.auth.type=org.apache.iceberg.gcp.auth.GoogleAuthManager,spark.sql.extensions=org.apache.iceberg.spark.extensions.IcebergSparkSessionExtensions&quot; \<br>    -- gs://froyo-lakehouse-bucket/bronze/b_sales_raw.parquet gs://froyo-lakehouse-bucket/silver/s_sales_curated</pre><p><strong>4.7.2. Credential vending for authentication</strong></p><p>The below is a sample for Managed Spark serverless interactive sessions.</p><pre>from google.cloud.dataproc_spark_connect import DataprocSparkSession<br>from google.cloud.dataproc_v1 import Session<br>from pyspark.sql import functions as F<br><br># Create the Dataproc Serverless session.<br>s8s_spark_session = Session()<br><br># Serverless runtime at authoring was 3.0 with Iceberg 1.10<br>s8s_spark_session.runtime_config.properties[&quot;spark.sql.defaultCatalog&quot;] = ICEBERG_CATALOG_NAME<br>s8s_spark_session.runtime_config.properties[f&quot;spark.sql.catalog.{ICEBERG_CATALOG_NAME}&quot;] = &quot;org.apache.iceberg.spark.SparkCatalog&quot;<br>s8s_spark_session.runtime_config.properties[f&quot;spark.sql.catalog.{ICEBERG_CATALOG_NAME}.type&quot;] = &quot;rest&quot;<br>s8s_spark_session.runtime_config.properties[f&quot;spark.sql.catalog.{ICEBERG_CATALOG_NAME}.uri&quot;] = f&quot;https://biglake.googleapis.com/iceberg/{REST_API_VERSION}/restcatalog&quot;<br>s8s_spark_session.runtime_config.properties[f&quot;spark.sql.catalog.{ICEBERG_CATALOG_NAME}.warehouse&quot;] = f&quot;gs://{ICEBERG_LAKEHOUSE_BUCKET_NAME}&quot;<br>s8s_spark_session.runtime_config.properties[f&quot;spark.sql.catalog.{ICEBERG_CATALOG_NAME}.io-impl&quot;] = &quot;org.apache.iceberg.gcp.gcs.GCSFileIO&quot;<br>s8s_spark_session.runtime_config.properties[f&quot;spark.sql.catalog.{ICEBERG_CATALOG_NAME}.header.x-goog-user-project&quot;] = PROJECT_ID<br>s8s_spark_session.runtime_config.properties[f&quot;spark.sql.catalog.{ICEBERG_CATALOG_NAME}.rest.auth.type&quot;] = &quot;org.apache.iceberg.gcp.auth.GoogleAuthManager&quot;<br>s8s_spark_session.runtime_config.properties[&quot;spark.sql.extensions&quot;] = &quot;org.apache.iceberg.spark.extensions.IcebergSparkSessionExtensions&quot;<br>s8s_spark_session.runtime_config.properties[f&quot;spark.sql.catalog.{ICEBERG_CATALOG_NAME}.rest-metrics-reporting-enabled&quot;] = &quot;false&quot;<br>s8s_spark_session.runtime_config.properties[f&quot;spark.sql.catalog.{ICEBERG_CATALOG_NAME}.header.X-Iceberg-Access-Delegation&quot;] = &quot;vended-credentials&quot;<br>s8s_spark_session.runtime_config.properties[f&quot;spark.sql.catalog.{ICEBERG_CATALOG_NAME}.gcs.oauth2.refresh-credentials-endpoint&quot;] = &quot;https://oauth2.googleapis.com/token&quot;<br><br><br>spark = (DataprocSparkSession.builder<br>    .appName(APP_NAME)<br>    .dataprocSessionConfig(s8s_spark_session)<br>    .getOrCreate())</pre><p><strong>4.8. Lakehouse runtime catalog UI</strong></p><p>Lakehouse runtime catalog has a UI. Search for ‘Lakehouse’ in the Cloud Console, and you should see the UI as shown below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1013/1*q9jIt1-dY-bdeIXV1uEIKA.png" /><figcaption>Fig 4.8.1: New UI</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*S9wy6WsRxMuNBjdEuyw03w.png" /><figcaption>Fig 4.8.2: Iceberg catalog listing</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BWuzgI5h6CkOiMOt55fzIw.png" /><figcaption>Fig 4.8.3: Other menu options</figcaption></figure><p><strong>4.9</strong>. <strong>Querying an Iceberg table authored by Spark, and registered in Lakehouse runtime catalog in BigQuery with BigQuery SQL</strong></p><p>This is possible with the P.C.N.T syntax for the fully qualified table name in the BigQuery SQL query. P stands for GCP project ID, C for catalog ID, N for namespace, T for table name.</p><p>Here is the BigQuery UI with my Iceberg table listing. Note that this table was created via Spark.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9L_EBRsca-1ZRbKc6q7-5Q.png" /><figcaption>Fig 4.9.1: Iceberg table listing in BigQuery UI</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LQK5X-ZTjXay46foLMtYDg.png" /><figcaption>Fig 4.9.2: PCT query sample in BigQuery UI</figcaption></figure><p>Here is the query:</p><pre>SELECT * FROM <br>`lakehouse-solutions-build.froyo_iceberg_lakehouse_catalog_30466744069.froyo_ns.s_customer_master` <br>LIMIT 2</pre><p><strong>4.10. Mapping of a catalog to a lakehouse storage bucket</strong></p><p>It is currently 1:1 — a catalog maps to exactly one lakehouse storage bucket. This is a limitation that will be removed in the near future.</p><p><strong>4.11. Catalog location affiliation</strong></p><p>The catalog inherits the region from the lakehouse bucket it maps to.</p><p><strong>4.12. BigQuery and Apache Spark interoperability for Apache Iceberg tables</strong></p><p>Covered in section 15.</p><p><strong>4.13. Lakehouse engines supported</strong></p><p>The lakehouse engines supported are Apache Spark, Apache Flink and Trino. Bigquery interoperability support is shipping soon.</p><p><strong>4.14. Terraform support</strong></p><p>Terraform support is available and more details are available <a href="http://Lakehouse engines does it support">here</a>.</p><p><strong>4.15. Automated Knowledge Catalog entries</strong></p><p>If you are new to Google Cloud, <a href="https://docs.cloud.google.com/dataplex/docs/introduction">Knowledge Catalog</a> is a Gemini-powered data catalog that provides universal business context and governance for your entire data estate.</p><p>Entries get created automatically in Knowledge Catalog when a table is registered in the Lakehouse runtime catalog. There is periodic synchronization for alters and dropping of tables.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*koleY_IZ9phzkQra-HZAPQ.png" /><figcaption>Fig 4.15.1: Search for Lakehouse runtime catalog in Knowledge Catalog</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*T39IEA4jCd75a9jSdA3cHQ.png" /><figcaption>Fig 4.15.2: Iceberg Lakehouse runtime catalog entry in Knowledge Catalog</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/720/1*16Wq_v1qnRoWW6QwHsgtIA.png" /><figcaption>Fig 4.15.3: Navigating to the namespaces in the catalog via ‘Entry List’ menu item</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/738/1*EiTqFSGBhlK-V_nkU9az0A.png" /><figcaption>Fig 4.15.4: Namespaces in the catalog</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/995/1*v0pMW7dazJWBqBmoEtsBeA.png" /><figcaption>Fig 4.15.5: Navigating to tables in a namespace in the catalog</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Rw_MmYz9lVpEDkBElK8zig.png" /><figcaption>Fig 4.15.5: Tables in a namespace in the catalog</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*95eShm5PSeMEKTzWZVTbDg.png" /><figcaption>Fig 4.15.6: Table entry in the catalog</figcaption></figure><p>All of this is covered in the complementary <a href="https://github.com/GoogleCloudPlatform/lakehouse-solutions/blob/main/solutions/spark-serverless-features/lab-manuals/ts3-manual.md">hands-on lab</a>.</p><p><strong>4.16. Automated data lineage capture of Iceberg tables in the Lakehouse runtime catalog</strong></p><p>If the data lineage API is enabled in the GCP project, lineage is automatically captured. Here are samples from the complementary <a href="https://github.com/GoogleCloudPlatform/lakehouse-solutions/blob/main/solutions/spark-serverless-features/lab-manuals/ts3-manual.md">hands-on lab.</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NH_fflsBLitxdPJTul4qeQ.png" /><figcaption>Fig 4.16.1: Navigating to table lineage from a table entry in Knowledge Catalog</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Q9Nx2Err0mqbFW9ksW0Fzw.png" /><figcaption>Fig 4.16.2: Table lineage</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5vPSdr991Ai3x_J0j5wdhg.png" /><figcaption>Fig 4.16.3: A closer look at table lineage</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fyobv-aDsZokyZFnZ_K8VA.png" /><figcaption>Fig 4.16.4: Edges show the processes</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/631/1*CrtSrDCDPk3ivZoLJrjE7Q.png" /><figcaption>Fig 4.16.5: Navigating to a job/session</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/915/1*eyzXvO_yh8zlFNORrkLK2w.png" /><figcaption>Fig 4.16.7: Session details from where you can navigate to session logs</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*e7bO2yUqJZKuuv66V2RQbQ.png" /><figcaption>4.16.8: Lineage of an Iceberg table queried from BigQuery SQL with PCNT construct</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/603/1*7goks-SXIObsEpXRV_V8BQ.png" /><figcaption>Fig 4.16.9: Bigquery job behind the query executed in BigQuery studio</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/444/1*Ovq4LoEts9mM_vC7JODv_g.png" /><figcaption>Fig 4.16.10: The actually query executed and the user who ran the query</figcaption></figure><p>Now that we have squared away the basics, let’s look a little deeper, understand what else is there to the service — Lakehouse runtime catalog.</p><h3>5. Anatomy of a query against a Lakehouse table from Spark</h3><p>Now that we know what the Lakehouse runtime catalog is, how to create an Iceberg catalog and Spark configurations to access the catalog, let’s understand what happens behind the scenes of a query submission to an Iceberg table registered in the Lakehouse runtime catalog (REST endpoint) from a lakehouse engine — Apache Spark.</p><ol><li><strong>Metadata request:</strong> The lakehouse engine/Spark requests table metadata from the catalog to identify the table and its metadata location.</li><li><strong>Authorization:</strong> The catalog validates the request against configured Identity and Access Management (IAM) and fine-grained security policies/ACLs.</li><li><strong>Metadata response:</strong> The catalog returns the metadata to the lakehouse engine/Spark. If credential vending is enabled on the Iceberg catalog, the catalog also returns a short-lived token for secure storage access for the data associated with the Iceberg table in the Cloud Storage bucket.</li><li><strong>Data retrieval:</strong> The lakehouse engine/Spark uses the metadata as a map for the data files in Cloud Storage and optional token as a key for access and reads the data.</li><li><strong>Presentation:</strong> The lakehouse engine/Spark processes the data read and presents the results.</li></ol><h3>6. Lakehouse Iceberg runtime catalog management</h3><p>For data engineers to start using the catalog, it should be created ahead of time. Let’s review the catalog management activities, features, integration and dependencies.</p><p>Let’s look at what’s involved with managing catalogs.</p><h4><strong>6.1. IAM permissions needed</strong></h4><p>To manage the Lakehouse Iceberg Runtime Iceberg catalogs including catalog creation, two roles are needed — roles/biglake.admin and roles/storage.admin</p><h4>6.2. Create a catalog</h4><p>Already covered in previous section</p><h4>6.3. Configure credential vending for the Iceberg catalog</h4><p>Already covered in section 4.6</p><h4>6.4. Get catalog details</h4><p>The UI aspect is already covered in section 4.8. Getting catalog details via spark is covered in the hands-on lab.</p><h4>6.5. Update the catalog</h4><p>This is possible from the UI and with the <a href="https://docs.cloud.google.com/sdk/gcloud/reference/alpha/biglake/iceberg/catalogs/update">gcloud command</a>.</p><h4>6.6. Import tables</h4><p>You can import tables from external Apache Iceberg REST catalogs directly into your lakehouse tables using <a href="https://docs.cloud.google.com/dataflow/docs/guides/iceberg-df-lakehouse-integration">Dataflow’s job builder UI</a>.</p><h4>6.7. Migrate from other catalogs</h4><p>Covered further on</p><h4><strong>6.8 Delete a catalog</strong></h4><p>Drop all the tables, drop namespace and then delete catalog by <a href="https://docs.cloud.google.com/lakehouse/docs/delete-catalog">unregistering</a> a catalog metadata management endpoint from the Lakehouse runtime catalog.</p><h4>6.9. Auditing</h4><p>You can inspect <a href="https://docs.cloud.google.com/lakehouse/docs/view-audit-logs">Cloud Audit Logs</a> for verifiable records of administrative and data access activities.</p><h4>6.10. Knowledge Catalog entry automation</h4><p>The <a href="https://docs.cloud.google.com/dataplex/docs/reference/rest">Knowledge Catalog API</a> need to be enabled.</p><h4>6.11. Knowledge Catalog lineage capture automation</h4><p>The <a href="https://docs.cloud.google.com/dataplex/docs/reference/data-lineage/rest">Knowledge Catalog Lineage API</a> need to be enabled.</p><h3>7. Lakehouse Iceberg table management</h3><p>There are no nuances to managing Iceberg tables in Lakehouse runtime catalog from Apache Spark. The complementary <a href="https://github.com/GoogleCloudPlatform/lakehouse-solutions/blob/main/solutions/spark-serverless-features/lab-manuals/ts3-manual.md">hands-on lab</a> referenced further on, covers not just working with the catalog service, but also an Apache Iceberg primer.</p><h3>8. Conversational analytics with Iceberg tables in Lakehouse runtime catalog</h3><p>I would be remiss if I don’t cover chatting with data. You can go to a table and click on the ‘chat’ icon and start asking questions. You can create an agent and publish it too.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/617/1*t6HOucGcaUSC4X8xRdZYjw.png" /><figcaption>Fig 8.1: Iceberg table listing in BigQuery Studio on the Google Cloud Console</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/914/1*1954vhivJSz9aGFeRkILKQ.png" /><figcaption>Fig 8.2: Navigating to Conversational Analytics on an Iceberg table from BigQuery Studio</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/859/1*J0K3s_YafoZ2vwtV8q0b7g.png" /><figcaption>Fig 8.3: OOTB conversational analytics</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/857/1*Z3lGz9_ydzko6-6b5q-Qdg.png" /><figcaption>Fig 8.4: OOTB conversational analytics — OOTB charts</figcaption></figure><h3>9. Quotas</h3><p>Tables registered in the Lakehouse runtime catalog are subject to the same <a href="https://docs.cloud.google.com/bigquery/quotas#standard_tables">quotas</a> as standard/native tables in BigQuery.</p><h3>10. Limitations / nuances</h3><p>The below list of limitations of Iceberg tables in the Lakehouse runtime catalog is as of the authoring of this blog post in May 2026. Check the product documentation for the latest.</p><ol><li>At the time of authoring, the <strong>mapping of Iceberg catalog to lakehouse storage bucket </strong>was 1:1, with this limitation to be lifted in the future.</li><li>Table renaming is not supported.</li><li>Clustering is not supported.</li><li>Apache Iceberg views is not supported</li><li>Nested namespaces (sub-namespaces) are not supported.</li><li>Row and column level security is currently not supported but is on the roadmap</li><li>Data masking is currently not supported but is on the roadmap</li></ol><h3>11. Pricing</h3><p>The pricing for Lakehouse runtime catalog can be found <a href="https://cloud.google.com/products/lakehouse/pricing?e=48754805">here</a> for the ‘metastore’ aspect.</p><h3>12. Availability and Disaster Recovery</h3><p>There are two aspects to be considered when you plan for availability — the data and the metastore.</p><h4><strong>12.1. Data replication</strong></h4><p>For high availability, the underlying lakehouse storage bucket should be configured highly available with a multi-region configuration at a minimum to protect against regional outages. For this, there is option to go with Google Cloud paired region for your primary region, or custom paired region to your primary for data and metadata replication in the lakehouse storage bucket. This replication will happen seamlessly and is managed by the Google Cloud Storage service.</p><h4>12.2. Metastore replication</h4><p>The Lakehouse runtime catalog automatically selects primary and secondary regions for catalog metadata based on the lakehouse storage bucket region configuration. The primary region processes all table commit metadata and behind the scenes replicates it to the secondary region.</p><h4>12.3. Disaster recovery</h4><p>Disaster recovery (DR) is not automatic. You can/have to switch/failover from primary to secondary — this includes during operational readiness DR testing as well as in the event of a regional failure.</p><p>There are two failovers modes: soft failover and hard failover.</p><p><strong>a) Soft failover</strong>: Ensures data consistency. In this mode, the DR region begins to accept writes only after all data synchronizes from the (primary) region where there is an outage. This mode of soft failover is ideal for disaster recovery testing or any other planned events.</p><p><strong>b) Hard failover</strong>: Prioritizes service availability over data consistency. In this mode, the DR region accepts write traffic, regardless of the primary region’s state, or the data synchronization (from primary to DR lakehouse bucket) state.</p><h3>13. Observability</h3><h4>13.1. Logging</h4><p>You can search for logs in Cloud Logging with these base filters and then adjust the time range. Be sure to update with your project and catalog name.</p><pre>protoPayload.serviceName:&quot;biglake.googleapis.com&quot;<br>protoPayload.resourceName:&quot;projects/YOUR_PROJECT/catalogs/froyo_iceberg_lakehouse_catalog_30466744069&quot;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HP93oFav785L6Gy5zqIU-A.png" /><figcaption>Fig 13.1: Log explorer for LRCI logs</figcaption></figure><h4>13.2. Monitoring</h4><p>Monitoring metrics are not published. API level metrics are available by visiting the link below:<br><a href="https://console.cloud.google.com/apis/api/biglake.googleapis.com/metrics?project=lakehouse-solutions-build">https://console.cloud.google.com/apis/api/biglake.googleapis.com/metrics?project=Y</a>OUR_PROJECT_ID</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xe_A7ZSYi251fsYjBqpofg.png" /><figcaption>Fig 13.2: API metrics</figcaption></figure><h3>14. Cross cloud lakehouse</h3><p>Google Cloud announced new high-performance cross-cloud data solutions at NEXT 26 to overcome the egress costs and performance bottlenecks typically associated with accessing data across multiple clouds. This allows enterprises to seamlessly apply Google’s AI capabilities to their AWS and Azure data. The following are the key features:</p><h4><strong>AI-Native Cross-Cloud Lakehouse (Preview):</strong></h4><p>New interconnect and caching features allow BigQuery and Managed Spark to access AWS Iceberg (S3) data with the same price-performance as cloud-native platforms. This enables users to run Gemini-powered AI functions directly on their AWS data.</p><h4><strong>Interoperable Open Ecosystem:</strong></h4><p>A new lakehouse catalog federation (Preview) integrates with AWS Glue, Databricks, SAP, and Snowflake. This allows for simple, centralized data discovery and bi-directional access across various clouds and partner engines without moving the data.</p><h4><strong>Centralized Security:</strong></h4><p>Advanced lakehouse governance (preview) ensures that all security protocols and access permissions are immediately and uniformly enforced across this new cross-cloud environment.</p><p>More in the <a href="https://cloud.google.com/blog/products/data-analytics/the-future-of-data-lakehouse-for-the-agentic-era?e=48754805">blog post</a> and <a href="https://docs.cloud.google.com/lakehouse/docs/about-cross-cloud-lakehouse">product documentation</a>.</p><h3>15. Lakehouse interoperable Iceberg tables</h3><p>This topic is an honorary mention of a compelling feature to be <strong>available soon</strong>.</p><p>With the Lakehouse runtime catalog for Iceberg, Iceberg tables are interoperable from BigQuery and OSS engines like Spark, Flink, and Trino. This means DDL and DML can be run in BigQuery or a supported OSS engine and there is strong consistency for reads.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/995/1*rQUahqBz8jLrI1xVB3xEMQ.png" /><figcaption>Fig 15: Lakehouse interoperable Iceberg tables</figcaption></figure><p>Imagine being able to process streams and persist to Iceberg tables quickly, all without having to deal with Iceberg table management. Google Cloud has exactly the solution.</p><p>For high-concurrency streaming workloads, configuring <a href="https://docs.cloud.google.com/bigquery/docs/advanced-runtime">BigQuery advanced runtime</a> optimizations for your Iceberg tables in the Lakehouse runtime catalog unlocks a suite of powerful capabilities. While your Iceberg data remains securely persisted in your own cloud storage bucket, you gain access to:</p><ul><li><strong>High-throughput upserts</strong> powered by BigQuery’s mature <a href="https://research.google/pubs/vortex-a-stream-oriented-storage-engine-for-big-data-analytics/">Vortex engine</a>.</li><li><a href="https://docs.cloud.google.com/bigquery/docs/transactions"><strong>Multi-statement transactions</strong></a> that allow you to atomically commit or rollback changes, even across multiple Iceberg tables.</li><li><a href="https://docs.cloud.google.com/bigquery/docs/change-data-capture"><strong>Changed data replication</strong></a>, enabling you to replicate changed data from operational databases (captured by <a href="https://docs.cloud.google.com/datastream/docs/overview">Datastream</a>) directly into your Iceberg lakehouse tables.</li></ul><p>These Google Cloud innovations for streaming into Iceberg tables highlight our commitment to delivering high-performance, open-format solutions without compromising on openness. Your Iceberg data remains securely in your own Google Cloud Storage bucket, while we simplify table management by automatically handling compaction, snapshot expiry, orphan file cleanup, and metadata file size management.</p><p>Read the blog posts on this topic <a href="https://cloud.google.com/blog/products/data-analytics/improved-interoperability-for-your-apache-iceberg-lakehouse?e=48754805">here</a> and <a href="https://www.linkedin.com/posts/ahmetaltay_apache-iceberg-just-released-its-latest-version-share-7465478113427099648-lvp5">here</a>.</p><h3>16. Migrations into Lakehouse runtime catalog for Iceberg</h3><p>Data Analytics Migration Service offers tooling to migrate from external supported catalogs into Lakehouse runtime catalog for Iceberg. This is covered in depth, including calling out limitations, in the <a href="https://docs.cloud.google.com/bigquery/docs/migration/external-metastore-lakehouse-migration">documentation</a>.</p><h3>17. Parquet conversions into Apache Iceberg tables in Lakehouse runtime catalog</h3><p>There is <a href="https://docs.cloud.google.com/lakehouse/docs/import-parquet-tables">tooling / solutions</a> available to convert from plain old parquet to Iceberg for those wanting to expedite modernization.</p><h3>18. Hive catalog (private preview)</h3><p>The Hive catalog is in private preview. To try this feature, please reach out to your account team for allow-listing your Google Cloud project. I have included a hands-on lab for the Hive catalog — you can review this lab if you can’t get allow-listed for it. The experience is somewhat seamless relative to Lakehouse runtime Iceberg catalog.</p><p>To get started:</p><ol><li>Create a Hive warehouse bucket</li></ol><pre>gsutil mb -p {PROJECT_ID} -l {LOCATION} gs://{LAKEHOUSE_BUCKET_NAME}</pre><p>2. Create the Hive catalog</p><pre>gcloud alpha biglake hive catalogs create {HIVE_CATALOG_NAME} --location-uri=gs://{LAKEHOUSE_BUCKET_NAME} --primary-location={LOCATION} --description=&quot; hive catalog&quot; --project={PROJECT_ID}</pre><p>3. Create a Spark session with Hive catalog configuration</p><pre>from google.cloud.dataproc_spark_connect import DataprocSparkSession<br>from google.cloud.dataproc_v1 import Session<br><br><br>import os<br>os.environ[&#39;DATAPROC_SPARK_CONNECT_DEFAULT_DATASOURCE&#39;] = &quot;&quot;<br><br>session = Session()<br>session.runtime_config.properties = {<br> &quot;spark.hive.metastore.blms.project.id&quot;: PROJECT_ID,<br> &quot;spark.hive.metastore.blms.catalog.default&quot;: HIVE_CATALOG_NAME,<br> &quot;spark.hive.metastore.warehouse.dir&quot;: LAKEHOUSE_BUCKET_NAME,<br> &quot;spark.hive.metastore.client.factory.class&quot;: &quot;com.google.cloud.bigquery.metastore.client.BigLakeMetastoreClientFactory&quot;,<br> &quot;spark.sql.catalogImplementation&quot;: &quot;hive&quot;,<br>}<br><br><br>spark = DataprocSparkSession.builder.dataprocSessionConfig(session).getOrCreate()<br><br>print(&quot;Spark session created successfully&quot;)</pre><p>4. Create a Hive database</p><pre>spark.sql(f&quot;CREATE DATABASE IF NOT EXISTS froyo_db;&quot;)</pre><p>5. Create table</p><pre># Write to bronze layer / raw layer<br>customer_stage_df.write \<br>    .format(&quot;parquet&quot;) \<br>    .mode(&quot;overwrite&quot;) \<br>    .partitionBy(&quot;region_id&quot;) \<br>    .option(&quot;path&quot;, f&quot;gs://{LAKEHOUSE_BUCKET_NAME}/froyo-raw/bronze/customer_master&quot;) \<br>    .saveAsTable(&quot;froyo_db.b_customer_master&quot;)</pre><p>The <a href="https://github.com/GoogleCloudPlatform/lakehouse-solutions/blob/main/solutions/spark-serverless-features/lab-manuals/ts3-manual.md">hands on lab</a> covers the above with a very basic sample.</p><h3>19. Try it out with the complementary hands-on lab</h3><p>I have a minimum viable complementary <a href="https://github.com/GoogleCloudPlatform/lakehouse-solutions/blob/main/solutions/spark-serverless-features/lab-manuals/ts3-manual.md">hands-on lab</a> if you are interested in kicking the tires. Optionally, you can read the lab content like a book. It’s pretty basic — builds a medallion layer — frozen yogurt retail sales data. It’s rich in visuals with many screenshots to help digest even if you can’t try out the lab. It includes Iceberg catalog as well as Hive catalog. Hive catalog is in preview. Reach out to your account team to be allow-listed to try it out.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5-E_b9dDY5yTyr-kvxVS6Q.png" /><figcaption>Fig 19.1: Hands-on lab</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QKTXt-GMtyGVDO7P8KDBxg.png" /><figcaption>Fig 19.2: Hands-on lab — flow</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Q4nAGwfz3EvMnb1S7OCycg.png" /><figcaption>Fig 19.3. The data</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/840/1*CKC8t3eoex6kWQt0tuvrZQ.png" /><figcaption>Fig 19.4: Table of contents of the hands-on lab</figcaption></figure><h3>What’s next</h3><p>The next blog post will be about lakehouse pipeline orchestration with Apache Airflow. I will cover the Data Agent Kit for authoring DAGs as well as Managed Service for Apache Airflow (formerly called Cloud Composer).</p><p>Lakehouse Demystified blog series-<br><a href="https://medium.com/google-cloud/lakehouse-demystified-part-1-just-enough-about-the-lakehouse-stack-on-google-cloud-02529daa52af">Part 1: Introduction to lakehouse on Google Cloud</a><br><a href="https://medium.com/p/6ac3e5051794">Part 2: Just enough about Managed service for Apache Spark — serverless batches </a><br><a href="https://medium.com/@c_a_c_t_u_s/9a57a99a678a">Part 3: Just enough about Managed service for Apache Spark — serverless interactive sessions for Spark notebooks</a><br>Part 4: Just enough about Lakehouse runtime catalog for Apache Iceberg and Hive (this blog)<br>Part 5: Just enough about Managed service for Apache Airflow for lakehouse pipeline orchestration<br>Part 6: Just enough about performance optimization with Managed service for Apache Spark<br>Part 7: Just enough about machine learning, generative AI and agents on the lakehouse on Google Cloud<br>Part 8: Just enough about Apache Iceberg table interoperability between Apache Spark and BigQuery<br>Part 9: Just enough about Managed Service for Apache Spark clusters</p><p>And more to come..</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ea489cb1d19d" width="1" height="1" alt=""><hr><p><a href="https://medium.com/google-cloud/lakehouse-demystified-part-4-just-enough-about-lakehouse-runtime-catalog-ea489cb1d19d">Lakehouse Demystified — Part 4: Just enough about Lakehouse runtime catalog</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[Lakehouse Demystified — Part 2: Just Enough Managed Spark Serverless on Google Cloud for batch…]]></title>
            <link>https://medium.com/google-cloud/lakehouse-demystified-part-2-just-enough-managed-spark-serverless-on-google-cloud-for-batch-6ac3e5051794?source=rss-c3fd47c9a471------2</link>
            <guid isPermaLink="false">https://medium.com/p/6ac3e5051794</guid>
            <category><![CDATA[google-cloud-platform]]></category>
            <category><![CDATA[batch-processing]]></category>
            <category><![CDATA[apache-spark]]></category>
            <category><![CDATA[data-lakehouse]]></category>
            <category><![CDATA[data]]></category>
            <dc:creator><![CDATA[Anagha Khanolkar [Google]]]></dc:creator>
            <pubDate>Thu, 30 Apr 2026 22:43:01 GMT</pubDate>
            <atom:updated>2026-06-08T14:33:11.938Z</atom:updated>
            <content:encoded><![CDATA[<h3>Lakehouse Demystified — Part 2: Just Enough Managed Spark Serverless on Google Cloud for batch workloads</h3><p>Welcome to Part 2 of the <strong>Lakehouse Demystified</strong> blog series — a practical guide to Lakehouse on Google Cloud. My goal is to share an <strong>opinionated architectural perspective</strong> rooted in practical experience, providing depth and implementation-ready clarity through reference architectures, best practices, and minimum viable code. This series is created for <strong>lakehouse practitioners</strong> and <strong>future-state builders</strong> — the architects and engineers striving to master the “art of the possible” on Google Cloud while cutting through the noise of information overload.</p><p>In my <a href="https://medium.com/@c_a_c_t_u_s/02529daa52af">previous blog post</a>, I shared the lakehouse stack on Google Cloud, along with a gentle introduction to the products &amp; services that collectively constitute a lakehouse.</p><p>This blog showcases one of the Lakehouse engines — ‘<strong>Managed Service for Apache Spark</strong>’, formerly Dataproc, and specifically the ‘<strong>serverless batches</strong>’ deployment mode.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1023/1*h_OPvaOgBOKpsoVmkUch1w.png" /><figcaption>Fig 1: Lakehouse stack on Google Cloud</figcaption></figure><p>This blog showcases one of the Lakehouse engines — ‘<strong>Managed Service for Apache Spark</strong>’, formerly Dataproc, and specifically the ‘<strong>serverless</strong>’ deployment mode.</p><h3>Table of contents</h3><ol><li><a href="#4cde">Serverless Managed Apache Spark — at a glance</a></li><li><a href="#cb05">Elevator pitch for serverless Managed Apache Spark ‘batches’ before we dive into technical details</a></li><li><a href="#54d3">Practitioner lens — basics of submitting a Spark job</a></li><li><a href="#2600">Bare minimum setup needed to run SparkPi</a></li><li><a href="#9660">Reference Architecture</a></li><li><a href="#653d">Deeper product dive</a></li><li><a href="#0c37">Metastore/Catalog for runtime table metadata</a></li><li><a href="#e656">Performance focused features</a></li><li><a href="#5bd5">Business Metadata Catalog &amp; Governance</a></li><li><a href="#53e2">Identity to run the Spark job as</a></li><li><a href="#f03d">Batch data engineering pipeline orchestration</a></li><li><a href="#99fe">Distributed Machine Learning and Gemini Agent Platform pipeline integration</a> for MLOPS</li><li><a href="#dc34">BigQuery Machine Learning (BQML)</a></li><li><a href="#33fd">Generative AI functions</a></li><li><a href="#e78a">Managed Lakehouse Iceberg tables</a></li><li><a href="#035a">Other considerations and best practices</a></li><li><a href="#8e7d">Quickstart Sample</a></li><li><a href="#6341">Credits</a></li></ol><h3><strong>1. Serverless Managed Apache Spark — at a glance</strong></h3><p>As the name implies, this deployment mode offers a <strong>managed Spark experience without having to deal with Spark clusters</strong>. Further, you only <strong>pay for the execution time</strong> of your Spark job. And there are optional <strong>optimizations, </strong>such as <strong>Lightning Engine, </strong>that can make your <strong>Spark jobs run faster</strong> than open source Apache Spark. This eliminates operational toil and reduces tuning toil, accelerating speed to delivery.</p><p>Serverless Managed Spark comes in two deployment options — <strong>interactive serverless Spark</strong> and <strong>serverless</strong> <strong>Spark</strong> <strong>batch</strong>.</p><p>The <strong>interactive serverless</strong> deployment is primarily under the hood of Spark notebooks (with <a href="https://spark.apache.org/docs/latest/spark-connect-overview.html"><strong>Spark Connect</strong></a> or remote Spark kernels) which is covered in a <a href="https://medium.com/@c_a_c_t_u_s/9a57a99a678a">separate blog post</a>. This is particularly useful in the experimenting stage, but can be run as part of a batch job as well.</p><p>The <strong>serverless</strong> <strong>batch </strong>form factor (which I will from hereon refer to as serverless batch/batches), allows you to submit batch Spark workloads, without having to deal with Spark infrastructure management and maintenance and offers a variety of configurations and optimizations for performance and cost optimization, along with a great developer experience (I will cover IDE integration, and notebooks in a separate blog post).</p><p>If you are attempting to understand the difference between Managed service for Apache Spark clusters and Managed service for Apache Spark Serverless — there is a great guide <a href="https://docs.cloud.google.com/dataproc-serverless/docs/concepts/dataproc-compare">here</a>.</p><p>Once again, the focus of this blog post is serverless <strong>Managed Service for Apache Spark ‘batches’</strong>.</p><h3>2. Elevator pitch for serverless Managed Apache Spark ‘batches’ before we dive into technical details</h3><p><strong>Portability promise:<br></strong>It’s open source Apache Spark with execution engine optimizations to make Spark run faster. You can port in and out, and come with no vendor lock-in.</p><p><strong>Accelerates Spark development with no ops &amp; no resource contention:<br></strong>The serverless form factor of Managed Service for Apache Spark on Google Cloud helps with speed to delivery by not having to deal with creating and maintaining clusters, takes away resource contention between Spark jobs, and even does its own housekeeping/clean up.</p><p><strong>Optimizes Spark workloads: </strong>Batches can <a href="https://docs.cloud.google.com/dataproc-serverless/docs/concepts/autoscaling"><strong>autoscale</strong></a> out/in (add/reduce number of executors), can <a href="https://docs.cloud.google.com/dataproc-serverless/docs/concepts/autotuning"><strong>auto-tune </strong></a>(repeated runs are tuned to have adequate resources for high performance), supports <a href="https://docs.cloud.google.com/dataproc-serverless/docs/guides/gpus-serverless"><strong>accelerators</strong></a> (GPUs), and the <a href="https://cloud.google.com/products/lightning-engine"><strong>Lightning Engine</strong></a> feature (Google proprietary optimizations) accelerates Spark jobs.</p><p><strong>Total Cost of Ownership (TCO) optimization: </strong>You only pay for the execution time of your Spark job, not for the start up time, not for the tear down time, and not for idle time. You can set ‘Time To Live’ (TTL) <a href="https://docs.cloud.google.com/dataproc-serverless/docs/reference/rest/v1/EnvironmentConfig">configuration</a> for your Spark jobs so that they shut down after configured time. You can choose service <a href="https://docs.cloud.google.com/dataproc-serverless/docs/tiers">tiers</a> — ‘standard’ tier where you don’t need high performance. You can configure min-max thresholds for executors in auto-scaling configuration.</p><p><strong>Flexibility of consumption: </strong>You can use the Spark flavor you are partial to — Scala, PySpark, SQL.</p><p><strong>Dynamic workload scheduling: </strong>You can tee up your job and it can wait for GPUs and execute when available. This is a *new * feature.</p><p><strong>Pervasive Spark experience: </strong>Integration/support across multiple Google Cloud services through connectors and operators — BigQuery, Lakehouse runtime catalog, Managed Service for Apache Airflow, Gemini Enterprise Agent Platform pipelines and more. Managed Service for Spark has extensions for IDEs called the Data Agent Kit, and is supported in Spark notebooks.</p><p>There is more, but let’s stop here and dive into the product.</p><h3>3. Practitioner lens — basics — submitting a Spark job</h3><p>If you are/were a data engineer, you would first want to know -<br>(1) what versions of Spark are supported, <br>(2) how to download packages, <br>(3) what languages are supported, <br>(4) how to submit a Spark job to the batches service, <br>(5) what metastore to use, <br>(6) what the submission construct is relative to spark submit , <br>(7) how to monitor the job, <br>(8) what is the resource manager and is there potential for resource contention, <br>(9) what about the familiar Spark UI, <br>(10) how to orchestrate a pipeline <br>for starters etc.</p><p>Let’s cover these first…</p><h4>3.1. Spark versions supported</h4><p>The spark job submitted should optionally supply a `runtime version` — this is a software abstraction with a specific version of Apache Spark and other libraries. Details in section 6.</p><h4>3.2. How do I manage package dependencies (Maven/PyPi)</h4><p>This is nuanced and is covered in section 6.13.</p><h4>3.3. Languages/constructs supported</h4><p>PySpark, Spark Scala, Spark SQL and PySpark notebooks can be submitted for execution to the Managed Spark Serverless Batch service.</p><h4>3.4. Ways of submitting a serverless Managed Spark batch job</h4><p>There are three avenues: <a href="https://docs.cloud.google.com/sdk/gcloud/reference/dataproc/batches/submit">CLI with gcloud command</a>, <a href="https://docs.cloud.google.com/dataproc-serverless/docs/reference/rest/v1/projects.locations.batches/create">API</a>, and the <a href="https://docs.cloud.google.com/dataproc-serverless/docs/quickstarts/spark-batch#dataproc_serverless_create_batch_workload-console">Cloud Console UI</a>, and then there is first class Airflow operator support for orchestration, and first class Kubeflow operator support for MLOps in Vertex AI pipelines.</p><h4><strong>3.5. Metastore/Catalog</strong></h4><p>The catalog to use is the Lakehouse runtime catalog that currently comes in two flavors — Iceberg REST catalog (GA). and Hive catalog (preview). I have introduced the catalog in section 7 and it is the focus of a future blog post.</p><h4>3.6. Batch submission command construct</h4><p>Here is a simple example to unpack the command construct. Given PySpark is the most widely used flavor, the blog series will feature PySpark.</p><pre>gcloud dataproc batches submit pyspark \ # submit<br> - batch curate-customer-master-$RANDOM \ # user defined unique job ID<br> - project &quot;$YOUR_PROJECT_ID&quot; \ # GCP project<br> - region &quot;$YOUR_LOCATION&quot; \ # GCP location<br> - version=3.0 \ # runtime version<br> - properties=spark.driver.cores=8,.. \ # spark properties CSV<br> - subnet projects/$PROJECT_ID/regions/$LOCATION/subnetworks/lakehouse-snet \ # subnet<br> - service-account $SERVICE_ACCOUNT_FQN \ # service account to run as<br>gs://code-bucket/scripts/pyspark/curate_customer_data.py \ # pyspark script<br> - gs://output-bucket # arguments</pre><p>There are several other options — the full list of options that are part of the command construct are covered further on. Let’s look at the options from the sample above.</p><p><strong>Spark flavor:</strong> In line 4, where you see pyspark is where you indicate the flavor of spark with the options being — spark (for Scala), pyspark, spark-sql (for a pure SQL spark job).<br><strong>Runtime version:</strong> Explained already<br><strong>Batch ID:</strong> A unique ID for an instance execution of your batch job.<br><strong>Properties</strong>: Standard spark constructs for supplying properties. Covered in detail further on in the blog<br><strong>Subnet: </strong>A subnet is needed and must be supplied for the batch job. There are specific firewall rules as well as IPs that need to be available, covered further on.<br><strong>Service account:</strong> By default the batch runs with the identity of the end user submitting the batch. However automated scheduled pipelines run as service accounts (application IDs — non human identities) — this is a best practice. This option can be skipped to run the batch with the user’s identity.<br><strong>Spark code: </strong>Provide the fully qualified path to the script in a GCS bucket.<br><strong>Arguments</strong>: Place these at the very end. In the example above, I have provided the path to the output bucket.</p><p>So, this was about a minimum viable PySpark batch submission. Let’s look at the UI and the output.</p><h4>3.7. Batch UI &amp; Spark UI for monitoring execution</h4><p>For the batch listing, description and more, there are <a href="https://docs.cloud.google.com/sdk/gcloud/reference/dataproc/batches">`gcloud` commands</a>. Let’s look at the UI for the execution results.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/754/1*5QTckrAAG5E93nKJIyUtTQ.png" /><figcaption>Fig 3.7.1: Batches UI listing the submitted job</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*sswWYGSSHVwPPf4W_WtBxg.png" /><figcaption>Fig 3.7.2a: Batch job details and driver output</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1q9G4wcHEJrvr9e9uyCAuA.png" /><figcaption>Fig 3.7.2b: Batch job details</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Wa_wAa9I-h6B8aJts2-GJw.png" /><figcaption>Fig 3.7.2c: Batch job details</figcaption></figure><p>There is a managed ‘Spark UI’ if you click on ‘View Spark UI’ in the screenshot above — batches details screen</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JhjtbhY1g-myUWgjeBpUsA.png" /><figcaption>Fig 3.7.3: Spark applications under Spark UI</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vkopUjZns405Img_lP8E2g.png" /><figcaption>Fig 3.7.4: Spark UI</figcaption></figure><p>There are metrics available in the Serverless Managed Spark UI for the batch</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kT8540NqfpGRKWFzKpEB9A.png" /><figcaption>Fig 3.7.5a: Spark metrics</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ov3ds8dLZLz8B10ee93bjA.png" /><figcaption>Fig 3.7.5b: Spark metrics</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dwkq7Pv8vAnLkCP-_kcJzQ.png" /><figcaption>Fig 3.7.5c: Spark metrics</figcaption></figure><p>Logs from Cloud Logging are also available in the batches UI.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vILFpqvH5x95ECz15JMITw.png" /><figcaption>Fig 3.7.6: Spark metrics</figcaption></figure><h4>3.8. Resource manager and Spark compute resource contention</h4><p>Serverless Spark has an abstracted out bespoke Resource Manager service specifically designed to provide best in class efficiency, scalability and reliability for serverless Spark workloads.</p><p>Each serverless Spark workload uses dedicated (not shared) compute resources for industry-leading isolation and security.</p><h4>3.9. (Optional) Persistent Spark History Server</h4><p>If you are partial to all the serverless Spark batches and serverless interactive sessions to be visible in a single Spark UI, and also Spark jobs submitted to Managed Spark clusters, you can use a Persistent Spark History Server (PHS). PHS is pseudo-distributed — it’s a single node Managed Spark cluster running Spark History Server and surfacing logs from a Cloud Storage bucket.</p><p>Setup needed:<br>1. Create a Cloud Storage bucket for logs to be surfaced by the Persistent Spark History Server</p><p>2. To every batch you submit, you need to supply spark configurations to the route the logs to the PHS bucket<br>`spark.eventLog.enabled=true` &amp; `spark.eventLog.dir=gs://phs-bucket/dir/spark-job-history`</p><p>3. Stand up a <a href="https://docs.cloud.google.com/dataproc/docs/concepts/jobs/history-server">Persistent Spark History server</a>. This will provide you a single pane of glass for all configured Spark workloads.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1011/1*Wkm2dB6c24ciU0rTx38AKw.png" /><figcaption>Fig 3.9.1. Persistent History Server for managed persistent Spark history server</figcaption></figure><h4>3.10. Data engineering pipeline orchestration</h4><p>As for <strong>orchestration</strong>, the recommended solution is to run an Airflow DAG on Managed Service for Apache Airflow on Google Cloud which I will cover in a dedicated blog post with code samples. Airflow has first class operators for serverless Managed Apache Spark.</p><p>Now that we have learned Spark job submission and looking at the Spark UI, lets understand deeper details about the service starting with bare minimum needed to more advanced details.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/961/1*_peBJFQESNy-Sq2KLHN1jA.png" /><figcaption>Fig 3.10: Sample Airflow DAG with Spark jobs</figcaption></figure><h3>4. Bare minimum setup needed to run SparkPi</h3><p>The following are dependencies to be met to run a Spark job on serverless Managed Spark -</p><p><strong>4.1. Compute related organization policy requirements </strong>specific to Spark compute is covered in the complementary code sample.</p><p><strong>4.2. </strong><a href="https://docs.cloud.google.com/dataproc/docs/reference/rest"><strong>Google APIs</strong></a> specific to Spark and other services you plan to use need to be enabled. I will cover this in the complementary hands-on lab.</p><p><strong>4.3.</strong><a href="https://docs.cloud.google.com/dataproc-serverless/docs/concepts/iam"><strong> IAM permissions</strong> </a>need to be enabled. The documentation covers the entire list and the hands-on lab covers just enough.</p><p><strong>4.4. Compute quota:</strong> Although serverless, the compute runs in your GCP project, and adequate quota is required (covered further on under capacity considerations)</p><p><strong>4.5. </strong><a href="https://docs.cloud.google.com/dataproc-serverless/docs/concepts/network"><strong>Network, Subnet, Firewall rules configuration</strong></a> is needed. This is covered further below.</p><p><strong>4.6. Google Cloud Storage (GCS) buckets:</strong> Data lake storage is required unless you are running compute jobs that don’t read/write data like SparkPi.</p><h3>5. Reference Architecture</h3><h4>5.1. Flexibility without compromise</h4><p>Serverless Managed Spark offers flexibility — there are several `Bring Your Own` (BYO) supported. This is covered in section 6.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1001/1*5u4CUD2L8A4W6tdR13vO7A.png" /><figcaption>Fig 5.1. Supported BYO aspects</figcaption></figure><h4><strong>5.2. Reference Architecture</strong></h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/988/1*fzdb6yJioeilmnIGpFBcLg.png" /><figcaption>Fig 5.2. Reference architecture for the lakehouse on GCP</figcaption></figure><p>(1)Serverless Managed Apache Spark is a VPC native service<br>(2) For Spark batch pipelines, the orchestration solution is Managed Service for Apache Airflow — serverless<br>(3) The runtime metadata catalog is Lakehouse runtime catalog (LRC)<br>(4) Table registrations into the LRC, will register entries into the business metadata catalog — Knowledge Catalog automatically<br>(5) Logs are automatically routed to Cloud Logging but can optionally also be written to Cloud Storage (if you want to use Persistent Spark History Server)<br>(6) The Spark UI is managed and serverless<br>(7) Lakehouse storage is Cloud Storage with data in table formats as we progress in the <a href="https://www.databricks.com/blog/what-is-medallion-architecture">medallion architecture</a>. Consumption layer can be table format in Cloud Storage, or can be BigQuery (based on considerations)<br>(8) Serverless Managed Apache Spark can be bootstrapped with a custom container in Google Artifact Registry — container with libraries/proprietary software as needed<br>(9) There are monitoring tiles in the Managed Spark Serverless UI<br>(10) Alerting can be configured<br>(11) Gemini Agent Platform AI Model Registry (formerly Vertex AI model registry) supports Spark models and Gemini Agent Platform AI pipelines (formerly Vertex AI pipelines) offer first class serverless Managed Apache Spark Kubeflow operators for MLOps pipelines.</p><p>The above is an abstract. Read on for more details.</p><h3>6. Into the deep</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1023/1*aOeXl3i63cG-47ZfO2dEQQ.png" /><figcaption>Fig 6.0: Managed Spark — integration landscape</figcaption></figure><p>This diagram shows the service, its integrations, and abstractions which I will cover in depth.</p><p>Running on the cloud is not inexpensive. Technical architects need to take cost into consideration. So, let’s start with resource units and pricing.</p><h4>6.1. Resource Units</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/870/1*TIT5tU6T9z7pH3Yf5Lgc2Q.png" /><figcaption>Fig 6.1a: Resource units</figcaption></figure><p><strong>Data Compute Unit (DCU)</strong> is the fundamental billing metric for measuring resource consumption in the service. It represents a combination of virtual CPUs (vCPUs) and memory (RAM) used by Spark drivers and executors. DCUs are billed per second based on usage — execution time (excluding start up and tear down). Learn more from the <a href="https://cloud.google.com/dataproc-serverless/pricing?e=48754805">pricing documentation</a>.</p><p>Approximate billing metrics are available from the service. In the diagram below — see ‘Approximate DCU usage’ and ‘Approximate shuffle storage usage’.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/656/1*i2vsZcV5qoubYltUf7Wn5w.png" /><figcaption>Fig 6.1b: Approximate unit consumption</figcaption></figure><p>If you run a Spark job on serverless Managed Apache Spark Serverless batches without any custom resource configs (RAM, cores for drivers and executors) passed as spark properties, the below is the default allocation and consumption. Note the IP address usage. There are 2 executors by default, 3 IPs by default. Each driver and executor run on dedicated computers (analogous to say a VM each), and therefore need an IP address each.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/998/1*c9eo4dW9MZhRqw1hGOe8ng.png" /><figcaption>Fig 6.1c: Default resource allocation and consumption with SparkPi job</figcaption></figure><h4>6.2. Pricing construct</h4><p>There are three units that are charged for based on usage-<br>a) Data Compute Units (DCUs)<br>b) Accelerators: Charges for GPUs used<br>c) Shuffle Storage: Charges based on the data storage utilized for Spark shuffles</p><p>You are billed for execution time rounded in seconds with a minute as minimum, and no charge for start up and tear down time. Pricing details are explained <a href="https://cloud.google.com/dataproc-serverless/pricing?e=48754805">here</a>.</p><p>Committed Usage Discounts (CUDs) are supported for DCUs.</p><h4>6.3. Service Tiers</h4><p>Serverless Managed Apache Spark comes with two tiers — <strong>standard</strong> tier (default) and <strong>premium</strong>. The premium tier unlocks a number of performance accelerating features (covered in this blog mini-series) and the interactive sessions feature specific to Spark notebooks. Learn more about the tiers <a href="https://docs.cloud.google.com/dataproc-serverless/docs/tiers">here</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/668/1*dTGUaWXhELx3hnI87VDrtA.png" /><figcaption>Fig 6.3: Features unlocked with each service tier</figcaption></figure><h4>6.4. Promise of ‘No resource contention’ for compute resources</h4><p>When a Spark job is submitted, there is no resource contention as the compute is provided exclusively to the user submitting the job.</p><p>1 executor = 1 compute instance<br>1 driver = 1 compute instance<br>Shared nothing architecture relative to other spark jobs submitted.</p><h4>6.5. Dynamic Workload Scheduler (new)</h4><p>With Dynamic Workload Scheduler (DWS), you can configure your batch to wait for sparse resources — specifically, GPUs, for specific duration before failing. It will be available with serverless Managed Apache Spark runtime 3.0. Here is how you configure DWS.</p><p>Eventually, this configuration will become default; In the interim, you will need to supply the configuration.</p><pre>gcloud dataproc batches submit pyspark \<br> --project lakehouse-solutions \<br> --region us-central1 \<br> --version=3.0 \<br> --properties &quot;spark.dataproc.executor.resource.accelerator.type=l4,\ ←GPU type<br>spark.dataproc.executor.provisioning.mode=queue,\ ←queued<br>spark.dataproc.executor.provisioning.allocationTimeout=3600s,\ ←timeout<br>…&quot; \<br>gs://code-bucket/scripts/pyspark/curate_customer_data.py \<br> -- gs://output-bucket</pre><h4>6.6. Runtime &amp; versions</h4><p>The runtime version — is a software abstraction with a specific version of Apache Spark and other compatible ecosystem software. The job defaults to the latest runtime, if not explicitly supplied. The runtime also includes Spark MLlib and popular classic machine learning and deep learning libraries.</p><p>E.g. Spark runtime 3.0 has the following. <a href="https://docs.cloud.google.com/dataproc-serverless/docs/concepts/versions/dataproc-serverless-versions">[Complete list of runtime versions]</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/868/1*jQelYQW8AlVhJ4MGez3jkw.png" /><figcaption>Fig 6.6: Managed Spark Serverless runtime</figcaption></figure><p>If you want to add anything additional to the runtime — your options are to supply packages/jars/files via the submit command, or alternately, build a custom container image with your desired software and supply the resource URI of your custom container in Google Cloud Artifact Registry.</p><h4>6.7. Network firewall rules considerations</h4><p>Managed Spark is a VPC native service. The serverless Spark compute runs in your GCP project and uses your compute quota, and your network. Therefore,<br>(a) a <strong>private network and subnet</strong> is required; <strong>Shared VPC</strong> is supported,<br>(b) within the private network, inter-node (executor/driver), <strong>intra-subnet</strong> <strong>open</strong> <strong>firewall</strong> over all ports &amp; protocols is required. This is so that there can be communication between the various processes across nodes.<br>(c) <strong>Private Google Access</strong> must be enabled in the network.</p><p>With Managed Spark Serverless runtime 3.0, if (b) and (c) are not enabled/configured, then Managed Spark service will automatically configure the same with scope limited to the Spark compute it manages.</p><p>When you enable the Dataproc API, it creates a Google managed service agent principal for Managed Spark as shown below. This service agent, by default, has permissions to make the modifications above. This is to simplify the user experience and the configurations are applied to the very first batch submitted and seamlessly.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HdTtZXT0dI3gTVyNbAtJWA.png" /><figcaption>Fig 6.7: Managed Spark service agent</figcaption></figure><h4>6.8. IP address considerations</h4><p>There should be adequate IPs available (each executor and each driver needs an IP address, size your subnets carefully).</p><h4>6.9. Internet access</h4><p>For internet access, Cloud NAT and Cloud Router configuration is required.</p><h4>6.10. Exfiltration controls</h4><p>Managed Spark service supports VPC-SC for perimeter protection and exfiltration control.</p><h4>6.11. Spark properties at submission time</h4><p>Almost all spark properties are supported. Here is a consolidated list of spark properties:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/287/1*emI80m30_quii1qT1EA8Aw.png" /><figcaption>Fig 6.11.a: Spark properties</figcaption></figure><p>The above are the the <strong>resource allocation</strong> for fine-grained resource control.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/370/1*9w4sWZVzDfpE_M1r8rLurw.png" /><figcaption>Fig 6.11.b: Spark properties</figcaption></figure><p>The above are the <strong>autoscaling </strong>configurations.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/314/1*vMSpYzuENcMDrwiF__LzRQ.png" /><figcaption>Fig 6.11.c: Spark properties</figcaption></figure><p>The above covers ‘Tier’ specification, environment variables and the two engine configs which elicit their own section and explanation and further below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/320/1*Q2dy8EC5MRGma8jJR4KOqQ.png" /><figcaption>Fig 6.11.d: Spark properties</figcaption></figure><p>The above covers jars, archives, log level and other Managed Spark configs</p><p>You can find the full list and details about spark properties <a href="https://docs.cloud.google.com/dataproc-serverless/docs/concepts/properties">here</a>.</p><h4>6.12. Resource allocation via Spark properties</h4><p>The following are the knobs for controlling the resources provided to the drivers and executors. Note the tiers referenced and include these configs as needed. The list of properties should be comma-separated.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/276/1*lCyvzhAzArLPRKoCP5QPvg.png" /><figcaption>Fig 6.12: Spark properties for resource configuration</figcaption></figure><p>You can find the explanation <a href="https://docs.cloud.google.com/dataproc-serverless/docs/concepts/properties">here</a>.</p><h4>6.13. Maven/PyPi dependencies</h4><p>Dependencies can be specified as Spark properties (spark.jars..)</p><p><strong>Scala/Java dependencies:</strong><br>Google Cloud hosts Maven mirror in a Cloud Storage (GCS) bucket: This is refreshed nightly and available free of cost for users. If you are using standard packages, just providing the coordinates as part of your submission (`property=spark.jars.packages=io.delta:delta-core_x.xx:x.x.0`) will fetch from the local Google Cloud Maven into the Spark compute. The sequence is as follows — the service checks the local container, if it does not exist, tries the GCS Maven mirror, if not found, tries to download from the internet and (the batch job) fails if internet access is disabled.</p><p>For proprietary private dependencies persisted in GCS, use the ivySettings configuration as shown below-</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/617/1*3wZRujFshKVBRati1s1-yQ.png" /><figcaption>Fig 6.13: Ivy settings</figcaption></figure><p>For downloading from internet, configure the network to use a Cloud NAT and Cloud Router to download from public internet with the appropriate firewall rules and configuration in place, or alternately, you can provide a custom container image (covered further on)</p><p>PyPi dependencies:<br>For Python dependencies, follow Apache Spark construct for supplying dependencies as detailed in the <a href="https://spark.apache.org/docs/latest/api/python/tutorial/python_packaging.html">documentation</a>. Prefer custom container for lowest start up time if here are lot of Python dependencies.</p><h4>6.14. Runtime container and how and when to BYO container</h4><p>Managed Spark Serverless runs Apache Spark workloads within <a href="https://www.docker.com/">Docker containers</a>. The container provides the runtime environment for the Spark workload’s driver and executor processes. As covered already, Google Cloud manages the provisioning, scaling, and teardown of the necessary compute resources for the workload.</p><p>Unless a custom container is specified, the service uses a default Google managed Docker container that provides the consistent, isolated environment with pre-installed dependencies like Spark, Java, Python, and packages needed to execute Spark applications.</p><p><strong>Why Use a Custom Container?</strong></p><p>Use <a href="https://cloud.google.com/dataproc-serverless/docs/guides/custom-containers">custom container images</a> when -<br>- there is significant customization needed of the infrastructure — or if custom configs are needed,<br>- or when there are security requirements<br>- or when there are too many package dependencies causing startup latency</p><p><strong>What is involved with customer containers</strong></p><p>a) From a submit command perspective:<br>Its as simple as an additional option with artifact resource URI:</p><pre>gcloud dataproc batches submit spark \<br> --container-image=YOUR_CUSTOM_IMAGE_RESOURCE_URI, for example, &quot;gcr.io/my-project-id/my-image:1.0.1&quot; \<br>...</pre><p>b) Apache Spark and Java (JRE)<br>Don’t include Spark and JRE in the image. This is taken care of by the service.</p><p>c) Also, avoid adding BigQuery and GCS connectors to the custom image. Also avoid referencing connector packages in batch/session submission — it would be redundant.</p><p>d) For comprehensive understanding, refer to the <a href="https://docs.cloud.google.com/dataproc-serverless/docs/guides/custom-containers#minimum-configuration">documentation</a>. I have posted a sample Spark machine learning hands on lab that uses a custom container as part of my blog post featuring distributed machine learning with Spark.</p><h3>7. Metastore/Catalog for table metadata</h3><p>This is a critical component of the lakehouse architecture. The following is just a high-level overview, more in a separate blog post.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1023/1*skUbHGpemEE_j2zw4wOsQQ.png" /><figcaption>Fig: 7.0: Pervasive support of LRC across projects and lakehouse engine form factors</figcaption></figure><p>In lakehouses, a catalog is used to define databases and table runtime metadata (schema definition) once and query many times and also holds a lot of other metadata. An organization may have a single lakehouse catalog that all business units can use, or additionally a lakehouse catalog for tables for exclusive use by the business unit with the former for the common tables.</p><p>The managed lakehouse catalog (lakehouse metastore) on Google Cloud is called ‘<a href="https://docs.cloud.google.com/lakehouse/docs/about-lakehouse-catalogs">Lakehouse runtime catalog</a>’ (formerly known as BigLake metastore) . It comes in multiple flavors — Iceberg (GA), Hive (in private preview).</p><p><a href="https://cloud.google.com/blog/products/data-analytics/the-future-of-data-lakehouse-for-the-agentic-era?e=48754805">Announced at NEXT 26</a>, is — interoperability for DDL (create/alter/ drop database &amp; table commands) and DML (data insert, merge, updates, deletes) operations across Apache Spark and BigQuery if you choose Lakehouse runtime catalog as your runtime metastore/Spark Catalog.</p><p>Further, with Iceberg tables registered in the Lakehouse runtime catalog (LRC), a number of AI and GenAI features are unlocked such as BigQuery Machine Learning (BQML), vector stores and vector search (coming soon), LLM based functions such as forecasting with TimesFM, TabularFM, generative functions and more.</p><p>Lakehouse runtime catalog supports user managed service accounts, end user credentials as well as credential vending. From a fine grained access control standpoint, database, table, row and column level security, sensitive data masking/obfuscation is supported &amp; coming soon for Apache Iceberg format.</p><p>Here is a snippet that shows how to use LRC for Iceberg with Spark batches</p><pre>gcloud dataproc batches submit pyspark froyo_sales_report_generator.py \<br>    --project=$PROJECT_ID \<br>    --region=$REGION \<br>    --deps-bucket=$DEPENDENCIES_BUCKET_NAME \<br>    --version=2.3 \<br>    --subnet=$SUBNET_NAME \<br>    --properties=&quot;spark.sql.catalog.$CATALOG_NAME=org.apache.iceberg.spark.SparkCatalog,spark.sql.catalog.$CATALOG_NAME.type=rest,spark.sql.catalog.$CATALOG_NAME.uri=https://biglake.googleapis.com/iceberg/v1/restcatalog,spark.sql.catalog.$CATALOG_NAME.warehouse=gs://$WAREHOUSE_BUCKET_NAME/$WAREHOUSE_FOLDER_NAME,spark.sql.catalog.$CATALOG_NAME.io-impl=org.apache.iceberg.gcp.gcs.GCSFileIO,spark.sql.catalog.$CATALOG_NAME.header.x-goog-user-project=$PROJECT_ID,spark.sql.catalog.$CATALOG_NAME.rest.auth.type=org.apache.iceberg.gcp.auth.GoogleAuthManager,spark.sql.extensions=org.apache.iceberg.spark.extensions.IcebergSparkSessionExtensions&quot;</pre><p>There are a number of configs for the catalog in the above; Coming soon — there will be just one catalog configuration replacing the multitude above.</p><h3>8. Performance focused features</h3><p>I have a dedicated blog post on this topic. Here are highlights.</p><h4>8.1. Autoscaling</h4><p>Autoscaling is enabled by default and is a feature applicable to serverless Spark batches and sessions. Its based on <a href="https://spark.apache.org/docs/latest/job-scheduling.html#dynamic-resource-allocation"><strong>Spark dynamic resource allocation</strong></a> and starts after 1 minute of job execution and can be disabled. If enabled, thresholds can optionally be set as cost controls.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/402/1*igkkriL_o0F5gwJhQ78tsQ.png" /><figcaption>Fig 8.1a. Autoscaling</figcaption></figure><p>Node downscaling is asynchronous, node selection for downscaling is done mindfully (considers node’s shuffle data size and idle time). Spark graceful decommissioning and shuffle migration is configurable.</p><p>Knobs available are:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/893/1*De-u5TXQST7tKLXK0VasRQ.png" /><figcaption>Fig 8.1b: Autoscaling</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/933/1*n0naFOUIR7dPE3efJQ_IhQ.png" /><figcaption>Fig 8.1c: Autoscaling</figcaption></figure><p>Learn more about autoscaling <a href="https://docs.cloud.google.com/dataproc-serverless/docs/concepts/autoscaling">here</a>.</p><h4>8.2. Autotuning</h4><p>This is straight off of the docs-<br>Autotuning feature in serverless Managed Spark batches provides an alternative to manual tuning by automatically applying Spark configuration settings to a <strong>recurring Spark workload</strong> based on Spark optimization best practices and an analysis of recurring executions of the same Spark job. We will refer to repeated executions as “<strong>cohorts</strong>” of the Spark job).</p><p>The cohort name that you specify when you submit a batch workload identifies it as one of the successive runs of the recurring workload.</p><p>Autotuning is applied to batch job cohorts as follows:</p><ul><li>It is calculated and applied to the second and subsequent cohorts of a batch job. It is not applied to the first run because the feature uses workload history for optimization.</li><li>Autotuning is not applied retroactively to running workloads, it is applied only to newly submitted workloads.</li><li>Autotuning learns and improves over time by analyzing the cohort statistics. To allow the system to gather sufficient data, we recommend keeping autotuning enabled for at least five runs.</li></ul><p>Here is how you apply autotuning configs-</p><pre>gcloud dataproc batches submit … \<br> --region=$REGION \<br> --cohort=&#39;warehouse_nightly_sales_report&#39; \ # cohort<br> --autotuning-scenarios=auto \ # enable autotuning<br> other arguments …</pre><p>And the optimized configuration from the autotuning can be accessed as follows…</p><pre>gcloud dataproc batches describe warehouse_nightly_sales_report<br>…<br>…<br>runtimeInfo:<br> propertiesInfo:<br> # Properties set by autotuning.<br> autotuningProperties:<br> spark.dataproc.sql.broadcastJoin.hints:<br> annotation: Converted 1 Sort-Merge Joins to Broadcast Hash Join<br> value: v2;Inner,&lt;hint&gt;<br> spark.dynamicAllocation.initialExecutors:<br> annotation: Adjusted Initial executors based on stages submitted in first<br> 2 minutes to 9<br> overriddenValue: &#39;2&#39;<br> value: &#39;9&#39;<br> spark.dynamicAllocation.maxExecutors:<br> annotation: Tuned Max executors to 11<br> overriddenValue: &#39;5&#39;<br> value: &#39;11&#39;<br> spark.dynamicAllocation.minExecutors:<br> annotation: Changed Min executors to 9<br> overriddenValue: &#39;2&#39;<br> value: &#39;9&#39;<br>…</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/450/1*R-EerJ-fNt4OOGWOyp_5IQ.png" /><figcaption>Fig 8.2: Autotuning summary</figcaption></figure><p>Learn more from the autotuning <a href="https://docs.cloud.google.com/dataproc-serverless/docs/concepts/autotuning">documentation</a>.</p><h4>8.3. Lightning Engine</h4><p><a href="https://docs.cloud.google.com/dataproc-serverless/docs/guides/lightning-engine"><strong>Lightning Engine</strong></a> is a high-performance query accelerator feature in Managed Spark Serverless powered by a multi-layer optimization engine that performs customary optimization techniques, such as query and execution optimizations, as well as curated optimizations in the file system layer and data access connectors. I have a dedicated blog post covering this.</p><p>As shown in the following illustration — straight off of the <a href="https://docs.cloud.google.com/dataproc-serverless/docs/guides/lightning-engine">documentation</a>, Lightning Engine accelerates Spark query execution performance on a <a href="https://www.tpc.org/tpch">TPC-H</a>-like workload (10 TB dataset size). I have a blog post that dives into performance and has a complementary code sample for you to independently benchmark.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/719/1*kNrhrxhHOfHwvUKZ2QbeKQ.png" /><figcaption>Fig 8.3: TPC-H benchmarking</figcaption></figure><ul><li>Lightning Engine is available for use with <a href="https://docs.cloud.google.com/dataproc-serverless/docs/concepts/versions/spark-runtime-2.3">runtime 2.3</a> and planned for runtime 3.0</li><li>Lightning Engine is automatically enabled and available only with the <a href="https://docs.cloud.google.com/dataproc-serverless/docs/tiers#premium_tier_differentiation">premium pricing tier</a>.</li></ul><pre>gcloud dataproc batches submit spark \<br> --project=PROJECT_ID \<br> --region=REGION \<br> --version=2.3 \<br> --properties=dataproc.tier=premium \<br> ….OTHER_FLAGS_AS_NEEDED..</pre><p>Review the <a href="https://docs.cloud.google.com/dataproc-serverless/docs/guides/lightning-engine">limitations and fallbacks</a>.</p><h4>8.4. Native Query Execution Optimization</h4><p>Native Query Execution (NQE) is an optional Lightning Engine feature that enhances performance through a native implementation based on <a href="https://gluten.apache.org/">Apache Gluten</a> and <a href="https://github.com/facebookincubator/velox">Velox</a> that is designed for Google hardware.</p><p>The Native Query Execution runtime includes unified memory management for dynamic switching between off-heap and on-heap memory without requiring changes to existing Spark configurations. NQE includes expanded support for operators, functions and Spark data types, as well as intelligence to automatically identify opportunities to use the native engine for optimal pushdown operations.</p><p>NQE is ideal for use with:</p><ul><li>Spark Dataframe APIs, Spark Dataset APIs, and Spark SQL queries that read data from Parquet and ORC files.</li><li>Workloads recommended by the <a href="https://docs.cloud.google.com/dataproc-serverless/docs/guides/run-nqe-tool">Native Query Execution qualification tool</a>.</li></ul><p>Review the <a href="https://docs.cloud.google.com/dataproc-serverless/docs/guides/lightning-engine">limitations and fallbacks</a>.</p><h4>8.5. Table format support</h4><p>There are optimizations in place for table formats with Lightning Engine and Native Query Execution.</p><h4>8.6. High performance connectors</h4><p>The BigQuery Spark connector and Cloud Storage connectors have optimizations built in for read and write.</p><p>I have a complementary code for an upcoming blog post for performance features in serverless Managed Spark .</p><h3>9. Business Metadata Catalog &amp; Governance</h3><p>This is a loaded topic and elicits its own blog post.</p><p>The Google Cloud product for data and model governance is called <a href="https://docs.cloud.google.com/dataplex/docs/introduction"><strong>Knowledge Catalog</strong></a> (formerly known as Dataplex).</p><ol><li>With table registration into the Lakehouse Runtime Catalog , <strong>entries</strong> are automatically created in the Knowledge Catalog.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HOvLs1sw6XJesbm8NWrp2g.png" /><figcaption>Fig 9.1: Automated knowledge catalog entries creation</figcaption></figure><p>2. If the lineage API is enabled in the GCP project, <strong>data lineage</strong> is captured.</p><p>3. <strong>Data profiling</strong> can be run against the table</p><p>4. <strong>Data quality</strong> jobs can be run against the table. Alerts can be configured for data quality issues</p><p>5. LLM powered Data Insights <strong>Table Documentation Scans</strong> can be run to generate <strong>metadata</strong> — table and column descriptions that can be used for <strong>agentic grounding </strong>for example with NL2SQL chat applications<strong>.</strong></p><p>6. <strong>Business glossary </strong>can be created</p><p>7. <strong>Business overviews</strong> can be added to the Knowledge Catalog entries</p><p>8. <strong>Data stewards</strong> can be assigned to entries</p><p>9. <strong>Data products</strong> can be created &amp; published by product owners to stand up a <strong>Data Mesh</strong>.</p><h3>10. Identity to run the Spark job as</h3><p>Managed Spark Serverless supports both <strong>End User Credentials</strong> (EUC) as well as <strong>User Managed Service Account</strong> (UMSA) that are non-human application IDs for automated deployments and job execution. In production, for batch pipelines, enterprises invariably use UMSAs. In the gcloud command sample in section, you just need to add the option, — service-account and provide the fully qualified UMSA. If this is not provided, it falls back to</p><pre>gcloud dataproc batches submit \<br>--project $PROJECT_ID \<br>…<br>--service-account &quot;$SERVICE_ACCT_NAME@$PROJECT_ID.iam.gserviceaccount.com&quot; \ &lt;-service account<br>…</pre><p>For runtime 3.0+ EUC is the default; To run as an UMSA, you need to add — service-account to the submit command.</p><p>For prior runtimes, the default identity is the Google Compute Engine default Service Account; To enable EUCs you need to explicitly add — user-workload-authentication-type=END_USER_CREDENTIALS with END_USER_CREDENTIALS a literal to the submit command. For UMSA, you need to add — service-account to the submit command.</p><h3>11. Batch data engineering pipeline orchestration</h3><p>On Google Cloud, the recommended orchestration solution is <a href="https://docs.cloud.google.com/composer/docs/composer-3/composer-overview"><strong>Managed service for Apache Airflow</strong></a><strong> </strong>(formerly known as Cloud Composer).</p><p>Since pipeline orchestration is a critical aspect of batch data engineering with Apache Spark, I have a dedicated blog post coming up with a complementary end to end, minimum viable solution.</p><p>The following are screenshots from the complementary hands-on lab.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ecyDRZhNxM0aAxlv2_nZQw.png" /><figcaption>Fig 11.1: Managed Airflow service UI</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/894/1*LLynqUIN4TVFDWJFuP2XkA.png" /><figcaption>Fig 11.2: Airflow UI</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PKZXJRcRcjPk2Ku7SPYVpA.png" /><figcaption>Fig 11.3: Airflow UI</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/732/1*CK7o0TcmQ8Gpn_Ly8w70FA.png" /><figcaption>Fig 11.4. Airflow Managed Spark Batch config definition</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/823/1*o4j19i_fJlq-wY3PWqaJKw.png" /><figcaption>Fig 11.5. Airflow Managed Spark Batch task</figcaption></figure><p>There is first class <a href="https://airflow.apache.org/docs/apache-airflow-providers-google/6.5.0/_api/airflow/providers/google/cloud/operators/dataproc/index.html#airflow.providers.google.cloud.operators.dataproc.DataprocCreateBatchOperator">Airflow operator support </a>for Spark jobs submitted as part of an Airflow DAG. And the <a href="https://docs.cloud.google.com/composer/docs/composer-3/run-dataproc-workloads">public documentation</a> has a sample.</p><h3>12. Distributed Machine Learning and Gemini Agent Platform integration</h3><p>I already covered the spark runtime and how it includes popular machine learning libraries, and that you can add any other libraries you need from PyPi, can even bring your own custom container with all the libraries of your choice baked into the image. Lets look at Gemini Agent Platform integration integration.</p><h4>12.1. Gemini Agent Platform integration integration for Spark based distributed machine learning</h4><p>Here is what is supported:<br>1. Gemini Agent Platform integration model registry: you can register the model developed with Spark in the model registry</p><p>2. Gemini Agent Platform integration pipelines: you can develop a kubeflow pipeline and deploy to Gemini Agent Platform integration pipeline service. There is first class support for the <a href="https://docs.cloud.google.com/vertex-ai/docs/pipelines/dataproc-component">serverless Managed Spark Kubeflow operator.</a></p><p>This is a topic that elicits its own blog post and is coming soon. But here is a quick preview.</p><h4>12.2. Experimenting</h4><p>For <strong>experimenting </strong>in <strong>Spark notebooks, </strong>Managed Spark service has a feature called<strong> ‘Interactive’ </strong>that uses <strong>Spark Connect. </strong>This interactive service is used under the hood of supported IDEs (<strong>VSCode..</strong>), Colab notebooks, and we also support <strong>Bring Your Own Jupyter server.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/860/1*3LBsRfvp19PPrIJkpD0mPw.png" /><figcaption>Fig 12.2: Experimenting with distributed machine learning possible with Apache Spark</figcaption></figure><h4>12.3. Operationalizing model training</h4><p>For <strong>MLOps</strong>, as mentioned, Gemini Agent Platform <strong>pipelines</strong> is the recommended solution, with the<strong> distributed training </strong>running on Managed Spark Serverless.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/986/1*u8sedFm8gjeydEG2gWX02g.png" /><figcaption>Fig 12.3.1. Reference architecture for Spark model training on Google Cloud</figcaption></figure><p>All instances of BigQuery above can be replaced with tables backed by table formats if a portable solution is required.</p><p>Here is a sample pipeline in Gemini Agent Platform integration pipelines. The preprocessing, model training and hyper-parameter tuning in this diagram run on Managed Spark Serverless. I will share the code sample in a future blog post.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/929/1*_jPt2ivzJLJa-z2wjGC4qA.png" /><figcaption>Fig 12.3.2: Gemini Agent Platform integration pipeline with Spark batches</figcaption></figure><p>In the figure 12.3.2, pre-processing can be done with Spark and the preprocessed dataset can be registered in the Gemini Enterprise Agent Platform dataset registry.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/853/1*dDjNFHhejXlwOOQw2D4t0g.png" /><figcaption>Fig 12.3.3: Model training with Spark</figcaption></figure><p>You can then do model training with Spark.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/830/1*pQQHLdZwjiUK0lmqFsq1Ow.png" /><figcaption>Fig 12.3.4: Evaluate Spark model and publish metrics</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OF7KhmocWbAVwScKRpwWMg.png" /><figcaption>Fig 12.3.5: Model metrics can be visualized</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1022/1*dNP88KpAKhiH0pzbutR4Uw.png" /><figcaption>Fig 12.3.6: Plots can be visualized</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*z4kd11eluWAviiftztijKg.png" /><figcaption>Fig 12.3.7: Confusion matrix</figcaption></figure><h4>12.4. Hyper-parameter tuning</h4><p>And here is the hyper-parameter tuning with Spark MLlib.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1010/1*GwPbu4_i80c4bCDZVgnGdQ.png" /><figcaption>Fig 12.4.1: Conditional hyper-parameter tuning</figcaption></figure><p>You can persist the best model to a Cloud Storage bucket.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JWYxc8Dglj-YZR7vnTT1Og.png" /><figcaption>Fig 12.4.2: Best model from hyper-parameter tuning</figcaption></figure><h4>12.5. Batch scoring</h4><p>This best model can then be used in a batch scoring pipeline. The model can be broadcasted to all executors and `model.predict` method can be called for scoring.</p><p>This diagram puts it all together — training &amp; tuning on the left and scoring on the right.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/988/1*AR-CqJfirI78v-aQ6bOyqA.png" /><figcaption>Fig 12.5: Training and batch scoring</figcaption></figure><p>The predictions source in the diagram references to the data that needs scoring. Predictions can be persisted to lakehouse tables, BigQuery, or BigTable (ideal for lowest latency serving).</p><p>You can read more in my future blog post and complementary hands-on lab.</p><h3>13. BigQuery Machine Learning (BQML)</h3><p>If you use the Lakehouse runtime catalog and create an Iceberg table from Spark, it unlocks <a href="https://docs.cloud.google.com/bigquery/docs/bqml-introduction">BQML</a>. Here is a snippet, full sample can be found <a href="https://github.com/GoogleCloudPlatform/devrel-demos/blob/main/data-analytics/lakehouse-webinar/open_lakehouse.ipynb">here</a>. I have a dedicated blog post coming up with complementary code on AIML and Generative AI.</p><pre>- Create the model<br>CREATE OR REPLACE MODEL `lakehouse_bqds.returns_prediction_model`<br>OPTIONS(model_type=&#39;LOGISTIC_REG&#39;,<br> input_label_cols=[&#39;returned&#39;]) AS<br>SELECT<br> Product_id,<br> age,<br> postal_code,<br> traffic_source,<br> IF(status = &quot;Returned&quot;, 0, 1) AS returned<br>FROM (<br> SELECT * FROM `lakehouse_bqds.order_history_iceberg`<br> UNION ALL<br> SELECT * FROM `lakehouse_bqds.order_history_returns_iceberg`<br>) orders<br>LEFT JOIN<br> `lakehouse.users` users<br>ON<br> orders.user_id = users.id;<br> - Evaluate the model<br>SELECT<br> *<br>FROM<br> ML.EVALUATE(MODEL `lakehouse_bqds.returns_prediction_model`)</pre><h3>14. Generative AI functions</h3><p>Just like BQML, <a href="https://docs.cloud.google.com/bigquery/docs/generative-ai-overview">Generative AI functions</a> available in BigQuery automatically become available with Iceberg tables registered in Lakehouse runtime catalog. This is covered in a AIML focused blog post with complementary hands-on lab.</p><h3>15. Lakehouse Iceberg tables</h3><p>This topic is an honorary mention of a compelling feature and the focus of a future blog.</p><p>With the Lakehouse runtime catalog for Iceberg, Iceberg tables are interoperable from BigQuery and OSS engines like Spark, Flink &amp; Trino. This means DDL and DML can be run in BigQuery or a supported OSS engine and there is strong consistency for reads.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/963/1*U-py0Bs0g_-DFS32wO2EHg.png" /><figcaption>Fig 15: Lakehouse Iceberg tables</figcaption></figure><p>For high concurrency streaming workloads, advanced BigQuery optimizations can be configured for Iceberg tables, and a number of compelling BigQuery centric innovations and features are unlocked such as — for high-throughput upserts, BigQuery’s robust and mature <a href="https://research.google/pubs/vortex-a-stream-oriented-storage-engine-for-big-data-analytics/">Vortex</a> engine, &amp; <a href="https://docs.cloud.google.com/bigquery/docs/continuous-queries-introduction">continuous queries</a> become available. With advanced BigQuery optimizations for Iceberg, multi-statement transactions and Changed Data Capture (CDC) are also unlocked. When you pivot to using advanced BigQuery optimizations, OSS engine reads and writes to the Iceberg table have to be via the BigQuery Spark Connector to the Iceberg table for strong consistency (almost like it were a native BigQuery table in Colossus file system instead of a Lakehouse table. However, the Iceberg data is still available in Cloud Storage with a small delay.</p><h3>16. Other considerations and best practices</h3><p>Here are a few best practices not covered.</p><h4>16.1. Capacity considerations</h4><p>The following are quotas that need to be managed:<br>a) <a href="https://cloud.google.com/dataproc-serverless/quotas">Managed Spark API quota<br></a>b) <a href="https://cloud.google.com/compute/quotas">Compute quota<br></a>c) <a href="https://cloud.google.com/logging/quotas">Cloud Logging quota<br></a>d) <a href="https://cloud.google.com/monitoring/quotas">Cloud Monitoring quota<br></a>e) <a href="https://cloud.google.com/storage/quotas">Cloud Storage quota<br></a>f) Subnet size — adequate IP address space.<br>To recap, a driver and executor — each require an IP address.</p><p>Size your applications, factor in cushion for growth, request quota increase for the region you run your batch jobs in.</p><h4>16.2. Customizing compute shapes</h4><p>Customizing compute shares is via spark properties. For anything super-specific, reach out to your Google account team or message me and we can help you.</p><h4>16.3. Scalability limits</h4><p>Fig 16.3: Scalability limit of a batch job</p><p>A single batch job can scale to have 32,000 cores and 400 TB of RAM. We support upto 24 GB RAM per core.</p><h4>16.4. Security</h4><ol><li>Spark Drivers and executors run as non-root inside of containers — better auditability</li><li>There is no SSH access supported and therefore no root access</li><li>Spark RPC encryption is enabled automatically. An attacker snooping on the network would only see encrypted RPC traffic</li><li>Spark authentication via shared secret is enabled automatically. An attacker running a VM on the same network cannot join the cluster</li><li>Firewall rules are configured to restrict access to Spark web UIs. An attacker running a VM on the same network cannot access those web UIs.</li><li>Infrastructure does not have public IP</li><li>Storage service interactions are over Google backbone</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IVZref-faETQJ2E60frVLg.png" /><figcaption>Fig 16.4. Security best practices</figcaption></figure><h4>16.5. Observability</h4><p><strong>1. Logging</strong>: <br>Logs are routed by default to Cloud Logging; Consider routing logs to BigQuery for advanced analytics of logs (BigSearch, advanced Json features, SQL based analytics etc)</p><p><strong>2. Monitoring</strong>: <br>The on-demand Spark Monitoring UI allows you to monitor and debug workloads without managing a Persistent History Server. Logs, metrics, and query execution plans from the Spark UI are also integrated with development environments, including BigQuery Studio, Jupyter, and Antigravity, VS Code. Consider creating monitoring dashboards in Cloud Monitoring for custom use cases.</p><p><strong>3. Troubleshooting: </strong>Use Gemini Cloud Assist, for actionable recommendations for slow or failed jobs, based on the context of common Spark failure scenarios, logs, and metrics. [d<a href="https://docs.cloud.google.com/dataproc-serverless/docs/guides/monitor-troubleshoot-batches#troubleshoot_workloads_from_the_console">ocs</a>]</p><p><strong>4. Alerting: </strong>Consider alerting by applying filters in Cloud Logging based on requirements, and route to pre-configured alert channels (slack/email/SMS etc)</p><h4>16.6. Connectors</h4><p>High performance, first class, Spark (version) compatible connectors for Cloud Storage and BigQuery are baked into the default image of serverless Managed Spark. If you are going with the default image, avoid specifying Cloud Storage and BigQuery connector coordinates/jars.</p><h4>16.7. Storage tiers</h4><ul><li>Based on your workload performance SLO, consider choosing the right storage tier/BigQuery SKU</li><li>Use regional storage buckets for data associated with applications having standard business SLAs, and dual regional buckets for critical applications</li><li>Storage features are covered in my <a href="https://medium.com/google-cloud/lakehouse-demystified-part-1-just-enough-about-the-lakehouse-stack-on-google-cloud-02529daa52af">Lakehouse introductory blog post</a> in section 3.1.</li></ul><h4>16.8. Development environments</h4><p>Install the <a href="https://github.com/GoogleCloudPlatform/lakehouse-solutions/blob/main/solutions/spark-serverless-quickstart/lab-manuals/ts2-manual.md#44-execute-a-spark-notebook-in-vs-code-on-your-machine-after-installing-google-cloud-data-agent-kit-extension-dak">Data Agent Kit</a> in your favorite IDE. This has integrations for ‘Managed Spark’ and also offers Spark notebooks, Airflow pipeline authoring and more. The hands on lab in the next blog post covers installation of Data Agent Kit.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/861/1*PHK1lBb75-i810Ru6bt_7w.png" /><figcaption>Fig 16.8: Data Agent Kit — pictorial overview</figcaption></figure><h4>16.9. Performance best practices</h4><ol><li>Autoscaling (horizontal) is enabled by default; Configure guardrails such as time-to-live for your Managed Spark Serverless batch jobs &amp; max executors (spark.dynamicAllocation.maxExecutors)</li><li>Enable <a href="https://docs.cloud.google.com/dataproc-serverless/docs/guides/lightning-engine#enable_lightning_engine">Lightning Engine (GA)</a> for multi-layer Spark optimizations from query planning, to vectorized query execution, to optimized I/O.</li><li>Consider the premium tier compute when your workload can benefit from SSDs, or from accelerated compute (CPU/GPU), or if you want to use lightning engine</li><li>Consider GPUs when your workload can benefit from hardware acceleration — carefully study if the Spark features in your workload can take advantage of GPU acceleration</li><li>Consider storage tiers for performance</li><li>Enable <a href="https://cloud.google.com/dataproc-serverless/docs/concepts/autotuning">autotuning</a> for history-based optimization of similar jobs.</li><li>Additional <a href="https://cloud.google.com/blog/products/data-analytics/tune-spark-properties-to-optimize-dataproc-serverless-jobs">tuning</a> (blog post)of Spark properties is also supported for advanced use cases.</li></ol><h4>16.10. Availability best practices</h4><p>As a technology, Apache Spark offers fault tolerance out of the box across the numerous services under the hood and for Spark tasks.</p><p>However, from an application point of view, for example, a pipeline of Managed Spark Serverless batches, each serverless batch is a zonal deployment and if the GCP zone fails, the results of the pipeline with Spark batches will not be available. (we are improving intra-region resiliency — more to come)</p><p>Depending on the availability requirement of your application, consider different availability architectures such as the ones below and design your application architecture accordingly-</p><p><strong>Active-Active</strong> =&gt; Dual ingest, dual process with periodic sync checks, with both regions available to serve users. No RTO</p><p><strong>Active-Standby</strong> =&gt; Dual ingest, dual process with periodic sync checks, with only primary region available to serve users the results, Lower RTO.</p><p><strong>Active-OnDemand DR</strong> =&gt; Replicate raw source datasets and only the pipeline results (data in storage) to DR region, along with code and config deployments; Stand up Managed Airflow Service only in the event of an outage and run your Spark pipelines. Highest RTO</p><h4>16.11. Supportability best practices</h4><p>Besides standard best practices for supportability, here are a few-</p><p><strong>1. Naming: </strong>Use custom names for batches to simplify support.</p><p><strong>2. Pipelines: </strong>Design to recover from point of failure</p><p><strong>3. Labels:</strong> Use labels where applicable</p><p><strong>3. Diagnostics:</strong> Set the ‘dataproc.diagnostics.enabled’ to true to auto-generate the diagnostic bundle. The Managed Spark Serverless engineering team will need this to troubleshoot.</p><ul><li>Use the ‘gcloud batches describe’ command to get the ‘diagnosticUri’ field which points to diagnostic tarball</li><li>Type the value using ‘gsutil cat’ to get the location of the tar ball</li><li>The output will show the location of the tar ball as well as instructions for sharing with support (see example <a href="https://docs.google.com/presentation/d/14wmkm8hGmXh6MRW3EHVOwMd7ogw5_YQ9p9R7Ctt67TY/edit#slide=id.g3ac8526fd3a_0_3691">here</a>)</li></ul><h4>16.12. Cost best practices</h4><ol><li>Tune your Spark jobs to run faster to reduce costs</li><li>Set “Time-To-Live” to terminate non-critical, long running jobs if budget constrained</li><li>Configure guardrails on executors — max executors (spark.dynamicAllocation.maxExecutors)</li><li>Add <a href="https://cloud.google.com/dataproc/docs/guides/creating-managing-labels">labels </a>to each Serverless Spark batch for billing/chargeback. Upto 64 labels are supported. (just include — labels ‘key=value’ to the gcloud batch submit command)</li><li>Set alerts from Cloud Monitoring to capture and manually kill runaway jobs or automate</li><li>Consider using more than 1 label for granular cost tracking, and export to BigQuery, and parse, analyze, report with the grain needed</li><li>Consider creating spend dashboards with Looker Studio or your preferred dashboarding tool as needed</li></ol><h3>17. Quickstart Sample</h3><p>Please refer the complementary quickstart sample with just enough Managed Spark Serverless -<br><a href="https://github.com/GoogleCloudPlatform/lakehouse-solutions/blob/main/solutions/spark-serverless-quickstart/lab-manuals/ts1-manual.md">https://github.com/GoogleCloudPlatform/lakehouse-solutions/blob/main/solutions/spark-serverless-quickstart/lab-manuals/ts1-manual.md</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/946/1*c6IseJnDl5dzI8cwjSdcrQ.png" /><figcaption>Fig 17.1: Serverless Spark quickstart</figcaption></figure><h3>18. Credits</h3><p>Special thanks to Igor Dvorzhak, Technical Engineering Lead for Managed Spark Serverless for his review and input to make this blog post comprehensive, and current.</p><h3>19. What’s next</h3><p>I hope this was useful. Here are a few other related blog posts.</p><p>Lakehouse Demystified blog series-<br><a href="https://medium.com/google-cloud/lakehouse-demystified-part-1-just-enough-about-the-lakehouse-stack-on-google-cloud-02529daa52af">Part 1: Introduction to Lakehouse on Google Cloud</a><br>Part 2: Just enough about Managed service for Apache Spark — serverless batches (this blog)<br><a href="https://medium.com/@c_a_c_t_u_s/9a57a99a678a">Part 3: Just enough about Managed service for Apache Spark — serverless interactive sessions for Spark notebooks</a><br><a href="https://medium.com/google-cloud/lakehouse-demystified-part-4-just-enough-about-lakehouse-runtime-catalog-ea489cb1d19d">Part 4: Just enough about Lakehouse runtime catalog for Apache Iceberg and Hive</a><br>Part 5: Just enough about Managed service for Apache Airflow for lakehouse pipeline orchestration<br>Part 6: Just enough about performance optimization with Managed service for Apache Spark<br>Part 7: Just enough about machine learning, generative AI and agents on the Lakehouse on Google Cloud<br>Part 8: Just enough about Apache Iceberg table interoperability between Apache Spark and BigQuery<br>Part 9: Just enough about Managed service for Apache Spark clusters</p><p>And more to come..</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6ac3e5051794" width="1" height="1" alt=""><hr><p><a href="https://medium.com/google-cloud/lakehouse-demystified-part-2-just-enough-managed-spark-serverless-on-google-cloud-for-batch-6ac3e5051794">Lakehouse Demystified — Part 2: Just Enough Managed Spark Serverless on Google Cloud for batch…</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[Lakehouse Demystified — Part 3: Just enough about Spark notebooks powered by Google’s Managed…]]></title>
            <link>https://medium.com/google-cloud/lakehouse-demystified-part-3-just-enough-about-spark-notebooks-powered-by-googles-managed-9a57a99a678a?source=rss-c3fd47c9a471------2</link>
            <guid isPermaLink="false">https://medium.com/p/9a57a99a678a</guid>
            <category><![CDATA[apache-spark]]></category>
            <category><![CDATA[data]]></category>
            <category><![CDATA[google-cloud-platform]]></category>
            <category><![CDATA[managed-spark-service]]></category>
            <category><![CDATA[data-lakehouse]]></category>
            <dc:creator><![CDATA[Anagha Khanolkar [Google]]]></dc:creator>
            <pubDate>Thu, 30 Apr 2026 22:42:59 GMT</pubDate>
            <atom:updated>2026-06-08T14:32:44.076Z</atom:updated>
            <content:encoded><![CDATA[<h3><strong>Lakehouse Demystified — Part 3: Just enough about Spark notebooks powered by Google’s Managed Service for Apache Spark — serverless interactive sessions</strong></h3><p>Welcome to Part 3 of the <strong>Lakehouse Demystified</strong> blog series — a practical guide to Lakehouse on Google Cloud. My goal is to share an <strong>opinionated architectural perspective</strong> rooted in practical experience, providing depth and implementation-ready clarity through reference architectures, best practices, and minimum viable code. This series is created for <strong>lakehouse practitioners</strong> and <strong>future-state builders</strong> — the architects and engineers striving to master the “art of the possible” on Google Cloud while cutting through the noise of information overload.</p><p>The focus of my <a href="https://medium.com/@c_a_c_t_u_s/6ac3e5051794"><strong>previous blog post</strong></a> was lakehouse engines and covered Managed service for Apache Spark — <strong>serverless batches</strong>. This blog post features Managed service for Apache Spark <strong>— serverless interactive sessions</strong> that power Spark notebooks. It includes complementary minimum viable notebook samples.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/908/1*7jrBIkt2mpSQ_2XwJjCwzQ.png" /><figcaption>Fig 1: Lakehouse stack on Google Cloud</figcaption></figure><p>Spark notebooks on Google Cloud are powered by interactive sessions on Managed Service for Apache Spark. Lets recap salient features of this service from my previous blog post.</p><h3>1. Recap of serverless Managed Service for Apache Spark</h3><p>As the name implies, this deployment mode offers a managed Spark experience without having to deal with Spark clusters. Further, you only pay for the execution time of your Spark job. And there are optional optimizations that can make your Spark jobs run faster than open source Apache Spark. This eliminates operational toil and reduces tuning toil, accelerating speed to delivery.</p><p><a href="https://docs.cloud.google.com/dataproc-serverless/docs/overview">Serverless Managed Service for Apache Spark</a> comes in two deployment modes —<strong> interactive serverless spark</strong> and <strong>serverless Spark batch</strong>.</p><p>The ‘<a href="https://docs.cloud.google.com/dataproc-serverless/docs/overview#batch_workloads"><strong>serverless</strong> <strong>batch</strong></a><strong>’ </strong>deployment mode, allows you to submit batch Spark workloads, without having to deal with Spark infrastructure management and maintenance and offers a variety of configurations for performance and cost optimization.</p><p>Notebooks are immensely popular for data analysis, data engineering development and data science experimentation. The <a href="https://docs.cloud.google.com/dataproc-serverless/docs/overview#interactive_sessions"><strong>interactive serverless</strong> <strong>Spark</strong></a> deployment mode (also referred to as sessions) is primarily under the hood of Spark notebooks (with options of<a href="https://spark.apache.org/docs/latest/spark-connect-overview.html"> <strong>Spark Connect</strong></a> or <strong>remote</strong> <strong>Jupyter</strong> <strong>kernels </strong>for Spark).</p><p>Google Cloud offers <strong>first class Spark notebook support for PySpark</strong> with options of Colab notebooks in BigQuery Studio, notebooks on Gemini Enterprise Agent Platform Workbench (formerly called Vertex AI Workbench), notebooks in IDEs via the Data Agent Kit extension (announced at NEXT 26) and Bring Your Own (BYO) Jupyter.</p><p>Once again, the focus of this blog post is serverless Managed Service for Apache Spark<strong> — ‘interactive sessions’</strong> deployment mode.</p><h3><strong>2. About serverless interactive sessions</strong></h3><p>An <strong>‘interactive session’</strong> on Managed Service for Apache Spark is a <strong>no-setup, abstracted out, auto-scaling Spark environment </strong>for authoring and running code <strong>interactively via notebooks. </strong>Interactive sessions can be used in Spark notebooks with <a href="https://spark.apache.org/docs/latest/spark-connect-overview.html"><strong>Spark Connect</strong></a> or with <strong>remote Spark kernels on Jupyter.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/923/1*eiGomEhl9rZec4xBE-fWnA.png" /><figcaption>Fig 2: Spark notebooks with serverless managed interactive Spark sessions</figcaption></figure><p>To simplify the process of configuring interactive sessions, there is a feature called <strong>session template.</strong></p><h3>3. About interactive session templates</h3><p><a href="https://docs.cloud.google.com/dataproc-serverless/docs/guides/create-serverless-sessions-templates"><strong>Session templates</strong></a> are common configurations that can be defined and persisted. Interactive spark sessions can be created based off of the configuration in the session template. This promotes consistency, and improves productivity by minimizing the repeated common configuration setting by data engineers and data scientists across notebooks. Session templates can be created via the service <a href="https://docs.cloud.google.com/dataproc-serverless/docs/guides/create-serverless-sessions-templates#console">console</a>, <a href="https://docs.cloud.google.com/sdk/gcloud/reference/beta/dataproc/session-templates">gcloud</a> , <a href="https://docs.cloud.google.com/dataproc-serverless/docs/guides/create-serverless-sessions-templates#rest">API</a>, and <a href="https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/dataproc_session_template">Terraform</a>. Creation of templates is covered further on in this post.</p><h3><strong>4. Notebook platforms &amp; IDE support for serverless interactive sessions</strong></h3><h4><strong>4.1. Google Cloud</strong></h4><p>The following are supported notebook platforms for interactive sessions:<br>- Colab in BigQuery Studio<br>- Gemini Agent Platform workbench</p><h4><strong>4.2. BYO Jupyter</strong></h4><p>You can also Bring Your Own (BYO) Jupyter and use it with interactive sessions.</p><h4><strong>4.3. IDEs</strong></h4><p>There is also notebook support for IDEs via the <strong>Data Agent Kit </strong>extension Google Cloud plugin</p><p>All of these are covered in the complementary hands on lab — details further on in this blog post.</p><h3><strong>5. Applicability of the features of serverless batches to interactive sessions</strong></h3><p>If you read my <a href="https://medium.com/@c_a_c_t_u_s/6ac3e5051794">previous blog</a>, you might be wondering if all that you read about serverless Spark batches that was foundational also applies to serverless Spark sessions, the answer is yes except for the submission construct and completion.</p><p>With interactive sessions, it’s not about firing a job and being done. You use it via a notebook, and are interacting with the notebook until you exit the notebook or the interactive session dies based on Time To Live (TTL) configuration.</p><h3>6. Practitioner lens — customizing the interactive sessions</h3><p>If you are used to working on notebooks, you would first want to know: <br>(1) what languages are supported, <br>(2) what versions of Spark are supported, <br>(3) are there flavors of runtimes based on workload type, <br>(4) how to download packages, <br>(5) what metastore to use, <br>(6) how to view the interactive sessions &amp; Spark UI, <br>(7) what customizations are possible, <br>(8) how to monitor the interactive session, <br>(9) what is the resource manager and is there potential for resource contention, <br>(10) can you use the same session across multiple notebooks, and <br>(11) how do I connect my notebook to interactive sessions…<br>(12) how to use a templated interactive session<br>(13) what runs locally versus Spark compute across Jupyter Spark kernel and Spark Connect<br>(14) what is this auto-termination of an interactive session? What deems an interactive session as idle?<br>(15) How to see the Managed Service for Apache Spark interactive session details?</p><p>Let’s cover these first…</p><h4>6.1. Language support</h4><p>Pyspark is supported and where Google Cloud is strategically investing.</p><h4>6.2. Spark versions</h4><p>Same as <a href="https://medium.com/@c_a_c_t_u_s/6ac3e5051794">serverless batches covered in my previous blog post</a>. There is the serverless `<a href="https://docs.cloud.google.com/dataproc-serverless/docs/concepts/versions/dataproc-serverless-versions">runtime</a>` construct. And the runtime has compatible versions of Spark and other related software bundled. The runtime can be supplied as a configuration to the spark session builder construct.</p><h4>6.3. Machine learning versus Data Engineering runtimes</h4><p>There is no differentiation in the runtime based on workloads — batch and interactive. It’s exactly the same as runtime for serverless batches — there is the serverless `<a href="https://docs.cloud.google.com/dataproc-serverless/docs/concepts/versions/dataproc-serverless-versions">runtime</a>` construct that can be supplied as a spark session configuration if you don’t want the default version. Popular machine learning libraries are baked into the default image.</p><h4>6.4. Managing package dependencies (PyPi)</h4><p>For Jupyter remote kernels, you can do a !pip installand it will install on driver and spark nodes. For Spark Connect, you need to run !pip install for the driver and to install dependencies on Spark nodes ( for executors) you need to use spark.addArtifacts method detailed [here](<a href="https://github.com/GoogleCloudDataproc/dataproc-spark-connect-python/blob/c6636e18c3ee98be463a2f4dbbe19bfe64d76cf0/tests/integration/test_session.py#L392">https://github.com/GoogleCloudDataproc/dataproc-spark-connect-python/blob/c6636e18c3ee98be463a2f4dbbe19bfe64d76cf0/tests/integration/test_session.py#L392</a>).</p><h4><strong>6.5. Metastore/Catalog</strong></h4><p>Exactly the same as <a href="https://medium.com/@c_a_c_t_u_s/6ac3e5051794">serverless batches covered in my previous blog post</a>. The catalog to use is the Lakehouse runtime catalog that currently comes in two flavors — Iceberg REST catalog (GA). and Hive catalog (preview).</p><h4><strong>6.6. Interactive Sessions UI, Spark UI &amp; gcloud command support</strong></h4><p>For the sessions listing, description and more, there are <a href="https://docs.cloud.google.com/sdk/gcloud/reference/beta/dataproc/sessions/create">`gcloud` commands</a>. Figure 6.6a shows the Interactive Sessions UI, and Figure 6.6b shows the session details.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/944/1*KgCcnOUg9vECJue10bGU5g.png" /><figcaption>Fig 6.6a: Interactive Sessions UI</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PgnT-77skAkbxVDDYzzCdg.png" /><figcaption>Fig 6.6b: Interactive Sessions UI</figcaption></figure><h4><strong>6.7. Customizations</strong></h4><p>Customizations work exactly like with serverless batches. You can configure spark properties, and you can use a custom image where appropriate.</p><h4><strong>6.8. Monitoring</strong></h4><p>In the sessions UI, there is one monitoring tile, compared to several in the batches UI.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/918/1*Nk079siGWSK5HWQKaoSd9w.png" /><figcaption>Fig 6.8: Monitoring tile</figcaption></figure><h4>6.9. Resource manager and Spark compute resource contention</h4><p>Serverless Spark has an abstracted out bespoke Resource Manager service specifically designed to provide best in class efficiency, scalability and reliability for serverless Spark workloads.</p><p>Each serverless Spark workload uses dedicated not shared compute resources for industry-leading isolation and security.</p><h4><strong>6.10. Reusability of same session across multiple notebooks</strong></h4><p>This is supported with Jupyter to avoid latency from session start up and it’s a tradeoff — there can be resource contention and performance impact. You have to manually create the interactive session with the <a href="https://docs.cloud.google.com/sdk/gcloud/reference/beta/dataproc/sessions/create">gcloud command</a> then connect notebooks to it.</p><h4><strong>6.11. Connecting to interactive sessions from a notebook</strong></h4><p>It’s just the lines of code shown below. I have covered all supported notebook flavors in the complementary hands-on lab. Details on DataprocSparkSession.builder from the code below are available h<a href="https://github.com/GoogleCloudDataproc/dataproc-spark-connect-python#builder-configuration">ere</a></p><pre>from google.cloud.dataproc_spark_connect import DataprocSparkSession<br>from google.cloud.dataproc_v1 import Session<br><br># This will create a default Spark session<br>spark = DataprocSparkSession.builder.getOrCreate()<br><br># If you would like to customize the Spark session, please refer to the<br># documentation at https://cloud.google.com/bigquery/docs/use-spark<br>#<br># For example, if you need to use a different subnetwork, use the code below<br># from google.cloud.dataproc_v1 import Session<br># session = Session()<br># session.environment_config.execution_config.subnetwork_uri = &quot;&lt;subnetwork_name&gt;&quot;<br># spark = DataprocSparkSession.builder.dataprocSessionConfig(session).getOrCreate()<br></pre><h4>6.12. Connecting to a templated interactive session from a notebook</h4><p>It’s just the lines of code shown below. I have covered all supported notebook flavors in the complementary hands-on lab. Again, you can see other options in te documentation for <a href="https://github.com/GoogleCloudDataproc/dataproc-spark-connect-python#builder-configuration">DataprocSparkSession builder</a>.</p><pre>from google.cloud.dataproc_spark_connect import DataprocSparkSession<br>from google.cloud.dataproc_v1 import Session<br><br>PROJECT_ID_LIST=!gcloud config list --format &quot;value(core.project)&quot; 2&gt;/dev/null<br>PROJECT_ID=PROJECT_ID_LIST[0]<br>LOCATION=&quot;us-central1&quot;<br>PREDEFINED_INTERACTIVE_SESSION_TEMPLATE_NAME = &quot;sparkconnect-service-account-template&quot;<br><br># Create the Spark session.<br>spark = (<br>  DataprocSparkSession.builder<br>    .appName(&quot;Chicago Crimes Analysis&quot;)<br>    .sessionTemplate(f&quot;projects/{PROJECT_ID}/locations/{LOCATION}/sessionTemplates/{PREDEFINED_INTERACTIVE_SESSION_TEMPLATE_NAME}&quot;)<br>    .getOrCreate()<br>)<br></pre><h4>6.13. What runs in notebook versus on the Spark compute?</h4><p>Spark Connect: the driver runs on the local machine (client mode). Any directories, files created will be local to the platform running Spark Connect.</p><p>Jupyter Spark kernel: the driver runs on a worker node (cluster mode). Any directories and files created will be on the cluster on the Spark worker node where the driver runs.</p><h4>6.14. What about session termination?</h4><p>For Spark Connect, a Spark compute job needs to run in the notebook to keep the interactive session from auto-termination. Plain Python commands such as sleep will not prevent interactive session from auto-termination.</p><p>For Jupyter Spark kernel solution, any interaction with the notebook, Spark or otherwise, will keep the Managed Service for Apache Spark interactive session alive.</p><h4>6.15. How to see the Managed Service for Apache Spark interactive session details?</h4><pre>`gcloud beta dataproc sessions describe SESSION_ID \<br>    --region=REGION`</pre><h3>7. [Recap] Architecture</h3><h4>7.1. Serverless Managed Service for Apache Spark — integration landscape</h4><p>My previous b<a href="https://medium.com/p/6ac3e5051794">log post</a> explains this integration landscape.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/948/1*-Q3_O0mBEAyZvp3gXvqjJA.png" /><figcaption>Fig 7.1: Integration landscape of serverless Managed Spark</figcaption></figure><h4>7.2. Reference architecture</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/982/1*zf4GFT3hIFf92J_6IX3hEg.png" /><figcaption>Fig 7.2: Reference architecture for serverless Managed Service for Apache Spark</figcaption></figure><p>(1) Serverless Managed Apache Spark is a VPC native service. <br>(2) For Spark batch pipelines including notebooks, the orchestration solution is Managed Apache Airflow — Serverless. <br>(3) The runtime metadata catalog is Lakehouse runtime catalog (LRC). <br>(4) Table registrations into the LRC, will register entries into the business metadata catalog — Knowledge Catalog automatically. <br>(5) Logs are automatically routed to Cloud Logging but can optionally also be written to Cloud Storage (if you want to use Persistent Spark History Server). <br>(6) The Spark UI is managed and serverless. <br>(7) Lakehouse storage is Cloud Storage with data in table formats as we progress in the <a href="https://www.databricks.com/blog/what-is-medallion-architecture">medallion architecture</a>. Gold/consumption layer can be table format in Cloud Storage, or can be BigQuery (recommended). <br>(8) Serverless Managed Apache Spark can be bootstrapped with a custom container in Google Artifact Registry — container with libraries/proprietary software as needed. <br>(9) There are monitoring tiles in the Managed Spark Serverless UI. <br>(10) Alerting can be configured. <br>(11) Vertex AI Model Registry supports Spark models and Gemini Agent Platform pipelines (formerly called Vertex AI pipelines) offer first class serverless Managed Apache Spark Kubeflow operators for MLOps pipelines.</p><h3>8. Creating interactive sessions templates</h3><p>You can create Spark Connect or Jupyter templates. Here is an illustration of how to create the template from the Managed Service for Apache Spark UI on the <a href="https://console.cloud.google.com/">Cloud Console.</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PdPP2DGyvTNlMSfr-r4JQA.png" /><figcaption>Fig 8a: Navigate to the Managed Service for Apache Spark on the Cloud Console</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/553/1*fH8Ml2_cU9ADbgErM2Kpvg.png" /><figcaption>Fig 8b: Session templates on the service UI</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/758/1*lXKKGZjkla878DLo5X8tJQ.png" /><figcaption>Fig 8c: Create template</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/615/1*Jvq7KZDB5pwRU11Ex3q-9A.png" /><figcaption>Fig 8d: Spark Connect PySpark template with service account</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/761/1*pFkuPci2KfuwDpLy64FmAA.png" /><figcaption>Fig 8e: Spark Connect template configs in entirety</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/701/1*jzvFvN_veWsQ6BUVV07gug.png" /><figcaption>Fig 8f: Jupyter sessions template</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/684/1*GwejYxbi2NFe_Da4U3RjTw.png" /><figcaption>Fig 8g: Guardrails you can set</figcaption></figure><p>Now that we know how to create session templates, lets try out the templates on the various supported notebook solutions/platforms.</p><h3>9. Interactive Spark sessions from Colab notebooks — what’s involved</h3><p>The complementary <a href="https://github.com/GoogleCloudPlatform/lakehouse-solutions/blob/main/solutions/spark-serverless-quickstart/lab-manuals/ts2-manual.md"><strong>hands-on lab</strong></a> covers <a href="https://docs.cloud.google.com/bigquery/docs/use-spark">how to use interactive sessions in Colab notebooks</a>.</p><p>Here are the key points.</p><h4><strong>9.1. Creating a notebook in Colab</strong></h4><p>Colab gives you a new notebook with just enough code to connect to interactive sessions. Navigate to BigQuery studio and click on the ‘Notebook with Spark’ link.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BZwwm8up-IUSgpVAk5q8CQ.png" /><figcaption>Fig 9.1a: Create new Spark notebook</figcaption></figure><p>This opens a new notebook with the following in the first cell.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qfDq1rQd7IkizXugPMfRmw.png" /><figcaption>Fig 9.1b: Interactive sessions configuration</figcaption></figure><p>When you execute this cell, it launches a new interactive session on Managed Service for Apache Spark — interactive sessions.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lC1S5o_7pniLbPmq8EFwRw.png" /><figcaption>Fig 9.1c: Interactive sessions UI</figcaption></figure><h4><strong>9.2. Updating an existing notebook to work on Colab with interactive sessions</strong></h4><p>Upload the notebook to BigQuery Studio, and just update the spark session creation as shown in section 6.11 and 6.12. This is covered in the complementary hands-on lab.</p><h4><strong>9.3. Using a sessions template in Colab notebooks</strong></h4><p>Here is how you specify a sessions template as part of spark session creation.</p><pre>from google.cloud.dataproc_spark_connect import DataprocSparkSession<br>from google.cloud.dataproc_v1 import Session<br><br>PROJECT_ID_LIST=!gcloud config list --format &quot;value(core.project)&quot; 2&gt;/dev/null<br>PROJECT_ID=PROJECT_ID_LIST[0]<br>LOCATION=&quot;us-central1&quot;<br>PREDEFINED_INTERACTIVE_SESSION_TEMPLATE_NAME = &quot;sparkconnect-service-account-template&quot;<br><br># Create the Spark session.<br>spark = (<br>  DataprocSparkSession.builder<br>    .appName(&quot;Chicago Crimes Analysis&quot;)<br>    .sessionTemplate(f&quot;projects/{PROJECT_ID}/locations/{LOCATION}/sessionTemplates/{PREDEFINED_INTERACTIVE_SESSION_TEMPLATE_NAME}&quot;)<br>    .getOrCreate()<br>)</pre><p>Try out/read the complementary <a href="https://github.com/GoogleCloudPlatform/lakehouse-solutions/blob/main/solutions/spark-serverless-quickstart/lab-manuals/ts2-manual.md">hands-on lab</a> for an immersive learning experience.</p><h3>10. Spark notebooks in VS Code powered by interactive Spark sessions</h3><p>At Cloud NEXT 2026, the <a href="https://marketplace.visualstudio.com/items?itemName=GoogleCloudTools.datacloud"><strong>Data Agent Kit</strong></a><strong> extension</strong> was announced. You can install the Data Agent Kit (DAK) extension in VS Code, sign on to Google Cloud and run an existing notebook or create a new notebook in the IDE. The complementary <a href="https://github.com/GoogleCloudPlatform/lakehouse-solutions/blob/main/solutions/spark-serverless-quickstart/lab-manuals/ts2-manual.md">hands-on lab</a> covers this.</p><h4>10.1. Install the Data Agent Kit extension for VS Code</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/981/1*RAhZ67kQn5w_22I-OA-dHg.png" /><figcaption>Fig 10.1a: Finding the DAK in the marketplace</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/693/1*Pmy9f_dLF3rlsWb7Q_r_ww.png" /><figcaption>Fig 10.1b: Finding &amp; installing the DAK in the marketplace</figcaption></figure><h4>10.2. Login to Google Cloud</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/612/1*F0GM2m4hcZq9D5I8I1O9Pg.png" /><figcaption>Fig 10.2: Login to Google Cloud from the DAK</figcaption></figure><h4>10.3. Configure your Google Cloud project</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/843/1*PnuIAFqMKkBjt64uvbiA5g.png" /><figcaption>Fig 10.3a: Configure your GCP project</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/993/1*aknv_U0Wxvxu3z830AKZjA.png" /><figcaption>Fig 10.3b: Configure your GCP project</figcaption></figure><h4>10.4. Open a Spark notebook and execute it</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1VegLYc7RGom9BNt8pYz7g.png" /><figcaption>Fig 10.4: VS Code Jupyter kernel</figcaption></figure><h4>10.5. Select a remote kernel based off of the session template</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/782/1*aBTTBCxZ6zWm29hGEDsf1Q.png" /><figcaption>Fig 10.5a: VS Code — select Spark kernel based off of session template</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-1G2ILwkZatWHGLOnFfBRw.png" /><figcaption>Fig 10.5b. Interactive session start up</figcaption></figure><h4>10.6. An interactive session is created</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/843/1*MFdARyLVAVPrwaSH01I-3A.png" /><figcaption>Fig 10.6. Interactive session launching in the Managed Service for Apache Spark — interactive sessions UI</figcaption></figure><h4>10.7. Run the Spark notebook</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1022/1*0ICx7Tg7m_-aBGz2xulJXg.png" /><figcaption>Fig 10.7a. Run the notebook</figcaption></figure><h4>10.8. Spark monitoring within the notebook</h4><p>You can look at the jobs and stages in the notebook, without having to jump to the Cloud Console for Managed Service for Apache Spark — Serverless Sessions UI.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hdX46FfAO2kC2QwCvyzBJw.png" /><figcaption>Fig 10.8: Spark monitoring in notebook with Data Agent Kit in VS Code</figcaption></figure><h4>10.9. Session templates within IDE</h4><p>The Data Agent Kit displays the interactive sessions and details.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2fFenLpMgUeoG6x7dcVLKQ.png" /><figcaption>Fig 10.9: Interactive Session details in IDE made possible by Data Agent Kit</figcaption></figure><h4>10.10. Creating Spark notebooks with DAK</h4><p>VS Code with the DAK extension offers the ability to create Spark notebooks. The following illustrates the steps to get up and running with a new Spark notebook.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/508/1*cgFgkVINDAIaO87bZ6tw_Q.png" /><figcaption>Fig 10.10a. New Spark notebook with DAK on VS Code</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/671/1*X5oAownbCDndN3-k-eb5_A.png" /><figcaption>Fig 10.10b. Kernel selection</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/559/1*mULMzlKp5XTj4kwOXV3NGw.png" /><figcaption>Fig 10.10c. Notebook choices</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/602/1*4isTZ8HrOJwa2hOtQjUXFA.png" /><figcaption>Fig 10.10d. Template selection</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/933/1*fruGlTakAEYMn1tUE-Rkfg.png" /><figcaption>Fig 10.10e. Notebook is good to go</figcaption></figure><p>Lets look at another notebook platform.</p><h3>11. Spark notebooks on Gemini Enterprise Agent Platform Workbench instance powered by interactive Spark sessions</h3><p>This is straight off of the public docs-<br><em>Gemini Enterprise Agent Platform Workbench instances are Jupyter notebook-based development environments for the entire data science workflow. You can interact with Gemini Enterprise Agent Platform and other Google Cloud services from within a Agent Platform Workbench instance’s Jupyter notebook.</em></p><p><em>Agent Platform Workbench integrations and features can make it easier to access your data, process data faster, schedule notebook runs, and more.</em></p><p><em>Agent Platform Workbench instances are prepackaged with </em><a href="https://jupyterlab.readthedocs.io/en/stable/getting_started/overview.html"><em>JupyterLab</em></a><em> and have a preinstalled suite of deep learning packages, including support for the TensorFlow and PyTorch frameworks. You can configure either CPU-only or GPU-enabled instances.</em></p><p>The complementary <a href="https://github.com/GoogleCloudPlatform/lakehouse-solutions/blob/main/solutions/spark-serverless-quickstart/lab-manuals/ts2-manual.md"><strong>hands-on lab</strong></a> covers how to stand up a Gemini<em> </em>Enterprise Agent Platform Workbench instance, with an interactive sessions template for Jupyter and author Spark code at scale in a notebook.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DbDwHzADXXqiMcn35u8G9A.png" /><figcaption>Fig 11.1: GEAP Workbench</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FlqFYF-qWLJcGd88JIkAkA.png" /><figcaption>Fig 11.2: Pick a kernel after creating a notebook or opening an existing one</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RBLW9FfkWbovNaZIak9Pgg.png" /><figcaption>Fig 11.3: Kernel is ready</figcaption></figure><p>Once the kernel is ready, you can run your notebook. Needless to say, there is an interactive sessions visible in the Managed Service for Apache Spark — interactive sessions UI.</p><p>Finally, lets look at Bring Your Own Jupyter.</p><h3>12. Spark notebooks on local BYO Jupyter</h3><p>Some customers/engineers choose to run local notebook environments, Google Cloud offers a<a href="https://docs.cloud.google.com/bigquery/docs/jupyterlab-plugin"> Jupyterlab plugin</a>. This is covered in the <a href="https://github.com/GoogleCloudPlatform/lakehouse-solutions/blob/main/solutions/spark-serverless-quickstart/lab-manuals/ts2-manual.md">hands-on lab</a>.</p><p>In three commands you can install JupyterLab and the plugin in your virtual environment and be up and running.</p><pre>pip install jupyterlab<br>pip install bigquery-jupyter-plugin<br>jupyter lab</pre><p>In the Jupyter ‘Launcher’ you will see the session template. If you click on it, it will launch a new notebook and start the interactive session creation.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wbrZuBKeHURMhrunfho9Ng.png" /><figcaption>Fig 12.1. BYO Jupyter launcher</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Qi_4fI9srUUCy2jW3gp_bA.png" /><figcaption>Fig 12.2. Notebook with active interactive session</figcaption></figure><p>Now that you know just enough about servreless Managed Spark interactive sessions…</p><h3>13. Roll up your sleeves and give it a go</h3><p>Try the <a href="https://github.com/GoogleCloudPlatform/lakehouse-solutions/blob/main/solutions/spark-serverless-quickstart/lab-manuals/ts2-manual.md">hands-on lab</a>, or just read the hands-on lab like a book, it it’s rich with visuals.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1013/1*t4TELKyvLzfoleq9vT9b2A.png" /><figcaption>Fig 13: Table of contents of the hands-on lab</figcaption></figure><h3>14. Lakehouse Demystified blog series — what’s next</h3><p>I hope this blog post was useful. Here is ‘Lakehouse Demystified’ blog series.</p><p><a href="https://medium.com/p/02529daa52af">Part 1: Just enough about the lakehouse stack on Google Cloud </a><br><a href="https://medium.com/p/6ac3e5051794">Part 2: Just enough about Managed service for Apache Spark — serverless batches</a><br>Part 3: Just enough about Managed service for Apache Spark — serverless interactive sessions for Spark notebooks (this blog)<br><a href="https://medium.com/google-cloud/lakehouse-demystified-part-4-just-enough-about-lakehouse-runtime-catalog-ea489cb1d19d">Part 4: Just enough about Lakehouse runtime catalog for Apache Iceberg and Hive</a><br>Part 5: Just enough about Managed Service for Apache Airflow for lakehouse pipeline orchestration<br>Part 6: Just enough about performance optimization with serverless Managed Service for Apache Spark<br>Part 7: Just enough about machine learning, generative AI and agents on the Lakehouse on Google Cloud<br>Part 8: Just enough about Apache Iceberg table interoperability between Apache Spark and BigQuery<br>Part 9: Just enough about Managed service for Apache Spark clusters<br>Part 10: Just enough about Data Agent Kit for developer experience</p><p>And more to come..</p><h3>15. Credits</h3><p>Special thanks to Igor Dvorzhak, Engineering Technical Lead for serverless Managed Service for Apache Spark for his review, for ensuring accuracy, currency, and completeness.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9a57a99a678a" width="1" height="1" alt=""><hr><p><a href="https://medium.com/google-cloud/lakehouse-demystified-part-3-just-enough-about-spark-notebooks-powered-by-googles-managed-9a57a99a678a">Lakehouse Demystified — Part 3: Just enough about Spark notebooks powered by Google’s Managed…</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[Lakehouse Demystified — Part 1: Just enough about the lakehouse stack on Google Cloud]]></title>
            <link>https://medium.com/google-cloud/lakehouse-demystified-part-1-just-enough-about-the-lakehouse-stack-on-google-cloud-02529daa52af?source=rss-c3fd47c9a471------2</link>
            <guid isPermaLink="false">https://medium.com/p/02529daa52af</guid>
            <category><![CDATA[apache-spark]]></category>
            <category><![CDATA[data-lakehouse]]></category>
            <category><![CDATA[google-cloud-platform]]></category>
            <category><![CDATA[data]]></category>
            <category><![CDATA[apache-iceberg]]></category>
            <dc:creator><![CDATA[Anagha Khanolkar [Google]]]></dc:creator>
            <pubDate>Fri, 24 Apr 2026 14:17:04 GMT</pubDate>
            <atom:updated>2026-05-29T16:46:04.430Z</atom:updated>
            <content:encoded><![CDATA[<p>Welcome to Part 1 of the <strong>Lakehouse Demystified</strong> blog series — a practical guide to lakehouse on Google Cloud. My goal is to share an <strong>opinionated architectural perspective</strong> rooted in experience, providing implementation-ready clarity through reference architectures, best practices, and minimum viable code. This series is designed for <strong>lakehouse practitioners</strong> and <strong>future-state builders</strong> — the architects and engineers striving to master the “art of the possible” on Google Cloud while cutting through the noise.</p><p>In this post, you will learn about the lakehouse stack on Google Cloud and its core components. First, let’s define what a lakehouse is.</p><h3>1. Level-setting the Lakehouse paradigm</h3><blockquote><strong>Lakehouse </strong>is a <strong>data architecture pattern</strong> that combines the strengths of a <strong>data lake</strong> and a <strong>data warehouse</strong> into a single unified system.</blockquote><p>Instead of maintaining two separate systems:</p><ul><li>A <strong>data lake</strong> for raw, cheap storage of structured and unstructured data</li><li>A <strong>data warehouse</strong> for clean, fast analytics on structured data</li></ul><p>A lakehouse keeps the <strong>low-cost storage of a lake</strong>, but adds <strong>warehouse-like structure and reliability</strong> on top.</p><p>This is made possible by technologies called ‘<strong>table formats</strong>’, specifically:</p><ul><li><a href="https://delta.io/"><strong>Delta Lake</strong></a></li><li><a href="https://iceberg.apache.org/"><strong>Apache Iceberg</strong></a></li><li><a href="https://hudi.apache.org/"><strong>Apache Hudi</strong></a></li></ul><p>These table formats sit on top of cloud storage and provide:</p><ul><li>Familiar table constructs</li><li><a href="https://en.wikipedia.org/wiki/Create,_read,_update_and_delete">CRUD</a>, <a href="https://en.wikipedia.org/wiki/ACID">ACID</a> semantics, transactions support</li><li>Metadata for fast queries</li><li>Better performance compared to plain old <a href="https://parquet.apache.org/">Parquet</a></li><li>Time travel</li><li>and more..</li></ul><p>A core differentiator of the lakehouse is also open-ness and the portability promise.</p><h3><strong>2. </strong>Components of a data lakehouse</h3><p>Figure 1 illustrates the canonical lakehouse component architecture.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/985/1*YBBmR8ZoDTnsEnhicYvfVw.png" /><figcaption>Fig 1: Lakehouse components</figcaption></figure><p>Traversing from bottom to top:</p><h4>2.1. Lakehouse storage</h4><p>Essentially data lake (massively scalable, low cost) storage for structured and unstructured data.</p><h4>2.2. Lakehouse data formats</h4><p>A de facto standard with data lakes is to organize the data into <a href="https://docs.databricks.com/gcp/en/lakehouse/medallion">medallion architecture</a> consisting of (raw) bronze layer, (curated) silver layer, (consumption) gold layer. While data in the raw layer can be in any format to stay in full fidelity with the source, as we go higher up the layers, to take advantage of CRUD, ACID, transactions and read-write performance, data needs to be in a table format.</p><p><a href="https://delta.io/blog/open-table-formats/">Open table formats</a> are open-source specifications that enhance existing file formats like <strong>Parquet</strong> or <strong>ORC</strong> to provide a more robust storage layer. By maintaining a clear separation between the actual data files and a dedicated metadata directory, these formats act as a management layer that ensures high-speed query performance, transactional consistency, and protection against data corruption.</p><p>There are three open table formats — <a href="https://github.com/apache/iceberg">Apache Iceberg</a>,<a href="https://delta.io/"> Delta Lake</a> and<a href="https://hudi.apache.org/"> Apache Hudi</a>.</p><h4>2.3. Lakehouse catalog</h4><p>This is the centralized metadata and governance layer used in a <strong>data lakehouse architecture</strong> to organize, manage, and provide fine-grained access control to data assets, such as tables, files, views, and schemas.</p><h4>2.4. Lakehouse engines</h4><p>These are massively scalable compute engines with which you can read, write, and analyze data, train models, run batch and streaming predictions, and utilize generative AI.</p><h4>2.5. Lakehouse governance</h4><p>This is the framework of policies, tools, and processes used to <strong>control, secure, and manage data</strong> in a lakehouse environment. It covers <strong>access control, data security and privacy</strong> (such as encryption and masking), <strong>compliance, auditing, lineage, discovery, cataloging, business glossaries, data profiling, quality, </strong>and<strong> data lifecycle management</strong>.</p><p>Needless to say, <strong>Business Intelligence</strong> and <strong>Observability</strong> are also part of the lakehouse architecture.</p><h4>2.6. Value proposition</h4><p>Now that we have level-set the components of the lakehouse, let’s recap the value proposition of the lakehouse.</p><blockquote>The <strong>value proposition of a lakehouse</strong> is that it combines the <strong>low-cost, flexible storage of a data lake</strong> with the <strong>reliability, performance, and governance of a data warehouse</strong> — in a single system.</blockquote><h3>3. Lakehouse stack on Google Cloud</h3><p>The following is an illustration of the lakehouse stack on Google Cloud.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/984/1*AL1qyvO2HAY7HZ1AvbrHFg.png" /><figcaption>Fig 2: Google Cloud’s lakehouse stack</figcaption></figure><p>Let’s review each component, starting from the bottom.</p><h3>3.1. Lakehouse storage: Google Cloud Storage</h3><p><a href="https://cloud.google.com/storage">Google Cloud Storage</a> is a managed service for storing unstructured data. The following are some salient features. This topic elicits a dedicated blog post.</p><ul><li>The foundational storage container is called a <strong>bucket</strong></li><li>Google Cloud Storage has many knobs for<a href="https://docs.cloud.google.com/storage/docs/introduction#securing_your_data"> <strong>security</strong></a></li><li>Buckets can be configured to be <strong>zonal</strong> (one zone in a region), <strong>regional</strong> (with fault tolerance), <strong>dual region</strong> (with auto-replication, predefined paired region or custom), or <strong>multi-region</strong> (with auto-replication).</li><li>Buckets have options for <a href="https://docs.cloud.google.com/storage/docs/storage-classes"><strong>storage classes</strong></a>. The<a href="https://docs.cloud.google.com/storage/docs/storage-classes#classes"> </a>storage class set for an object affects the object’s <strong>availability</strong> and<a href="https://docs.cloud.google.com/storage/pricing"> <strong>pricing model</strong></a>. The storage class of a bucket can be configured based on requirements.</li><li><a href="https://docs.cloud.google.com/storage/docs/rapid/rapid-bucket"><strong>Rapid Bucket</strong></a> is a high-performance, zonal object storage solution that lets you store data in the <a href="https://docs.cloud.google.com/storage/docs/storage-classes#rapid"><strong>Rapid storage class</strong></a> by defining a <a href="https://docs.cloud.google.com/storage/docs/locations#location-z"><strong>zone</strong></a> as a bucket’s location. Rapid Bucket lets you co-locate your data in the same physical zone as your AI accelerators and helps you achieve the lowest latency and highest throughput among other Cloud Storage product offerings. Rapid Bucket delivers <strong>sub-millisecond latency, up to 15 TB/s of aggregate throughput, and supports up to 20 million queries per second (QPS).</strong></li><li>Buckets can be re-classed by<a href="https://docs.cloud.google.com/storage/docs/lifecycle"> <strong>Object Lifecycle Management</strong></a> configurations as they age, and even purged</li><li>The<a href="https://docs.cloud.google.com/storage/docs/autoclass"> <strong>Autoclass</strong></a> feature automatically transitions objects in your bucket to appropriate<a href="https://docs.cloud.google.com/storage/docs/storage-classes"> <strong>storage classes</strong></a> based on each object’s access pattern.</li><li>You can enhance the performance of demanding applications with<a href="https://cloud.google.com/storage/docs/anywhere-cache"> <strong>Rapid Cache</strong></a> (formerly Anywhere Cache) a fully managed, intelligent SSD-backed read cache for Region, Dual-region, or Multi-region buckets</li><li>Buckets can be configured with ‘<a href="https://docs.cloud.google.com/storage/docs/soft-delete"><strong>soft delete</strong></a>’ for a retention period.</li><li>Google Cloud has a<a href="https://docs.cloud.google.com/dataproc/docs/concepts/connectors/cloud-storage"> <strong>high performance Apache Spark connector</strong></a><strong> </strong>for Google Cloud Storage</li><li><a href="https://docs.cloud.google.com/storage/docs/tags-and-labels"><strong>Labels and tags</strong></a> can be added for <strong>organization</strong>, <strong>discoverability</strong>, and <strong>cost center chargeability</strong></li></ul><h4>3.2. Lakehouse data formats: Apache Iceberg as first class citizen</h4><p>Google Cloud has first class support for <a href="https://github.com/apache/iceberg"><strong>Apache Iceberg</strong></a> from a lakehouse catalog/metastore &amp; table maintenance point of view. All other open formats are supported via the Hive catalog.</p><h4>3.3. Lakehouse catalog: Lakehouse runtime catalog</h4><p>Google Cloud’s Lakehouse catalog and metastore offering is called the <a href="https://docs.cloud.google.com/lakehouse/docs/lakehouse-iceberg-rest-catalog"><strong>Lakehouse runtime catalog</strong></a> (formerly BigLake metastore). There are two catalog flavors: <strong>Iceberg</strong> and <strong>Hive</strong>.</p><p>At Cloud NEXT ’26 (April 2026), Google Cloud announced — <strong>catalog federation with Databricks’ Unity Catalog</strong>. Reach out to your account team to learn more about the catalog federation roadmap.</p><p>For Apache Iceberg tables specifically, there is managed, <strong>automated table maintenance</strong> and <strong>table interoperability with BigQuery and Apache Spark</strong>. This is covered in a dedicated blog post.</p><p>Google Cloud has a legacy metastore called the Dataproc Metastore service, which is targeted for deprecation. For any new workloads, the Lakehouse runtime catalog is recommended.</p><h4>3.4. Lakehouse engines: Managed Service for Apache Spark</h4><p><a href="https://cloud.google.com/products/managed-service-for-apache-spark?e=48754805"><strong>Managed Service for Apache Spark</strong></a> (formerly Dataproc) is available in two form factors: <a href="https://docs.cloud.google.com/dataproc/docs/concepts/overview"><strong>clusters</strong></a> and <a href="https://docs.cloud.google.com/dataproc-serverless/docs/overview"><strong>serverless</strong></a>. The serverless form factor offers two deployment modes: serverless <a href="https://docs.cloud.google.com/dataproc-serverless/docs/overview#batch_workloads"><strong>batches</strong></a> (for batch workloads) and serverless <a href="https://docs.cloud.google.com/dataproc-serverless/docs/overview#interactive_sessions"><strong>interactive sessions</strong></a> (for notebooks). I have a dedicated blog post for each of these flavors.</p><p>In the Google Cloud lakehouse stack, I have included two other engines: <a href="https://docs.cloud.google.com/bigquery/docs/biglake-iceberg-tables-in-bigquery"><strong>BigQuery</strong></a> and <a href="https://docs.cloud.google.com/dataflow/docs/overview"><strong>Dataflow</strong></a> (a managed service for Apache Beam).</p><p><strong>BigQuery</strong> offers first-class support for Apache Iceberg with the Lakehouse runtime catalog as the metastore. Data sits in Apache Iceberg format in Cloud Storage, and you can update/delete data — from BigQuery SQL. Further, Apache Iceberg tables registered in Lakehouse runtime catalog are interoperable with Apache Spark. A dedicated blog post will cover this topic in depth.</p><p>Dataflow is a massively scalable, robust, and performant lakehouse engine, fit for purpose for real-time stream processing as part of data engineering and machine learning use cases.</p><h4>3.5. Lakehouse governance: Knowledge Catalog</h4><p>Service level permissions are managed through <a href="https://docs.cloud.google.com/iam/docs">Cloud IAM</a>, lakehouse governance from the perspective of data masking, fine grained access control to tables, rows and columns are enforced via the Lakehouse runtime catalog, and the <a href="https://docs.cloud.google.com/dataplex/docs/introduction"><strong>Knowledge Catalog</strong></a> (formerly Dataplex Universal Catalog) for the others aspects such as lineage, business cataloging, glossaries, data stewardship, data profiling, and data quality.</p><h4>3.6. Lakehouse orchestration: Managed service for Apache Airflow &amp; Agent Platform pipelines</h4><p>The de facto service for time-based or event-driven orchestration of enterprise grade data engineering pipelines is the <a href="https://cloud.google.com/composer"><strong>Managed Service for Apache Airflow</strong> </a>(formerly Cloud Composer). For Machine Learning/MLOps pipelines, <a href="https://docs.cloud.google.com/vertex-ai/docs/pipelines/introduction">Gemini Enterprise <strong>Agent Platform Pipelines</strong></a> (utilizing <a href="https://www.kubeflow.org/">Kubeflow</a>) is the primary choice. Both Apache Airflow and Kubeflow provide first-class operators for the Managed Service for Apache Spark, Dataflow/Apache Beam and BigQuery, which are the most commonly used services in data engineering and machine learning pipelines. Cloud Functions can be used for event driven orchestration.</p><h4>3.7. AI &amp; Agents: A plethora of managed agents sprinkled across the lakehouse stack of products</h4><p>I would be remiss if I skipped AI and agents. There are several LLM-powered managed “data agents,” such as the <a href="https://docs.cloud.google.com/bigquery/docs/conversational-analytics"><strong>Conversational Analytics</strong></a> feature, which allows you to create a conversational agent that can answer multi-turn questions about your data with rich visualizations. The <a href="https://docs.cloud.google.com/bigquery/docs/data-engineering-agent-pipelines"><strong>Data Engineering Agent</strong></a> can generate data engineering pipelines from prompts, and the <a href="https://docs.cloud.google.com/bigquery/docs/colab-data-science-agent"><strong>Data Science Agent</strong></a> can assist with exploratory data analysis, feature engineering, model training, and inferencing. Additionally, the <a href="https://docs.cloud.google.com/dataplex/docs/data-insights-structured-data"><strong>Data Insights</strong></a> feature in the Knowledge Catalog can generate table and column descriptions, provide quick-start queries, and infer relationships between tables. <a href="https://docs.cloud.google.com/bigquery/docs/bqml-introduction"><strong>BigQuery Machine Learning</strong></a> (BQML) supports classic ML algorithms, LLM-powered forecasting with <a href="https://docs.cloud.google.com/bigquery/docs/timesfm-model"><strong>TimesFM</strong></a>, <a href="https://docs.cloud.google.com/bigquery/docs/vector-search-intro"><strong>vector search</strong></a>, and <a href="https://docs.cloud.google.com/bigquery/docs/generative-ai-overview"><strong>generative AI functions</strong></a> in BigQuery. Furthermore, there is <strong>GPU-accelerated</strong> <strong>distributed classic machine learning and deep learning</strong> on the Managed Service for Apache Spark, with integration into the <strong>Gemini Enterprise Agent Platform</strong><a href="https://docs.cloud.google.com/vertex-ai/docs/model-registry/introduction"><strong> Model Registry</strong></a> and <strong>Gemini Enterprise Agent Platform </strong><a href="https://docs.cloud.google.com/vertex-ai/docs/pipelines/introduction"><strong>Pipelines</strong></a> for <strong>MLOps</strong>. There are 1P and 3P models in <a href="https://cloud.google.com/model-garden?e=48754805&amp;hl=en"><strong>Model Garden</strong></a>. There is the <a href="https://marketplace.visualstudio.com/items?itemName=GoogleCloudTools.datacloud"><strong>Data Agent Kit</strong></a><strong> </strong>extension for IDEs and finally, <strong>intelligent code assistance</strong> is available in IDEs like VS Code, along with code <strong>troubleshooting</strong> across notebooks and the Google Cloud console. These features are detailed in a separate blog post.</p><h4>3.8. Business Intelligence</h4><p><a href="https://cloud.google.com/looker?e=48754805">Looker</a> is a unified, browser-based, enterprise grade <strong>BI and data analytics platform</strong> designed to provide a governed view of data across an organization. A major highlight of the platform is <a href="https://docs.cloud.google.com/looker/docs/conversational-analytics-overview"><strong>Conversational Analytics in Looker</strong></a> (powered by Gemini), which allows users to explore complex datasets using natural language rather than writing code. Beyond standard reporting, Looker serves as an application server that supports <a href="https://docs.cloud.google.com/looker/docs/embed-overview"><strong>embedded analytics</strong></a> and extends trusted data to AI agents through the Looker MCP Server, ensuring high accuracy for modern AI-driven workflows. <a href="https://datastudio.google.com/"><strong>Data Studio</strong></a> is a no-cost tool that turns your data into informative, easy to read, easy to share, and fully customizable dashboards and reports.</p><h4>3.9. Observability</h4><p><a href="https://docs.cloud.google.com/stackdriver/docs"><strong>Google Cloud Observability</strong></a> includes observability services that help you to understand the behavior, health, and performance of your applications. Services in Google Cloud Observability help you to collect, analyze, and correlate telemetry data, both from your applications and from the underlying infrastructure. These services also provide built-in defaults to help you get started faster, such as default dashboards for your <a href="https://docs.cloud.google.com/app-hub/docs/overview">App Hub</a> applications and preconfigured alerting policies.</p><p><a href="https://cloud.google.com/monitoring"><strong>Cloud Monitoring</strong></a><strong>, </strong><a href="https://www.google.com/aclk?sa=L&amp;ai=DChsSEwimpv7_64SUAxXuMAgFHUaQI1QYACICCAEQABoCbWQ&amp;ae=2&amp;co=1&amp;ase=2&amp;gclid=CjwKCAjwhqfPBhBWEiwAZo196nEWLydLwNt4ONJjEr3opD-GMiTZXhPX1BmBbRY--lWtB5ntPIUsRhoCVJwQAvD_BwE&amp;cid=CAAS0wHkaF1I8I2So28RQW6fg28hmVCob_qGxI3ZUKt9NZW51ZNe-2wrKfdytU7eXcxpgeLp7YVyS81U6GxnQozs-ALmsDIl3_PbwFK9QtMT0_ulR1toQR0ixJZFIMcaqcSPD48EjolzLxzzdEsKPwtvZfABZH4vH5IupYuL2rBVOtzkJPGz7LuRND8OvG2gM4O-HaAsUX7HJykMRVD3kl97e0V5OyX4-a9H2AFQl-uVBfFpKF2acyPNJMTyCAg3TYUfbsbH123DpAtWajAPZPy4STmGnncK&amp;cce=2&amp;category=acrcp_v1_71&amp;sig=AOD64_2ZHVcHM-QiX24h1ty85xhIKEnFBw&amp;q&amp;nis=4&amp;adurl&amp;ved=2ahUKEwi41vj_64SUAxUVjIkEHbkOEywQ0Qx6BAgWEAE"><strong>Cloud Logging</strong></a>, and <a href="https://docs.cloud.google.com/trace/docs"><strong>Cloud Trace</strong></a> are among the <a href="https://docs.cloud.google.com/service-usage/docs/enabled-service#default">services enabled by default</a> when you create a Google Cloud project. Cloud Logging, Cloud Monitoring and Cloud Trace can be used across Lakehouse component products where applicable. <a href="https://docs.cloud.google.com/monitoring/alerts"><strong>Alerting</strong></a><strong> </strong>can be configured for scenarios and sent to channels of preference.</p><h3>4. What’s next</h3><p>This was a gentle introduction to the lakehouse paradigm and the Google Cloud lakehouse stack. Subsequent blog posts will dive into details — product features, reference architecture, best practices, and complementary code samples.</p><p>Lakehouse Demystified blog series-<br>Part 1: Introduction to Lakehouse on Google Cloud (this blog)<br><a href="https://medium.com/google-cloud/lakehouse-demystified-part-2-just-enough-managed-spark-serverless-on-google-cloud-for-batch-6ac3e5051794">Part 2: Just enough about Managed service for Apache Spark — serverless batches</a><br><a href="https://medium.com/google-cloud/lakehouse-demystified-part-3-just-enough-about-spark-notebooks-powered-by-googles-managed-9a57a99a678a">Part 3: Just enough about Managed service for Apache Spark — serverless interactive sessions for Spark notebooks</a><br><a href="https://medium.com/google-cloud/lakehouse-demystified-part-4-just-enough-about-lakehouse-runtime-catalog-ea489cb1d19d">Part 4: Just enough about Lakehouse runtime catalog for Apache Iceberg and Hive</a><br>Part 5: Just enough about Managed service for Apache Airflow for lakehouse pipeline orchestration<br>Part 6: Just enough about performance optimization with Managed service for Apache Spark<br>Part 7: Just enough about machine learning, generative AI and agents on the Lakehouse on Google Cloud<br>Part 8: Just enough about Apache Iceberg table interoperability between Apache Spark and BigQuery<br>Part 9: Just enough about Managed service for Apache Spark clusters</p><p>And more to come..</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=02529daa52af" width="1" height="1" alt=""><hr><p><a href="https://medium.com/google-cloud/lakehouse-demystified-part-1-just-enough-about-the-lakehouse-stack-on-google-cloud-02529daa52af">Lakehouse Demystified — Part 1: Just enough about the lakehouse stack on 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>
    </channel>
</rss>