<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Deploying Overwatch on Databricks (AWS) with System Tables as the Data Source in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/deploying-overwatch-on-databricks-aws-with-system-tables-as-the/m-p/83009#M36810</link>
    <description>&lt;H1&gt;&lt;STRONG&gt;Introduction&lt;/STRONG&gt;&lt;/H1&gt;&lt;P class=""&gt;Overwatch is a powerful tool for monitoring and analyzing your Databricks environment, providing insights into resource utilization, cost management, and system performance. By leveraging system tables as the data source, you can gain a comprehensive view of all workspaces in your Databricks account. This article will guide you through the process of deploying Overwatch on Databricks (AWS), using system tables as the primary data source.&lt;/P&gt;&lt;P class=""&gt;&lt;A class="" href="https://databrickslabs.github.io/overwatch/dashboards/" target="_blank" rel="noopener ugc nofollow"&gt;&lt;STRONG&gt;Official Documentation&lt;/STRONG&gt;&lt;/A&gt;: General overview and guidance for Overwatch and Overwatch Implementation, though it may not include the latest updates.&lt;/P&gt;&lt;P class=""&gt;&lt;A class="" href="https://databrickslabs.github.io/overwatch/dataengineer/definitions/071x/" target="_blank" rel="noopener ugc nofollow"&gt;&lt;STRONG&gt;Data Dictionary&lt;/STRONG&gt;&lt;/A&gt;: Detailed definitions of the data elements available after successful deployment of Overwatch for consumption.&lt;/P&gt;&lt;P class=""&gt;&lt;A class="" href="https://databrickslabs.github.io/overwatch/deployoverwatch/cloudinfra/aws/#reference-architecture" target="_blank" rel="noopener ugc nofollow"&gt;&lt;STRONG&gt;Architecture&lt;/STRONG&gt;&lt;/A&gt;: Reference architecture for deploying Overwatch on AWS.&lt;/P&gt;&lt;H1&gt;&lt;STRONG&gt;Prerequisites&lt;/STRONG&gt;&lt;/H1&gt;&lt;P class=""&gt;&lt;STRONG&gt;1. Enable System Table Schemas&lt;/STRONG&gt;&lt;/P&gt;&lt;P class=""&gt;Before deploying Overwatch, you must enable system table schemas. These schemas are governed by Unity Catalog, and you must have at least one Unity Catalog-enabled workspace in your account to access system tables. The system tables aggregate data from all workspaces in your account but can only be accessed from a Unity Catalog-enabled workspace.&lt;/P&gt;&lt;P class=""&gt;&lt;STRONG&gt;Key Points:&lt;/STRONG&gt;&lt;/P&gt;&lt;P class=""&gt;-&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;System Table Governance:&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;Unity Catalog governs system tables.&lt;/P&gt;&lt;P class=""&gt;-&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;Access:&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;Only accessible from Unity Catalog-enabled workspaces.&lt;/P&gt;&lt;P class=""&gt;-&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;Enabling Schemas:&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;System schemas must be enabled at the schema level, and an account admin must manually enable them.&lt;/P&gt;&lt;P class=""&gt;&lt;STRONG&gt;How to Enable System Table Schemas:&lt;/STRONG&gt;&lt;/P&gt;&lt;P class=""&gt;- List available system schemas using the following `curl` command:&lt;/P&gt;&lt;P class=""&gt;curl -v -X GET -H “Authorization: Bearer &amp;lt;PAT Token&amp;gt;” “https://&amp;lt;workspace&amp;gt;.cloud.databricks.com/api/2.0/unity-catalog/metastores/&amp;lt;metastore-id&amp;gt;/systemschemas”&lt;/P&gt;&lt;P class=""&gt;- Enable a system schema using the following `curl` command:&lt;/P&gt;&lt;P class=""&gt;curl -v -X PUT -H “Authorization: Bearer &amp;lt;PAT Token&amp;gt;” “https://&amp;lt;workspace&amp;gt;.databricks.com/api/2.0/unity-catalog/metastores/&amp;lt;metastore-id&amp;gt;/systemschemas/&amp;lt;SCHEMA_NAME&amp;gt;”&lt;/P&gt;&lt;P class=""&gt;For more details, refer to the official Databricks documentation:&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A class="" href="https://docs.databricks.com/en/admin/system-tables/index.html#enable-system-table-schemas" target="_blank" rel="noopener ugc nofollow"&gt;Enable System Table Schemas&lt;/A&gt;.&lt;/P&gt;&lt;P class=""&gt;&lt;STRONG&gt;2. Generate a Personal Access Token (PAT)&lt;/STRONG&gt;&lt;/P&gt;&lt;P class=""&gt;To interact with the Databricks API, you need to generate a Personal Access Token (PAT).&lt;/P&gt;&lt;P class=""&gt;&lt;STRONG&gt;Steps to Generate a PAT:&lt;/STRONG&gt;&lt;/P&gt;&lt;P class=""&gt;a.&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;Log in to Databricks:&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;Access your Databricks workspace using your credentials.&lt;/P&gt;&lt;P class=""&gt;b.&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;Access User Settings:&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;Click on your profile icon and select “User Settings.”&lt;/P&gt;&lt;P class=""&gt;c.&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;Generate a New Token:&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/STRONG&gt;Under the “Access Tokens” section, click “Generate New Token.”&lt;/P&gt;&lt;P class=""&gt;d.&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;Configure the Token:&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;Set a lifetime and optionally provide a description.&lt;/P&gt;&lt;P class=""&gt;e.&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;Save the Token:&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;Copy the token immediately, as it will not be displayed again.&lt;/P&gt;&lt;P class=""&gt;&lt;STRONG&gt;3. Securely Store the PAT in a Secret Scope&lt;/STRONG&gt;&lt;/P&gt;&lt;P class=""&gt;To securely store the PAT, create a secret scope using the Databricks CLI.&lt;/P&gt;&lt;P class=""&gt;&lt;STRONG&gt;Steps to Create a Secret Scope:&lt;/STRONG&gt;&lt;/P&gt;&lt;P class=""&gt;a.&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;Set Up the Databricks CLI:&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;Install and configure the CLI with your workspace URL and PAT.&lt;/P&gt;&lt;P class=""&gt;pip install databricks-cli&lt;/P&gt;&lt;P class=""&gt;databricks configure — token&lt;/P&gt;&lt;P class=""&gt;b.&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;Create a Secret Scope:&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;Use the following command to create a scope:&lt;/P&gt;&lt;P class=""&gt;databricks secrets create-scope — scope &amp;lt;scope-name&amp;gt;&lt;/P&gt;&lt;P class=""&gt;c.&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;Add the PAT to the Secret Scope:&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;Store the PAT in the secret scope.&lt;/P&gt;&lt;P class=""&gt;databricks secrets put — scope &amp;lt;scope-name&amp;gt; — key &amp;lt;secret-key&amp;gt;&lt;/P&gt;&lt;P class=""&gt;&lt;STRONG&gt;Configuring Overwatch with System Tables&lt;/STRONG&gt;&lt;/P&gt;&lt;P class=""&gt;To deploy Overwatch using system tables as the data source, you’ll need to create a configuration file that contains the necessary details for your Databricks environment. Below is a sample schema for the configuration file with sample values:&lt;/P&gt;&lt;P class=""&gt;workspace_name : Workspace-TestOW&lt;/P&gt;&lt;P class=""&gt;workspace_id : 1857915041000000&lt;/P&gt;&lt;P class=""&gt;workspace_url :&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A class="" href="https://dbc-664fbb00-0000.cloud.databricks.com/" target="_blank" rel="noopener ugc nofollow"&gt;https://dbc-664fbb00-0000.cloud.databricks.com&lt;/A&gt;&lt;/P&gt;&lt;P class=""&gt;api_url :&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A class="" href="https://mumbai.cloud.databricks.com/" target="_blank" rel="noopener ugc nofollow"&gt;https://mumbai.cloud.databricks.com&lt;/A&gt;&lt;/P&gt;&lt;P class=""&gt;cloud : AWS&lt;/P&gt;&lt;P class=""&gt;primordial_date : 28–07–2024&lt;/P&gt;&lt;P class=""&gt;storage_prefix : /mnt/overwatch_global&lt;/P&gt;&lt;P class=""&gt;etl_database_name : overwatch_etl&lt;/P&gt;&lt;P class=""&gt;consumer_database_name : overwatch_global&lt;/P&gt;&lt;P class=""&gt;secret_scope : secret_scope_for_overwatch&lt;/P&gt;&lt;P class=""&gt;secret_key_dbpat : dapicd0c0c0000e0000a0a0d0c0f0f0e000e&lt;/P&gt;&lt;P class=""&gt;auditlogprefix_source_path : system&lt;/P&gt;&lt;P class=""&gt;eh_name :&lt;/P&gt;&lt;P class=""&gt;eh_scope_key :&lt;/P&gt;&lt;P class=""&gt;interactive_dbu_price : 0.55&lt;/P&gt;&lt;P class=""&gt;automated_dbu_price : 0.3&lt;/P&gt;&lt;P class=""&gt;sql_compute_dbu_price : 0.22&lt;/P&gt;&lt;P class=""&gt;jobs_light_dbu_price : 0.1&lt;/P&gt;&lt;P class=""&gt;max_days : 30&lt;/P&gt;&lt;P class=""&gt;excluded_scopes :&lt;/P&gt;&lt;P class=""&gt;active : TRUE&lt;/P&gt;&lt;P class=""&gt;proxy_host :&lt;/P&gt;&lt;P class=""&gt;proxy_port :&lt;/P&gt;&lt;P class=""&gt;proxy_user_name :&lt;/P&gt;&lt;P class=""&gt;proxy_password_scope :&lt;/P&gt;&lt;P class=""&gt;proxy_password_key :&lt;/P&gt;&lt;P class=""&gt;success_batch_size :&lt;/P&gt;&lt;P class=""&gt;error_batch_size :&lt;/P&gt;&lt;P class=""&gt;enable_unsafe_SSL :&lt;/P&gt;&lt;P class=""&gt;thread_pool_size :&lt;/P&gt;&lt;P class=""&gt;api_waiting_time :&lt;/P&gt;&lt;P class=""&gt;Save this configuration as csv and save/ upload it to DBFS (we will need path of this file later in further deployment steps)&lt;/P&gt;&lt;PRE&gt;&lt;SPAN class=""&gt;workspace_name,workspace_id,workspace_url,api_url,cloud,primordial_date,storage_prefix,etl_database_name,consumer_database_name,secret_scope,secret_key_dbpat,auditlogprefix_source_path,eh_name,eh_scope_key,interactive_dbu_price,automated_dbu_price,sql_compute_dbu_price,jobs_light_dbu_price,max_days,excluded_scopes,active,proxy_host,proxy_port,proxy_user_name,proxy_password_scope,proxy_password_key,success_batch_size,error_batch_size,enable_unsafe_SSL,thread_pool_size,api_waiting_time&lt;BR /&gt;Workspace-TestOW,&lt;SPAN class=""&gt;1857915041000000&lt;/SPAN&gt;,https:&lt;SPAN class=""&gt;//d&lt;/SPAN&gt;bc-&lt;SPAN class=""&gt;664&lt;/SPAN&gt;fbb0&lt;SPAN class=""&gt;0&lt;/SPAN&gt;-&lt;SPAN class=""&gt;0000&lt;/SPAN&gt;.cloud.databricks.com,https:&lt;SPAN class=""&gt;//mum&lt;/SPAN&gt;bai.cloud.databricks.com,AWS,&lt;SPAN class=""&gt;28&lt;/SPAN&gt;-&lt;SPAN class=""&gt;07&lt;/SPAN&gt;-&lt;SPAN class=""&gt;2024&lt;/SPAN&gt;,&lt;SPAN class=""&gt;/mnt/&lt;/SPAN&gt;overwatch_global,overwatch_etl,overwatch_global,secret_scope_for_overwatch,dapicd0c0c0000e0000a0a0d0c0f0f0e000e,&lt;SPAN class=""&gt;system&lt;/SPAN&gt;,,,&lt;SPAN class=""&gt;0&lt;/SPAN&gt;.&lt;SPAN class=""&gt;55&lt;/SPAN&gt;,&lt;SPAN class=""&gt;0&lt;/SPAN&gt;.&lt;SPAN class=""&gt;3&lt;/SPAN&gt;,&lt;SPAN class=""&gt;0&lt;/SPAN&gt;.&lt;SPAN class=""&gt;22&lt;/SPAN&gt;,&lt;SPAN class=""&gt;0&lt;/SPAN&gt;.&lt;SPAN class=""&gt;1&lt;/SPAN&gt;,&lt;SPAN class=""&gt;30&lt;/SPAN&gt;,,TRUE,,,,,,,,,,&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P class=""&gt;&lt;A class="" href="https://databrickslabs.github.io/overwatch/deployoverwatch/configureoverwatch/configuration/#overwatch-deployment-configuration" target="_blank" rel="noopener ugc nofollow"&gt;&lt;STRONG&gt;Configurations&lt;/STRONG&gt;&lt;/A&gt;: Configuration settings and options for deploying Overwatch.&lt;/P&gt;&lt;P class=""&gt;&lt;A class="" href="https://databrickslabs.github.io/overwatch/deployoverwatch/configureoverwatch/customcosts/" target="_blank" rel="noopener ugc nofollow"&gt;&lt;STRONG&gt;Custom Cost&lt;/STRONG&gt;&lt;/A&gt;: Information on configuring custom cost settings in Overwatch.&lt;/P&gt;&lt;P class=""&gt;&lt;STRONG&gt;Optimal Databricks Configuration&lt;/STRONG&gt;&lt;/P&gt;&lt;P class=""&gt;For deploying Overwatch, the following configuration worked optimally:&lt;/P&gt;&lt;P class=""&gt;-&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;Cluster DBR Version&lt;/STRONG&gt;: 13.3 LTS&lt;/P&gt;&lt;P class=""&gt;-&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;Overwatch JAR Version&lt;/STRONG&gt;: 0.8.1.2 (Latest as of August 2024)&lt;/P&gt;&lt;P class=""&gt;This specific combination of DBR and Overwatch JAR is recommended, as it proved to be the most reliable in recent tests. Other versions may encounter compatibility issues.&lt;/P&gt;&lt;P class=""&gt;&lt;STRONG&gt;Missing Libraries&lt;/STRONG&gt;:&lt;/P&gt;&lt;P class=""&gt;In the 13.3 LTS DBR version, a couple of libraries were missing:&lt;/P&gt;&lt;P class=""&gt;- org.scalaj:scalaj-http_2.12:2.4.2&lt;/P&gt;&lt;P class=""&gt;- dataframe_rules_engine_2.12:0.2.0&lt;/P&gt;&lt;P class=""&gt;These libraries might need to be installed manually on the cluster to ensure full functionality.&lt;/P&gt;&lt;P class=""&gt;&lt;STRONG&gt;Steps to Deploy Overwatch on Databricks (AWS)&lt;/STRONG&gt;&lt;/P&gt;&lt;P class=""&gt;Here is a comprehensive guide to deploying Overwatch on Databricks using the provided setup and configuration parameters:&lt;/P&gt;&lt;P class=""&gt;&lt;STRONG&gt;1. Import Library&lt;/STRONG&gt;&lt;/P&gt;&lt;P class=""&gt;Begin by importing the necessary library for Overwatch deployment:&lt;/P&gt;&lt;PRE&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;import&lt;/SPAN&gt; com.databricks.labs.overwatch.MultiWorkspaceDeployment&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P class=""&gt;&lt;STRONG&gt;2. Set Configuration Parameters&lt;/STRONG&gt;&lt;/P&gt;&lt;P class=""&gt;Define the parameters required for the deployment:&lt;/P&gt;&lt;PRE&gt;&lt;SPAN class=""&gt;&lt;BR /&gt;&lt;SPAN class=""&gt;val&lt;/SPAN&gt; &lt;SPAN class=""&gt;PATHTOCSVCONFIG&lt;/SPAN&gt; &lt;SPAN class=""&gt;=&lt;/SPAN&gt; &lt;SPAN class=""&gt;"dbfs:/FileStore/overwatch/configs/overwatch Configuration.csv"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class=""&gt;val&lt;/SPAN&gt; &lt;SPAN class=""&gt;CONFIGTABLENAME&lt;/SPAN&gt; &lt;SPAN class=""&gt;=&lt;/SPAN&gt; &lt;SPAN class=""&gt;"overwatch_dev_config"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class=""&gt;val&lt;/SPAN&gt; &lt;SPAN class=""&gt;TEMPDIR&lt;/SPAN&gt; &lt;SPAN class=""&gt;=&lt;/SPAN&gt; &lt;SPAN class=""&gt;"dbfs:/mnt/overwatch/tmp"&lt;/SPAN&gt; &lt;SPAN class=""&gt;// Update as necessary&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class=""&gt;val&lt;/SPAN&gt; &lt;SPAN class=""&gt;PARALLELISM&lt;/SPAN&gt; &lt;SPAN class=""&gt;=&lt;/SPAN&gt; &lt;SPAN class=""&gt;1&lt;/SPAN&gt; &lt;SPAN class=""&gt;// Adjust based on the number of workspaces to deploy&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class=""&gt;val&lt;/SPAN&gt; &lt;SPAN class=""&gt;STORAGEPREFIX&lt;/SPAN&gt; &lt;SPAN class=""&gt;=&lt;/SPAN&gt; &lt;SPAN class=""&gt;"dbfs:/mnt"&lt;/SPAN&gt; &lt;SPAN class=""&gt;// Update as necessary&lt;/SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P class=""&gt;-&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;PATHTOCSVCONFIG&lt;/STRONG&gt;: Path to the CSV file with Overwatch configuration.&lt;/P&gt;&lt;P class=""&gt;-&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;CONFIGTABLENAME&lt;/STRONG&gt;: Delta table where the Overwatch configuration will be saved or updated.&lt;/P&gt;&lt;P class=""&gt;-&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;TEMPDIR&lt;/STRONG&gt;: Temporary directory for intermediate files during deployment.&lt;/P&gt;&lt;P class=""&gt;-&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;PARALLELISM&lt;/STRONG&gt;: Number of workspaces to load simultaneously (up to ~20).&lt;/P&gt;&lt;P class=""&gt;-&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;STORAGEPREFIX&lt;/STRONG&gt;: Prefix for storage paths.&lt;/P&gt;&lt;P class=""&gt;&lt;STRONG&gt;3. Save CSV Content to Configuration Table&lt;/STRONG&gt;&lt;/P&gt;&lt;P class=""&gt;Load the CSV file and save its contents to the configuration table:&lt;/P&gt;&lt;PRE&gt;&lt;SPAN class=""&gt;spark.read&lt;BR /&gt;.&lt;SPAN class=""&gt;option&lt;/SPAN&gt;(&lt;SPAN class=""&gt;"header"&lt;/SPAN&gt;, &lt;SPAN class=""&gt;"true"&lt;/SPAN&gt;)&lt;BR /&gt;.&lt;SPAN class=""&gt;option&lt;/SPAN&gt;(&lt;SPAN class=""&gt;"ignoreLeadingWhiteSpace"&lt;/SPAN&gt;, &lt;SPAN class=""&gt;true&lt;/SPAN&gt;)&lt;BR /&gt;.&lt;SPAN class=""&gt;option&lt;/SPAN&gt;(&lt;SPAN class=""&gt;"ignoreTrailingWhiteSpace"&lt;/SPAN&gt;, &lt;SPAN class=""&gt;true&lt;/SPAN&gt;)&lt;BR /&gt;.csv(PATHTOCSVCONFIG)&lt;BR /&gt;.coalesce(&lt;SPAN class=""&gt;1&lt;/SPAN&gt;)&lt;BR /&gt;.write&lt;BR /&gt;.&lt;SPAN class=""&gt;option&lt;/SPAN&gt;(&lt;SPAN class=""&gt;"mergeSchema"&lt;/SPAN&gt;, &lt;SPAN class=""&gt;"true"&lt;/SPAN&gt;)&lt;BR /&gt;.mode(&lt;SPAN class=""&gt;"overwrite"&lt;/SPAN&gt;)&lt;BR /&gt;.format(&lt;SPAN class=""&gt;"delta"&lt;/SPAN&gt;)&lt;BR /&gt;.saveAsTable(CONFIGTABLENAME)&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P class=""&gt;&lt;STRONG&gt;4. Validate Deployment Configuration&lt;/STRONG&gt;&lt;/P&gt;&lt;P class=""&gt;Validate the deployment configuration using the `MultiWorkspaceDeployment` class:&lt;/P&gt;&lt;PRE&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;MultiWorkspaceDeployment&lt;/SPAN&gt;(CONFIGTABLENAME, TEMPDIR)&lt;SPAN class=""&gt;.validate&lt;/SPAN&gt;(PARALLELISM)&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P class=""&gt;&lt;A class="" href="https://databrickslabs.github.io/overwatch/deployoverwatch/configureoverwatch/validation//" target="_blank" rel="noopener ugc nofollow"&gt;&lt;STRONG&gt;Validation&lt;/STRONG&gt;&lt;/A&gt;: Guidance on validating your Overwatch deployment.&lt;/P&gt;&lt;P class=""&gt;&lt;STRONG&gt;5. Review Validation Results&lt;/STRONG&gt;&lt;/P&gt;&lt;P class=""&gt;Check the validation results to ensure everything is configured correctly:&lt;/P&gt;&lt;PRE&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;import&lt;/SPAN&gt; org.apache.spark.sql.expressions.Window&lt;BR /&gt;&lt;SPAN class=""&gt;import&lt;/SPAN&gt; org.apache.spark.sql.functions._&lt;BR /&gt;&lt;SPAN class=""&gt;// Display the latest validation results&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class=""&gt;val&lt;/SPAN&gt; &lt;SPAN class=""&gt;windowSpec&lt;/SPAN&gt; &lt;SPAN class=""&gt;=&lt;/SPAN&gt; Window.orderBy(col(&lt;SPAN class=""&gt;"snapTS"&lt;/SPAN&gt;).desc)&lt;BR /&gt;display(&lt;BR /&gt;spark.read.format(&lt;SPAN class=""&gt;"delta"&lt;/SPAN&gt;)&lt;BR /&gt;.load(&lt;SPAN class=""&gt;"dbfs:/mnt/overwatch_global_d1/report/validationReport"&lt;/SPAN&gt;)&lt;BR /&gt;.withColumn(&lt;SPAN class=""&gt;"rank"&lt;/SPAN&gt;, rank().over(windowSpec))&lt;BR /&gt;.filter(col(&lt;SPAN class=""&gt;"rank"&lt;/SPAN&gt;) === &lt;SPAN class=""&gt;1&lt;/SPAN&gt;)&lt;BR /&gt;.drop(&lt;SPAN class=""&gt;"rank"&lt;/SPAN&gt;)&lt;BR /&gt;.orderBy(&lt;SPAN class=""&gt;"validated"&lt;/SPAN&gt;)&lt;BR /&gt;)&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P class=""&gt;&lt;STRONG&gt;6. Final Deployment&lt;/STRONG&gt;&lt;/P&gt;&lt;P class=""&gt;Perform the final deployment for each layer (Bronze, Silver, Gold):&lt;/P&gt;&lt;P class=""&gt;&lt;STRONG&gt;Bronze Layer:&lt;/STRONG&gt;&lt;/P&gt;&lt;PRE&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;MultiWorkspaceDeployment&lt;/SPAN&gt;(CONFIGTABLENAME, TEMPDIR)&lt;SPAN class=""&gt;.deploy&lt;/SPAN&gt;(PARALLELISM, "Bronze")&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P class=""&gt;&lt;STRONG&gt;Silver Layer:&lt;/STRONG&gt;&lt;/P&gt;&lt;PRE&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;MultiWorkspaceDeployment&lt;/SPAN&gt;(CONFIGTABLENAME, TEMPDIR)&lt;SPAN class=""&gt;.deploy&lt;/SPAN&gt;(PARALLELISM, "Silver")&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P class=""&gt;&lt;STRONG&gt;Gold Layer:&lt;/STRONG&gt;&lt;/P&gt;&lt;PRE&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;MultiWorkspaceDeployment&lt;/SPAN&gt;(CONFIGTABLENAME, TEMPDIR)&lt;SPAN class=""&gt;.deploy&lt;/SPAN&gt;(PARALLELISM, "Gold")&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P class=""&gt;&lt;A class="" href="https://databrickslabs.github.io/overwatch/deployoverwatch/configureoverwatch/validation/" target="_blank" rel="noopener ugc nofollow"&gt;&lt;STRONG&gt;Running as Overwatch&lt;/STRONG&gt;&lt;/A&gt;: Additional details on running Overwatch.&lt;/P&gt;&lt;P class=""&gt;&lt;STRONG&gt;Final Deployment Report&lt;/STRONG&gt;&lt;/P&gt;&lt;P class=""&gt;Check the final deployment report using:&lt;/P&gt;&lt;PRE&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;SELECT&lt;/SPAN&gt; &lt;SPAN class=""&gt;*&lt;/SPAN&gt; &lt;SPAN class=""&gt;FROM&lt;/SPAN&gt; overwatch_etl.pipReport &lt;SPAN class=""&gt;ORDER&lt;/SPAN&gt; &lt;SPAN class=""&gt;BY&lt;/SPAN&gt; Pipeline_SnapTs &lt;SPAN class=""&gt;DESC&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P class=""&gt;By following these steps, you will deploy Overwatch on Databricks efficiently, using system tables as your data source and ensuring that all layers of the deployment are properly configured and validated.&lt;/P&gt;&lt;P class=""&gt;Got it! If you need any further assistance or have additional questions, feel free to reach out at&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A class="" href="mailto:contact@jiteshraut.me" target="_blank" rel="noopener ugc nofollow"&gt;contact@jiteshraut.me&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;or connect with you on&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A class="" href="https://www.linkedin.com/in/jiteshraut/" target="_blank" rel="noopener ugc nofollow"&gt;LinkedIn&lt;/A&gt;.&lt;/P&gt;&lt;P class=""&gt;Thank you!&lt;/P&gt;</description>
    <pubDate>Wed, 14 Aug 2024 18:37:04 GMT</pubDate>
    <dc:creator>jiteshraut20</dc:creator>
    <dc:date>2024-08-14T18:37:04Z</dc:date>
    <item>
      <title>Deploying Overwatch on Databricks (AWS) with System Tables as the Data Source</title>
      <link>https://community.databricks.com/t5/data-engineering/deploying-overwatch-on-databricks-aws-with-system-tables-as-the/m-p/83009#M36810</link>
      <description>&lt;H1&gt;&lt;STRONG&gt;Introduction&lt;/STRONG&gt;&lt;/H1&gt;&lt;P class=""&gt;Overwatch is a powerful tool for monitoring and analyzing your Databricks environment, providing insights into resource utilization, cost management, and system performance. By leveraging system tables as the data source, you can gain a comprehensive view of all workspaces in your Databricks account. This article will guide you through the process of deploying Overwatch on Databricks (AWS), using system tables as the primary data source.&lt;/P&gt;&lt;P class=""&gt;&lt;A class="" href="https://databrickslabs.github.io/overwatch/dashboards/" target="_blank" rel="noopener ugc nofollow"&gt;&lt;STRONG&gt;Official Documentation&lt;/STRONG&gt;&lt;/A&gt;: General overview and guidance for Overwatch and Overwatch Implementation, though it may not include the latest updates.&lt;/P&gt;&lt;P class=""&gt;&lt;A class="" href="https://databrickslabs.github.io/overwatch/dataengineer/definitions/071x/" target="_blank" rel="noopener ugc nofollow"&gt;&lt;STRONG&gt;Data Dictionary&lt;/STRONG&gt;&lt;/A&gt;: Detailed definitions of the data elements available after successful deployment of Overwatch for consumption.&lt;/P&gt;&lt;P class=""&gt;&lt;A class="" href="https://databrickslabs.github.io/overwatch/deployoverwatch/cloudinfra/aws/#reference-architecture" target="_blank" rel="noopener ugc nofollow"&gt;&lt;STRONG&gt;Architecture&lt;/STRONG&gt;&lt;/A&gt;: Reference architecture for deploying Overwatch on AWS.&lt;/P&gt;&lt;H1&gt;&lt;STRONG&gt;Prerequisites&lt;/STRONG&gt;&lt;/H1&gt;&lt;P class=""&gt;&lt;STRONG&gt;1. Enable System Table Schemas&lt;/STRONG&gt;&lt;/P&gt;&lt;P class=""&gt;Before deploying Overwatch, you must enable system table schemas. These schemas are governed by Unity Catalog, and you must have at least one Unity Catalog-enabled workspace in your account to access system tables. The system tables aggregate data from all workspaces in your account but can only be accessed from a Unity Catalog-enabled workspace.&lt;/P&gt;&lt;P class=""&gt;&lt;STRONG&gt;Key Points:&lt;/STRONG&gt;&lt;/P&gt;&lt;P class=""&gt;-&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;System Table Governance:&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;Unity Catalog governs system tables.&lt;/P&gt;&lt;P class=""&gt;-&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;Access:&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;Only accessible from Unity Catalog-enabled workspaces.&lt;/P&gt;&lt;P class=""&gt;-&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;Enabling Schemas:&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;System schemas must be enabled at the schema level, and an account admin must manually enable them.&lt;/P&gt;&lt;P class=""&gt;&lt;STRONG&gt;How to Enable System Table Schemas:&lt;/STRONG&gt;&lt;/P&gt;&lt;P class=""&gt;- List available system schemas using the following `curl` command:&lt;/P&gt;&lt;P class=""&gt;curl -v -X GET -H “Authorization: Bearer &amp;lt;PAT Token&amp;gt;” “https://&amp;lt;workspace&amp;gt;.cloud.databricks.com/api/2.0/unity-catalog/metastores/&amp;lt;metastore-id&amp;gt;/systemschemas”&lt;/P&gt;&lt;P class=""&gt;- Enable a system schema using the following `curl` command:&lt;/P&gt;&lt;P class=""&gt;curl -v -X PUT -H “Authorization: Bearer &amp;lt;PAT Token&amp;gt;” “https://&amp;lt;workspace&amp;gt;.databricks.com/api/2.0/unity-catalog/metastores/&amp;lt;metastore-id&amp;gt;/systemschemas/&amp;lt;SCHEMA_NAME&amp;gt;”&lt;/P&gt;&lt;P class=""&gt;For more details, refer to the official Databricks documentation:&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A class="" href="https://docs.databricks.com/en/admin/system-tables/index.html#enable-system-table-schemas" target="_blank" rel="noopener ugc nofollow"&gt;Enable System Table Schemas&lt;/A&gt;.&lt;/P&gt;&lt;P class=""&gt;&lt;STRONG&gt;2. Generate a Personal Access Token (PAT)&lt;/STRONG&gt;&lt;/P&gt;&lt;P class=""&gt;To interact with the Databricks API, you need to generate a Personal Access Token (PAT).&lt;/P&gt;&lt;P class=""&gt;&lt;STRONG&gt;Steps to Generate a PAT:&lt;/STRONG&gt;&lt;/P&gt;&lt;P class=""&gt;a.&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;Log in to Databricks:&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;Access your Databricks workspace using your credentials.&lt;/P&gt;&lt;P class=""&gt;b.&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;Access User Settings:&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;Click on your profile icon and select “User Settings.”&lt;/P&gt;&lt;P class=""&gt;c.&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;Generate a New Token:&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/STRONG&gt;Under the “Access Tokens” section, click “Generate New Token.”&lt;/P&gt;&lt;P class=""&gt;d.&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;Configure the Token:&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;Set a lifetime and optionally provide a description.&lt;/P&gt;&lt;P class=""&gt;e.&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;Save the Token:&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;Copy the token immediately, as it will not be displayed again.&lt;/P&gt;&lt;P class=""&gt;&lt;STRONG&gt;3. Securely Store the PAT in a Secret Scope&lt;/STRONG&gt;&lt;/P&gt;&lt;P class=""&gt;To securely store the PAT, create a secret scope using the Databricks CLI.&lt;/P&gt;&lt;P class=""&gt;&lt;STRONG&gt;Steps to Create a Secret Scope:&lt;/STRONG&gt;&lt;/P&gt;&lt;P class=""&gt;a.&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;Set Up the Databricks CLI:&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;Install and configure the CLI with your workspace URL and PAT.&lt;/P&gt;&lt;P class=""&gt;pip install databricks-cli&lt;/P&gt;&lt;P class=""&gt;databricks configure — token&lt;/P&gt;&lt;P class=""&gt;b.&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;Create a Secret Scope:&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;Use the following command to create a scope:&lt;/P&gt;&lt;P class=""&gt;databricks secrets create-scope — scope &amp;lt;scope-name&amp;gt;&lt;/P&gt;&lt;P class=""&gt;c.&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;Add the PAT to the Secret Scope:&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;Store the PAT in the secret scope.&lt;/P&gt;&lt;P class=""&gt;databricks secrets put — scope &amp;lt;scope-name&amp;gt; — key &amp;lt;secret-key&amp;gt;&lt;/P&gt;&lt;P class=""&gt;&lt;STRONG&gt;Configuring Overwatch with System Tables&lt;/STRONG&gt;&lt;/P&gt;&lt;P class=""&gt;To deploy Overwatch using system tables as the data source, you’ll need to create a configuration file that contains the necessary details for your Databricks environment. Below is a sample schema for the configuration file with sample values:&lt;/P&gt;&lt;P class=""&gt;workspace_name : Workspace-TestOW&lt;/P&gt;&lt;P class=""&gt;workspace_id : 1857915041000000&lt;/P&gt;&lt;P class=""&gt;workspace_url :&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A class="" href="https://dbc-664fbb00-0000.cloud.databricks.com/" target="_blank" rel="noopener ugc nofollow"&gt;https://dbc-664fbb00-0000.cloud.databricks.com&lt;/A&gt;&lt;/P&gt;&lt;P class=""&gt;api_url :&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A class="" href="https://mumbai.cloud.databricks.com/" target="_blank" rel="noopener ugc nofollow"&gt;https://mumbai.cloud.databricks.com&lt;/A&gt;&lt;/P&gt;&lt;P class=""&gt;cloud : AWS&lt;/P&gt;&lt;P class=""&gt;primordial_date : 28–07–2024&lt;/P&gt;&lt;P class=""&gt;storage_prefix : /mnt/overwatch_global&lt;/P&gt;&lt;P class=""&gt;etl_database_name : overwatch_etl&lt;/P&gt;&lt;P class=""&gt;consumer_database_name : overwatch_global&lt;/P&gt;&lt;P class=""&gt;secret_scope : secret_scope_for_overwatch&lt;/P&gt;&lt;P class=""&gt;secret_key_dbpat : dapicd0c0c0000e0000a0a0d0c0f0f0e000e&lt;/P&gt;&lt;P class=""&gt;auditlogprefix_source_path : system&lt;/P&gt;&lt;P class=""&gt;eh_name :&lt;/P&gt;&lt;P class=""&gt;eh_scope_key :&lt;/P&gt;&lt;P class=""&gt;interactive_dbu_price : 0.55&lt;/P&gt;&lt;P class=""&gt;automated_dbu_price : 0.3&lt;/P&gt;&lt;P class=""&gt;sql_compute_dbu_price : 0.22&lt;/P&gt;&lt;P class=""&gt;jobs_light_dbu_price : 0.1&lt;/P&gt;&lt;P class=""&gt;max_days : 30&lt;/P&gt;&lt;P class=""&gt;excluded_scopes :&lt;/P&gt;&lt;P class=""&gt;active : TRUE&lt;/P&gt;&lt;P class=""&gt;proxy_host :&lt;/P&gt;&lt;P class=""&gt;proxy_port :&lt;/P&gt;&lt;P class=""&gt;proxy_user_name :&lt;/P&gt;&lt;P class=""&gt;proxy_password_scope :&lt;/P&gt;&lt;P class=""&gt;proxy_password_key :&lt;/P&gt;&lt;P class=""&gt;success_batch_size :&lt;/P&gt;&lt;P class=""&gt;error_batch_size :&lt;/P&gt;&lt;P class=""&gt;enable_unsafe_SSL :&lt;/P&gt;&lt;P class=""&gt;thread_pool_size :&lt;/P&gt;&lt;P class=""&gt;api_waiting_time :&lt;/P&gt;&lt;P class=""&gt;Save this configuration as csv and save/ upload it to DBFS (we will need path of this file later in further deployment steps)&lt;/P&gt;&lt;PRE&gt;&lt;SPAN class=""&gt;workspace_name,workspace_id,workspace_url,api_url,cloud,primordial_date,storage_prefix,etl_database_name,consumer_database_name,secret_scope,secret_key_dbpat,auditlogprefix_source_path,eh_name,eh_scope_key,interactive_dbu_price,automated_dbu_price,sql_compute_dbu_price,jobs_light_dbu_price,max_days,excluded_scopes,active,proxy_host,proxy_port,proxy_user_name,proxy_password_scope,proxy_password_key,success_batch_size,error_batch_size,enable_unsafe_SSL,thread_pool_size,api_waiting_time&lt;BR /&gt;Workspace-TestOW,&lt;SPAN class=""&gt;1857915041000000&lt;/SPAN&gt;,https:&lt;SPAN class=""&gt;//d&lt;/SPAN&gt;bc-&lt;SPAN class=""&gt;664&lt;/SPAN&gt;fbb0&lt;SPAN class=""&gt;0&lt;/SPAN&gt;-&lt;SPAN class=""&gt;0000&lt;/SPAN&gt;.cloud.databricks.com,https:&lt;SPAN class=""&gt;//mum&lt;/SPAN&gt;bai.cloud.databricks.com,AWS,&lt;SPAN class=""&gt;28&lt;/SPAN&gt;-&lt;SPAN class=""&gt;07&lt;/SPAN&gt;-&lt;SPAN class=""&gt;2024&lt;/SPAN&gt;,&lt;SPAN class=""&gt;/mnt/&lt;/SPAN&gt;overwatch_global,overwatch_etl,overwatch_global,secret_scope_for_overwatch,dapicd0c0c0000e0000a0a0d0c0f0f0e000e,&lt;SPAN class=""&gt;system&lt;/SPAN&gt;,,,&lt;SPAN class=""&gt;0&lt;/SPAN&gt;.&lt;SPAN class=""&gt;55&lt;/SPAN&gt;,&lt;SPAN class=""&gt;0&lt;/SPAN&gt;.&lt;SPAN class=""&gt;3&lt;/SPAN&gt;,&lt;SPAN class=""&gt;0&lt;/SPAN&gt;.&lt;SPAN class=""&gt;22&lt;/SPAN&gt;,&lt;SPAN class=""&gt;0&lt;/SPAN&gt;.&lt;SPAN class=""&gt;1&lt;/SPAN&gt;,&lt;SPAN class=""&gt;30&lt;/SPAN&gt;,,TRUE,,,,,,,,,,&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P class=""&gt;&lt;A class="" href="https://databrickslabs.github.io/overwatch/deployoverwatch/configureoverwatch/configuration/#overwatch-deployment-configuration" target="_blank" rel="noopener ugc nofollow"&gt;&lt;STRONG&gt;Configurations&lt;/STRONG&gt;&lt;/A&gt;: Configuration settings and options for deploying Overwatch.&lt;/P&gt;&lt;P class=""&gt;&lt;A class="" href="https://databrickslabs.github.io/overwatch/deployoverwatch/configureoverwatch/customcosts/" target="_blank" rel="noopener ugc nofollow"&gt;&lt;STRONG&gt;Custom Cost&lt;/STRONG&gt;&lt;/A&gt;: Information on configuring custom cost settings in Overwatch.&lt;/P&gt;&lt;P class=""&gt;&lt;STRONG&gt;Optimal Databricks Configuration&lt;/STRONG&gt;&lt;/P&gt;&lt;P class=""&gt;For deploying Overwatch, the following configuration worked optimally:&lt;/P&gt;&lt;P class=""&gt;-&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;Cluster DBR Version&lt;/STRONG&gt;: 13.3 LTS&lt;/P&gt;&lt;P class=""&gt;-&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;Overwatch JAR Version&lt;/STRONG&gt;: 0.8.1.2 (Latest as of August 2024)&lt;/P&gt;&lt;P class=""&gt;This specific combination of DBR and Overwatch JAR is recommended, as it proved to be the most reliable in recent tests. Other versions may encounter compatibility issues.&lt;/P&gt;&lt;P class=""&gt;&lt;STRONG&gt;Missing Libraries&lt;/STRONG&gt;:&lt;/P&gt;&lt;P class=""&gt;In the 13.3 LTS DBR version, a couple of libraries were missing:&lt;/P&gt;&lt;P class=""&gt;- org.scalaj:scalaj-http_2.12:2.4.2&lt;/P&gt;&lt;P class=""&gt;- dataframe_rules_engine_2.12:0.2.0&lt;/P&gt;&lt;P class=""&gt;These libraries might need to be installed manually on the cluster to ensure full functionality.&lt;/P&gt;&lt;P class=""&gt;&lt;STRONG&gt;Steps to Deploy Overwatch on Databricks (AWS)&lt;/STRONG&gt;&lt;/P&gt;&lt;P class=""&gt;Here is a comprehensive guide to deploying Overwatch on Databricks using the provided setup and configuration parameters:&lt;/P&gt;&lt;P class=""&gt;&lt;STRONG&gt;1. Import Library&lt;/STRONG&gt;&lt;/P&gt;&lt;P class=""&gt;Begin by importing the necessary library for Overwatch deployment:&lt;/P&gt;&lt;PRE&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;import&lt;/SPAN&gt; com.databricks.labs.overwatch.MultiWorkspaceDeployment&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P class=""&gt;&lt;STRONG&gt;2. Set Configuration Parameters&lt;/STRONG&gt;&lt;/P&gt;&lt;P class=""&gt;Define the parameters required for the deployment:&lt;/P&gt;&lt;PRE&gt;&lt;SPAN class=""&gt;&lt;BR /&gt;&lt;SPAN class=""&gt;val&lt;/SPAN&gt; &lt;SPAN class=""&gt;PATHTOCSVCONFIG&lt;/SPAN&gt; &lt;SPAN class=""&gt;=&lt;/SPAN&gt; &lt;SPAN class=""&gt;"dbfs:/FileStore/overwatch/configs/overwatch Configuration.csv"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class=""&gt;val&lt;/SPAN&gt; &lt;SPAN class=""&gt;CONFIGTABLENAME&lt;/SPAN&gt; &lt;SPAN class=""&gt;=&lt;/SPAN&gt; &lt;SPAN class=""&gt;"overwatch_dev_config"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class=""&gt;val&lt;/SPAN&gt; &lt;SPAN class=""&gt;TEMPDIR&lt;/SPAN&gt; &lt;SPAN class=""&gt;=&lt;/SPAN&gt; &lt;SPAN class=""&gt;"dbfs:/mnt/overwatch/tmp"&lt;/SPAN&gt; &lt;SPAN class=""&gt;// Update as necessary&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class=""&gt;val&lt;/SPAN&gt; &lt;SPAN class=""&gt;PARALLELISM&lt;/SPAN&gt; &lt;SPAN class=""&gt;=&lt;/SPAN&gt; &lt;SPAN class=""&gt;1&lt;/SPAN&gt; &lt;SPAN class=""&gt;// Adjust based on the number of workspaces to deploy&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class=""&gt;val&lt;/SPAN&gt; &lt;SPAN class=""&gt;STORAGEPREFIX&lt;/SPAN&gt; &lt;SPAN class=""&gt;=&lt;/SPAN&gt; &lt;SPAN class=""&gt;"dbfs:/mnt"&lt;/SPAN&gt; &lt;SPAN class=""&gt;// Update as necessary&lt;/SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P class=""&gt;-&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;PATHTOCSVCONFIG&lt;/STRONG&gt;: Path to the CSV file with Overwatch configuration.&lt;/P&gt;&lt;P class=""&gt;-&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;CONFIGTABLENAME&lt;/STRONG&gt;: Delta table where the Overwatch configuration will be saved or updated.&lt;/P&gt;&lt;P class=""&gt;-&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;TEMPDIR&lt;/STRONG&gt;: Temporary directory for intermediate files during deployment.&lt;/P&gt;&lt;P class=""&gt;-&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;PARALLELISM&lt;/STRONG&gt;: Number of workspaces to load simultaneously (up to ~20).&lt;/P&gt;&lt;P class=""&gt;-&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;STORAGEPREFIX&lt;/STRONG&gt;: Prefix for storage paths.&lt;/P&gt;&lt;P class=""&gt;&lt;STRONG&gt;3. Save CSV Content to Configuration Table&lt;/STRONG&gt;&lt;/P&gt;&lt;P class=""&gt;Load the CSV file and save its contents to the configuration table:&lt;/P&gt;&lt;PRE&gt;&lt;SPAN class=""&gt;spark.read&lt;BR /&gt;.&lt;SPAN class=""&gt;option&lt;/SPAN&gt;(&lt;SPAN class=""&gt;"header"&lt;/SPAN&gt;, &lt;SPAN class=""&gt;"true"&lt;/SPAN&gt;)&lt;BR /&gt;.&lt;SPAN class=""&gt;option&lt;/SPAN&gt;(&lt;SPAN class=""&gt;"ignoreLeadingWhiteSpace"&lt;/SPAN&gt;, &lt;SPAN class=""&gt;true&lt;/SPAN&gt;)&lt;BR /&gt;.&lt;SPAN class=""&gt;option&lt;/SPAN&gt;(&lt;SPAN class=""&gt;"ignoreTrailingWhiteSpace"&lt;/SPAN&gt;, &lt;SPAN class=""&gt;true&lt;/SPAN&gt;)&lt;BR /&gt;.csv(PATHTOCSVCONFIG)&lt;BR /&gt;.coalesce(&lt;SPAN class=""&gt;1&lt;/SPAN&gt;)&lt;BR /&gt;.write&lt;BR /&gt;.&lt;SPAN class=""&gt;option&lt;/SPAN&gt;(&lt;SPAN class=""&gt;"mergeSchema"&lt;/SPAN&gt;, &lt;SPAN class=""&gt;"true"&lt;/SPAN&gt;)&lt;BR /&gt;.mode(&lt;SPAN class=""&gt;"overwrite"&lt;/SPAN&gt;)&lt;BR /&gt;.format(&lt;SPAN class=""&gt;"delta"&lt;/SPAN&gt;)&lt;BR /&gt;.saveAsTable(CONFIGTABLENAME)&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P class=""&gt;&lt;STRONG&gt;4. Validate Deployment Configuration&lt;/STRONG&gt;&lt;/P&gt;&lt;P class=""&gt;Validate the deployment configuration using the `MultiWorkspaceDeployment` class:&lt;/P&gt;&lt;PRE&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;MultiWorkspaceDeployment&lt;/SPAN&gt;(CONFIGTABLENAME, TEMPDIR)&lt;SPAN class=""&gt;.validate&lt;/SPAN&gt;(PARALLELISM)&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P class=""&gt;&lt;A class="" href="https://databrickslabs.github.io/overwatch/deployoverwatch/configureoverwatch/validation//" target="_blank" rel="noopener ugc nofollow"&gt;&lt;STRONG&gt;Validation&lt;/STRONG&gt;&lt;/A&gt;: Guidance on validating your Overwatch deployment.&lt;/P&gt;&lt;P class=""&gt;&lt;STRONG&gt;5. Review Validation Results&lt;/STRONG&gt;&lt;/P&gt;&lt;P class=""&gt;Check the validation results to ensure everything is configured correctly:&lt;/P&gt;&lt;PRE&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;import&lt;/SPAN&gt; org.apache.spark.sql.expressions.Window&lt;BR /&gt;&lt;SPAN class=""&gt;import&lt;/SPAN&gt; org.apache.spark.sql.functions._&lt;BR /&gt;&lt;SPAN class=""&gt;// Display the latest validation results&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class=""&gt;val&lt;/SPAN&gt; &lt;SPAN class=""&gt;windowSpec&lt;/SPAN&gt; &lt;SPAN class=""&gt;=&lt;/SPAN&gt; Window.orderBy(col(&lt;SPAN class=""&gt;"snapTS"&lt;/SPAN&gt;).desc)&lt;BR /&gt;display(&lt;BR /&gt;spark.read.format(&lt;SPAN class=""&gt;"delta"&lt;/SPAN&gt;)&lt;BR /&gt;.load(&lt;SPAN class=""&gt;"dbfs:/mnt/overwatch_global_d1/report/validationReport"&lt;/SPAN&gt;)&lt;BR /&gt;.withColumn(&lt;SPAN class=""&gt;"rank"&lt;/SPAN&gt;, rank().over(windowSpec))&lt;BR /&gt;.filter(col(&lt;SPAN class=""&gt;"rank"&lt;/SPAN&gt;) === &lt;SPAN class=""&gt;1&lt;/SPAN&gt;)&lt;BR /&gt;.drop(&lt;SPAN class=""&gt;"rank"&lt;/SPAN&gt;)&lt;BR /&gt;.orderBy(&lt;SPAN class=""&gt;"validated"&lt;/SPAN&gt;)&lt;BR /&gt;)&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P class=""&gt;&lt;STRONG&gt;6. Final Deployment&lt;/STRONG&gt;&lt;/P&gt;&lt;P class=""&gt;Perform the final deployment for each layer (Bronze, Silver, Gold):&lt;/P&gt;&lt;P class=""&gt;&lt;STRONG&gt;Bronze Layer:&lt;/STRONG&gt;&lt;/P&gt;&lt;PRE&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;MultiWorkspaceDeployment&lt;/SPAN&gt;(CONFIGTABLENAME, TEMPDIR)&lt;SPAN class=""&gt;.deploy&lt;/SPAN&gt;(PARALLELISM, "Bronze")&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P class=""&gt;&lt;STRONG&gt;Silver Layer:&lt;/STRONG&gt;&lt;/P&gt;&lt;PRE&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;MultiWorkspaceDeployment&lt;/SPAN&gt;(CONFIGTABLENAME, TEMPDIR)&lt;SPAN class=""&gt;.deploy&lt;/SPAN&gt;(PARALLELISM, "Silver")&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P class=""&gt;&lt;STRONG&gt;Gold Layer:&lt;/STRONG&gt;&lt;/P&gt;&lt;PRE&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;MultiWorkspaceDeployment&lt;/SPAN&gt;(CONFIGTABLENAME, TEMPDIR)&lt;SPAN class=""&gt;.deploy&lt;/SPAN&gt;(PARALLELISM, "Gold")&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P class=""&gt;&lt;A class="" href="https://databrickslabs.github.io/overwatch/deployoverwatch/configureoverwatch/validation/" target="_blank" rel="noopener ugc nofollow"&gt;&lt;STRONG&gt;Running as Overwatch&lt;/STRONG&gt;&lt;/A&gt;: Additional details on running Overwatch.&lt;/P&gt;&lt;P class=""&gt;&lt;STRONG&gt;Final Deployment Report&lt;/STRONG&gt;&lt;/P&gt;&lt;P class=""&gt;Check the final deployment report using:&lt;/P&gt;&lt;PRE&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;SELECT&lt;/SPAN&gt; &lt;SPAN class=""&gt;*&lt;/SPAN&gt; &lt;SPAN class=""&gt;FROM&lt;/SPAN&gt; overwatch_etl.pipReport &lt;SPAN class=""&gt;ORDER&lt;/SPAN&gt; &lt;SPAN class=""&gt;BY&lt;/SPAN&gt; Pipeline_SnapTs &lt;SPAN class=""&gt;DESC&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P class=""&gt;By following these steps, you will deploy Overwatch on Databricks efficiently, using system tables as your data source and ensuring that all layers of the deployment are properly configured and validated.&lt;/P&gt;&lt;P class=""&gt;Got it! If you need any further assistance or have additional questions, feel free to reach out at&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A class="" href="mailto:contact@jiteshraut.me" target="_blank" rel="noopener ugc nofollow"&gt;contact@jiteshraut.me&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;or connect with you on&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A class="" href="https://www.linkedin.com/in/jiteshraut/" target="_blank" rel="noopener ugc nofollow"&gt;LinkedIn&lt;/A&gt;.&lt;/P&gt;&lt;P class=""&gt;Thank you!&lt;/P&gt;</description>
      <pubDate>Wed, 14 Aug 2024 18:37:04 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/deploying-overwatch-on-databricks-aws-with-system-tables-as-the/m-p/83009#M36810</guid>
      <dc:creator>jiteshraut20</dc:creator>
      <dc:date>2024-08-14T18:37:04Z</dc:date>
    </item>
    <item>
      <title>Re: Deploying Overwatch on Databricks (AWS) with System Tables as the Data Source</title>
      <link>https://community.databricks.com/t5/data-engineering/deploying-overwatch-on-databricks-aws-with-system-tables-as-the/m-p/83048#M36825</link>
      <description>&lt;P&gt;hey&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/115434"&gt;@jiteshraut20&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The below mentioned libraries are not required for the deployment. Please read the documentation carefully&amp;nbsp;&lt;/P&gt;
&lt;P class=""&gt;- org.scalaj:scalaj-http_2.12:2.4.2&lt;/P&gt;
&lt;P class=""&gt;- dataframe_rules_engine_2.12:0.2.0&lt;/P&gt;
&lt;P class=""&gt;Also all the overwatch documents are updated frequently after every release.&lt;/P&gt;</description>
      <pubDate>Thu, 15 Aug 2024 06:30:24 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/deploying-overwatch-on-databricks-aws-with-system-tables-as-the/m-p/83048#M36825</guid>
      <dc:creator>AmanJain</dc:creator>
      <dc:date>2024-08-15T06:30:24Z</dc:date>
    </item>
    <item>
      <title>Re: Deploying Overwatch on Databricks (AWS) with System Tables as the Data Source</title>
      <link>https://community.databricks.com/t5/data-engineering/deploying-overwatch-on-databricks-aws-with-system-tables-as-the/m-p/104795#M41885</link>
      <description>&lt;P&gt;hi&amp;nbsp;&lt;A href="https://community.databricks.com/t5/user/viewprofilepage/user-id/115434" target="_blank"&gt;@jiteshraut20&lt;/A&gt;, Thanks for your post. From my set up, validation seems to work.&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;SPAN&gt;Wrote 32 bytes. Validation report has been saved to dbfs:/mnt/overwatch_global/multi_ow_dep/report/validationReport &lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN&gt;Validation report details &lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN&gt;Total validation count: 35 &lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN&gt;Failed validation count:0 &lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN&gt;Report run duration in sec : 14&amp;nbsp;&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;Deployment step is resulting in this error:&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;SPAN&gt;AnalysisException: CREATE SCHEMA in Unity Catalog must use MANAGED LOCATION, not LOCATION&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Can you please let me know correct value for :&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;val&lt;/SPAN&gt; &lt;SPAN&gt;STORAGEPREFIX&lt;/SPAN&gt; &lt;SPAN&gt;=&lt;/SPAN&gt; &lt;SPAN&gt;"dbfs:/mnt/overwatch_global/multi_ow_dep"&lt;/SPAN&gt;&lt;SPAN&gt; &amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;// CHANGEME&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;?&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 08 Jan 2025 23:09:11 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/deploying-overwatch-on-databricks-aws-with-system-tables-as-the/m-p/104795#M41885</guid>
      <dc:creator>raghu2</dc:creator>
      <dc:date>2025-01-08T23:09:11Z</dc:date>
    </item>
  </channel>
</rss>

