<?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>New knowledge base articles in Learning &amp; Certification</title>
    <link>https://community.databricks.com/t5/learning-certification/ct-p/databricks-learning</link>
    <description>New knowledge base articles in Learning &amp; Certification</description>
    <pubDate>Thu, 09 Jul 2026 18:44:21 GMT</pubDate>
    <dc:creator>databricks-learning</dc:creator>
    <dc:date>2026-07-09T18:44:21Z</dc:date>
    <item>
      <title>Getting started with Databricks - Deploy an LLM chatbot using Databricks Vector Search and Foundation Model API</title>
      <link>https://community.databricks.com/t5/get-started-guides/getting-started-with-databricks-deploy-an-llm-chatbot-using/ta-p/80764</link>
      <description>&lt;DIV class="lia-message-template-content-zone"&gt;
&lt;DIV class="jp-Cell jp-MarkdownCell jp-Notebook-cell"&gt;
&lt;DIV class="jp-Cell-inputWrapper"&gt;
&lt;DIV class="jp-InputArea jp-Cell-inputArea"&gt;
&lt;DIV class="jp-RenderedHTMLCommon jp-RenderedMarkdown jp-MarkdownOutput" data-mime-type="text/markdown"&gt;
&lt;H1 id="Simple-RAG-Example-using-Vector-Search-and-the-Foundation-Model-API"&gt;Getting started with Databricks - Deploy an LLM chatbot using Databricks Vector Search and Foundation Model API&lt;/H1&gt;
&lt;P&gt;This guide demonstrates how to build a simple Retrieval-Augmented Generation (RAG) application using Databricks Vector Search, a vector database seamlessly integrated with Databricks' Foundation Model API (FMAPI) embedding models.&lt;/P&gt;
&lt;P&gt;RAG is a widely adopted architecture for creating natural-language interfaces that allow users to interact with organizational data effectively. This tutorial will walk you through setting up a vector index, loading text data, querying the database, building a prompt for a large language model (LLM), and finally querying the LLM using the FMAPI. All these steps can be completed in just 30 minutes.&lt;/P&gt;
&lt;P&gt;This is a beginner’s guide with hands-on instructions that you can follow in your own Databricks workspace. &lt;BR /&gt;&lt;BR /&gt;To learn more about how Databricks Vector Search works, refer to the documentation &lt;A href="https://docs.databricks.com/en/generative-ai/vector-search.html#how-does-vector-search-work" target="_self"&gt;here&lt;/A&gt;.&lt;BR /&gt;For more information on querying models via the Foundation Model APIs, see the documentation &lt;A href="https://docs.databricks.com/en/machine-learning/model-serving/score-foundation-models.html#query-foundation-models" target="_self"&gt;here&lt;/A&gt;.&lt;/P&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;DIV class="jp-Cell jp-MarkdownCell jp-Notebook-cell"&gt;
&lt;DIV class="jp-Cell-inputWrapper"&gt;
&lt;DIV class="jp-Collapser jp-InputCollapser jp-Cell-inputCollapser"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class="jp-InputArea jp-Cell-inputArea"&gt;
&lt;DIV class="jp-RenderedHTMLCommon jp-RenderedMarkdown jp-MarkdownOutput" data-mime-type="text/markdown"&gt;
&lt;H2 id="Setup"&gt;Setup&lt;/H2&gt;
&lt;P&gt;First, we will install the necessary libraries and set up a temporary catalog/schema/table for this example.&lt;/P&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;DIV class="jp-Cell jp-CodeCell jp-Notebook-cell jp-mod-noOutputs"&gt;
&lt;DIV class="jp-Cell-inputWrapper"&gt;
&lt;DIV class="jp-Collapser jp-InputCollapser jp-Cell-inputCollapser"&gt;&lt;LI-CODE lang="python"&gt;In [ ]:
%pip install --upgrade databricks-vectorsearch databricks-genai-inference dbutils.library.restartPython()&lt;/LI-CODE&gt;&lt;/DIV&gt;
&lt;DIV class="jp-InputArea jp-Cell-inputArea"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;DIV class="jp-Cell jp-MarkdownCell jp-Notebook-cell"&gt;
&lt;DIV class="jp-Cell-inputWrapper"&gt;
&lt;DIV class="jp-InputArea jp-Cell-inputArea"&gt;
&lt;DIV class="jp-RenderedHTMLCommon jp-RenderedMarkdown jp-MarkdownOutput" data-mime-type="text/markdown"&gt;
&lt;H3 id="Define-catalog,-table,-endpoint,-and-index-names"&gt;Define catalog, table, endpoint, and index names&lt;/H3&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;DIV class="jp-Cell jp-CodeCell jp-Notebook-cell jp-mod-noOutputs"&gt;
&lt;DIV class="jp-Cell-inputWrapper"&gt;
&lt;DIV class="jp-Collapser jp-InputCollapser jp-Cell-inputCollapser"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class="jp-InputArea jp-Cell-inputArea"&gt;
&lt;DIV class="jp-CodeMirrorEditor jp-Editor jp-InputArea-editor" data-type="inline"&gt;
&lt;DIV class="cm-editor cm-s-jupyter language-python hljs"&gt;&lt;LI-CODE lang="markup"&gt;In [ ]:
CATALOG = "workspace" DB='vs_demo' SOURCE_TABLE_NAME = "documents" SOURCE_TABLE_FULLNAME=f"{CATALOG}.{DB}.{SOURCE_TABLE_NAME}"&lt;/LI-CODE&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;DIV class="jp-Cell jp-MarkdownCell jp-Notebook-cell"&gt;
&lt;DIV class="jp-Cell-inputWrapper"&gt;
&lt;DIV class="jp-InputArea jp-Cell-inputArea"&gt;
&lt;DIV class="jp-InputPrompt jp-InputArea-prompt"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class="jp-RenderedHTMLCommon jp-RenderedMarkdown jp-MarkdownOutput" data-mime-type="text/markdown"&gt;
&lt;H3 id="Create-Catalog,-Schema,-and-Table"&gt;Create Catalog, Schema, and Table&lt;/H3&gt;
&lt;P&gt;A Databricks Vector Search Index is created from a Delta Table. The source Delta Table includes the data we ultimately want to index and search with the vector database. In this cell, we create the catalog, schema, and source table from which we will create the vector database.&lt;/P&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;DIV class="jp-Cell jp-CodeCell jp-Notebook-cell jp-mod-noOutputs"&gt;
&lt;DIV class="jp-Cell-inputWrapper"&gt;
&lt;DIV class="jp-Collapser jp-InputCollapser jp-Cell-inputCollapser"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;DIV class="jp-Cell jp-MarkdownCell jp-Notebook-cell"&gt;
&lt;DIV class="jp-Cell-inputWrapper"&gt;
&lt;DIV class="jp-InputArea jp-Cell-inputArea"&gt;
&lt;DIV class="jp-InputPrompt jp-InputArea-prompt"&gt;&lt;LI-CODE lang="python"&gt;In [ ]:
# Set up schema/volume/table from pyspark.sql.types 

import StructType, StructField, StringType, ArrayType, FloatType spark.sql(f"CREATE SCHEMA IF NOT EXISTS {CATALOG}.{DB}") spark.sql( f"""CREATE TABLE IF NOT EXISTS {SOURCE_TABLE_FULLNAME} ( id STRING, text STRING, date DATE, title STRING ) USING delta TBLPROPERTIES ('delta.enableChangeDataFeed' = 'true') """ )
&lt;/LI-CODE&gt;&lt;/DIV&gt;
&lt;DIV class="jp-RenderedHTMLCommon jp-RenderedMarkdown jp-MarkdownOutput" data-mime-type="text/markdown"&gt;
&lt;H2 id="Set-up-the-Vector-Database"&gt;Set up the Vector Database&lt;/H2&gt;
&lt;P&gt;Next, we set up the vector database. There are three key steps:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Initialize the vector search client&lt;/LI&gt;
&lt;LI&gt;Create the endpoint&lt;/LI&gt;
&lt;LI&gt;Create the index using the source Delta table we created earlier and the&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;CODE&gt;bge-large-en&lt;/CODE&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;embeddings model from the Foundation Model API&lt;/LI&gt;
&lt;/OL&gt;
&lt;H3 id="Initialize-the-Vector-Search-Client"&gt;Initialize the Vector Search Client&lt;/H3&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;DIV class="jp-Cell jp-CodeCell jp-Notebook-cell jp-mod-noOutputs"&gt;
&lt;DIV class="jp-Cell-inputWrapper"&gt;
&lt;DIV class="jp-InputArea jp-Cell-inputArea"&gt;
&lt;DIV class="jp-CodeMirrorEditor jp-Editor jp-InputArea-editor" data-type="inline"&gt;
&lt;DIV class="cm-editor cm-s-jupyter language-python hljs"&gt;&lt;LI-CODE lang="python"&gt;In [ ]:
from databricks.vector_search.client import VectorSearchClient vsc = VectorSearchClient()&lt;/LI-CODE&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;DIV class="jp-Cell jp-MarkdownCell jp-Notebook-cell"&gt;
&lt;DIV class="jp-Cell-inputWrapper"&gt;
&lt;DIV class="jp-Collapser jp-InputCollapser jp-Cell-inputCollapser"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class="jp-InputArea jp-Cell-inputArea"&gt;
&lt;DIV class="jp-RenderedHTMLCommon jp-RenderedMarkdown jp-MarkdownOutput" data-mime-type="text/markdown"&gt;
&lt;H3 id="Create-the-Endpoint"&gt;Create the Endpoint&lt;/H3&gt;
&lt;P&gt;The cell below will check if the endpoint already exists and create it if it does not.&lt;/P&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;DIV class="jp-Cell jp-CodeCell jp-Notebook-cell jp-mod-noOutputs"&gt;
&lt;DIV class="jp-Cell-inputWrapper"&gt;
&lt;DIV class="jp-Collapser jp-InputCollapser jp-Cell-inputCollapser"&gt;&lt;LI-CODE lang="python"&gt;In [ ]:
VS_ENDPOINT_NAME = 'vs_endpoint' if vsc.list_endpoints().get('endpoints') == None or not VS_ENDPOINT_NAME in [endpoint.get('name') for endpoint in vsc.list_endpoints().get('endpoints')]: print(f"Creating new Vector Search endpoint named {VS_ENDPOINT_NAME}") vsc.create_endpoint(VS_ENDPOINT_NAME) else: print(f"Endpoint {VS_ENDPOINT_NAME} already exists.") vsc.wait_for_endpoint(VS_ENDPOINT_NAME, 600)
&lt;/LI-CODE&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;DIV class="jp-Cell jp-MarkdownCell jp-Notebook-cell"&gt;
&lt;DIV class="jp-Cell-inputWrapper"&gt;
&lt;DIV class="jp-InputArea jp-Cell-inputArea"&gt;
&lt;DIV class="jp-InputPrompt jp-InputArea-prompt"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class="jp-InputPrompt jp-InputArea-prompt"&gt;&lt;SPAN&gt;Create the Vector Index&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV class="jp-RenderedHTMLCommon jp-RenderedMarkdown jp-MarkdownOutput" data-mime-type="text/markdown"&gt;
&lt;P&gt;Now we can create the index over the Delta table we created earlier.&lt;/P&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;DIV class="jp-Cell jp-CodeCell jp-Notebook-cell jp-mod-noOutputs"&gt;
&lt;DIV class="jp-Cell-inputWrapper"&gt;
&lt;DIV class="jp-Collapser jp-InputCollapser jp-Cell-inputCollapser"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class="jp-InputArea jp-Cell-inputArea"&gt;
&lt;DIV class="jp-InputPrompt jp-InputArea-prompt"&gt;&lt;LI-CODE lang="python"&gt;In [ ]:
VS_INDEX_NAME = 'fm_api_examples_vs_index' 
VS_INDEX_FULLNAME = f"{CATALOG}.{DB}.{VS_INDEX_NAME}" 

if not VS_INDEX_FULLNAME in [index.get("name") for index in vsc.list_indexes(VS_ENDPOINT_NAME).get('vector_indexes', [])]:
    try:
        # set up an index with managed embeddings
        print("Creating Vector Index...")
        i = vsc.create_delta_sync_index_and_wait(
            endpoint_name=VS_ENDPOINT_NAME,
            index_name=VS_INDEX_FULLNAME,
            source_table_name=SOURCE_TABLE_FULLNAME,
            pipeline_type="TRIGGERED",
            primary_key="id",
            embedding_source_column="text",
            embedding_model_endpoint_name="databricks-bge-large-en"
        )
    except Exception as e:
        if "INTERNAL_ERROR" in str(e):
            # Check if the index exists after the error occurred
            if VS_INDEX_FULLNAME in [index.get("name") for index in vsc.list_indexes(VS_ENDPOINT_NAME).get('vector_indexes', [])]:
                print(f"Index {VS_INDEX_FULLNAME} has been created.")
            else:
                raise e
        else:
            raise e
else:
    print(f"Index {VS_INDEX_FULLNAME} already exists.")&lt;/LI-CODE&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;DIV class="jp-Cell jp-MarkdownCell jp-Notebook-cell"&gt;
&lt;DIV class="jp-Cell-inputWrapper"&gt;
&lt;DIV class="jp-Collapser jp-InputCollapser jp-Cell-inputCollapser"&gt;&lt;SPAN&gt;There are a few key points to note about the specific configuration we used in this case:&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV class="jp-InputArea jp-Cell-inputArea"&gt;
&lt;DIV class="jp-RenderedHTMLCommon jp-RenderedMarkdown jp-MarkdownOutput" data-mime-type="text/markdown"&gt;
&lt;UL&gt;
&lt;LI&gt;
&lt;P&gt;We used&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;CODE&gt;pipeline_type="TRIGGERED"&lt;/CODE&gt;. This requires us to use the index's&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;CODE&gt;sync()&lt;/CODE&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;method to manually sync the source Delta table with the index. We could, alternatively, use&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;CODE&gt;pipeline_type="CONTINUOUS"&lt;/CODE&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;which will automatically keep the index in sync with the source table with only seconds of latency. This approach is more costly, though, as a compute cluster must be provisioned for the continuous sync streaming pipeline.&lt;/P&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;P&gt;We specified&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;CODE&gt;embedding_model_endpoint_name="databricks-bge-large-en"&lt;/CODE&gt;. We can use any embedding model available via model serving; this is the name of the pay-per-token Foundation Model API version of&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;CODE&gt;databricks-bge-large-en&lt;/CODE&gt;. By passing an&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;CODE&gt;embedding_source_column&lt;/CODE&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;and&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;CODE&gt;embedding_model_endpoint_name&lt;/CODE&gt;, we configure the index such that it will automatically use the model to generate embeddings for the texts in the&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;CODE&gt;text&lt;/CODE&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;column of the source table. We do not need to manually generate embeddings.&lt;/P&gt;
&lt;P&gt;If, however, we did want to manage embeddings manually, we could include the following arguments instead:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;  embedding_vector_column="&amp;lt;embedding_column&amp;gt;",
  embedding_dimension=&amp;lt;embedding_dimension&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;In the latter approach, we include a column for embeddings in the source delta table and embeddings are&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;EM&gt;not&lt;/EM&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;computed automatically from the text column.&lt;/P&gt;
&lt;/LI&gt;
&lt;/UL&gt;
&lt;H2 id="Set-up-some-example-texts"&gt;Set up some example texts&lt;/H2&gt;
&lt;P&gt;Now we set up some example texts to index.&lt;/P&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;DIV class="jp-Cell jp-CodeCell jp-Notebook-cell jp-mod-noOutputs"&gt;
&lt;DIV class="jp-Cell-inputWrapper"&gt;
&lt;DIV class="jp-Collapser jp-InputCollapser jp-Cell-inputCollapser"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class="jp-InputArea jp-Cell-inputArea"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;DIV class="jp-Cell jp-MarkdownCell jp-Notebook-cell"&gt;
&lt;DIV class="jp-Cell-inputWrapper"&gt;
&lt;DIV class="jp-InputArea jp-Cell-inputArea"&gt;
&lt;DIV class="jp-InputPrompt jp-InputArea-prompt"&gt;&lt;LI-CODE lang="python"&gt;# Some example texts
from datetime import datetime


smarter_overview = {"text":"""
S.M.A.R.T.E.R. Initiative: Strategic Management for Achieving Results through Efficiency and Resources
Introduction
The S.M.A.R.T.E.R. Initiative, standing for "Strategic Management for Achieving Results through Efficiency and Resources," is a groundbreaking project aimed at revolutionizing the way our organization operates. In today's rapidly changing business landscape, achieving success demands a strategic approach that leverages resources effectively while optimizing efficiency. The S.M.A.R.T.E.R. Initiative is designed to do just that.

Background
As markets evolve and competition intensifies, organizations must adapt to stay relevant and profitable. Traditional methods of operation often become inefficient and costly. The S.M.A.R.T.E.R. Initiative was conceived as a response to this challenge, with the primary goal of enhancing strategic management practices to achieve better results.

Objectives
1. Resource Optimization
One of the key objectives of the S.M.A.R.T.E.R. Initiative is to optimize resource allocation. This involves identifying underutilized resources, streamlining processes, and reallocating resources to areas that contribute most to our strategic goals.

2. Efficiency Improvement
Efficiency is at the core of the S.M.A.R.T.E.R. Initiative. By identifying bottlenecks and improving processes, we aim to reduce operational costs, shorten project timelines, and enhance overall productivity.

3. Strategic Alignment
For any organization to succeed, its activities must be aligned with its strategic objectives. The S.M.A.R.T.E.R. Initiative will ensure that every action and resource allocation is in sync with our long-term strategic goals.

4. Results-driven Approach
The ultimate measure of success is results. The S.M.A.R.T.E.R. Initiative will foster a results-driven culture within our organization, where decisions and actions are guided by their impact on our bottom line and strategic objectives.

Key Components
The S.M.A.R.T.E.R. Initiative comprises several key components:

1. Data Analytics and Insights
Data is the foundation of informed decision-making. We will invest in advanced data analytics tools to gain insights into our operations, customer behavior, and market trends. These insights will guide our resource allocation and strategy.

2. Process Automation
Automation will play a vital role in enhancing efficiency. Routine and repetitive tasks will be automated, freeing up our workforce to focus on more strategic activities.

3. Performance Metrics and KPIs
To ensure that our efforts are aligned with our objectives, we will establish a comprehensive set of Key Performance Indicators (KPIs). Regular monitoring and reporting will provide visibility into our progress.

4. Training and Development
Enhancing our workforce's skills is essential. We will invest in training and development programs to equip our employees with the knowledge and tools needed to excel in their roles.

Implementation Timeline
The S.M.A.R.T.E.R. Initiative will be implemented in phases over the next three years. This phased approach allows for a smooth transition and ensures that each component is integrated effectively into our operations.

Conclusion
The S.M.A.R.T.E.R. Initiative represents a significant step forward for our organization. By strategically managing our resources and optimizing efficiency, we are positioning ourselves for sustained success in a competitive marketplace. This initiative is a testament to our commitment to excellence and our dedication to achieving exceptional results.

As we embark on this journey, we look forward to the transformative impact that the S.M.A.R.T.E.R. Initiative will have on our organization and the benefits it will bring to our employees, customers, and stakeholders.
""", "title": "Project Kickoff", "date": datetime.strptime("2024-01-16", "%Y-%m-%d")}

smarter_kpis = {"text": """S.M.A.R.T.E.R. Initiative: Key Performance Indicators (KPIs)
Introduction
The S.M.A.R.T.E.R. Initiative (Strategic Management for Achieving Results through Efficiency and Resources) is designed to drive excellence within our organization. To measure the success and effectiveness of this initiative, we have established three concrete and measurable Key Performance Indicators (KPIs). This document outlines these KPIs and their associated targets.

Key Performance Indicators (KPIs)
1. Resource Utilization Efficiency (RUE)
Objective: To optimize resource utilization for cost-efficiency.

KPI Definition: RUE will be calculated as (Actual Resource Utilization / Planned Resource Utilization) * 100%.

Target: Achieve a 15% increase in RUE within the first year.

2. Time-to-Decision Reduction (TDR)
Objective: To streamline operational processes and reduce decision-making time.

KPI Definition: TDR will be calculated as (Pre-Initiative Decision Time - Post-Initiative Decision Time) / Pre-Initiative Decision Time.

Target: Achieve a 20% reduction in TDR for critical business decisions.

3. Strategic Goals Achievement (SGA)
Objective: To ensure that organizational activities align with strategic goals.

KPI Definition: SGA will measure the percentage of predefined strategic objectives achieved.

Target: Achieve an 80% Strategic Goals Achievement rate within two years.

Conclusion
These three KPIs, Resource Utilization Efficiency (RUE), Time-to-Decision Reduction (TDR), and Strategic Goals Achievement (SGA), will serve as crucial metrics for evaluating the success of the S.M.A.R.T.E.R. Initiative. By tracking these KPIs and working towards their targets, we aim to drive efficiency, optimize resource utilization, and align our actions with our strategic objectives. This focus on measurable outcomes will guide our efforts towards achieving excellence within our organization.""",
"title": "Project KPIs", "date": datetime.strptime("2024-01-16", "%Y-%m-%d")}
     &lt;/LI-CODE&gt;&lt;/DIV&gt;
&lt;DIV class="jp-RenderedHTMLCommon jp-RenderedMarkdown jp-MarkdownOutput" data-mime-type="text/markdown"&gt;
&lt;H3 id="Chunk-the-texts"&gt;Chunk the texts&lt;/H3&gt;
&lt;P&gt;Typically, when using a vector database for retrieval-augmented generation (RAG) tasks, we break the texts apart into smaller (and sometimes overlapping) chunks to return focused and relevant information without returning an excessive amount of text.&lt;/P&gt;
&lt;P&gt;In the code below, we break the sample texts above into shorter overlapping text chunks.&lt;/P&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;DIV class="jp-Cell jp-CodeCell jp-Notebook-cell jp-mod-noOutputs"&gt;
&lt;DIV class="jp-Cell-inputWrapper"&gt;
&lt;DIV class="jp-Collapser jp-InputCollapser jp-Cell-inputCollapser"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class="jp-InputArea jp-Cell-inputArea"&gt;
&lt;DIV class="jp-CodeMirrorEditor jp-Editor jp-InputArea-editor" data-type="inline"&gt;
&lt;DIV class="cm-editor cm-s-jupyter language-python hljs"&gt;&lt;LI-CODE lang="python"&gt;import re

def chunk_text(text, chunk_size, overlap):
    words = text.split()
    chunks = []
    index = 0

    while index &amp;lt; len(words):
        end = index + chunk_size
        while end &amp;lt; len(words) and not re.match(r'.*[.!?]\s*$', words[end]):
            end += 1
        chunk = ' '.join(words[index:end+1])
        chunks.append(chunk)
        index += chunk_size - overlap

    return chunks

chunks = []
documents = [smarter_overview, smarter_kpis]

for document in documents:
    for i, c in enumerate(chunk_text(document["text"], 150, 25)):
        chunk = {}
        chunk["text"] = c
        chunk["title"] = document["title"]
        chunk["date"] = document["date"]
        chunk["id"] = document["title"] + "_" + str(i)

        chunks.append(chunk)&lt;/LI-CODE&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;DIV class="jp-Cell jp-MarkdownCell jp-Notebook-cell"&gt;
&lt;DIV class="jp-Cell-inputWrapper"&gt;
&lt;DIV class="jp-Collapser jp-InputCollapser jp-Cell-inputCollapser"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class="jp-InputArea jp-Cell-inputArea"&gt;
&lt;DIV class="jp-InputPrompt jp-InputArea-prompt"&gt;&lt;SPAN&gt;Insert the text chunks into the source delta table&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV class="jp-RenderedHTMLCommon jp-RenderedMarkdown jp-MarkdownOutput" data-mime-type="text/markdown"&gt;
&lt;P&gt;Now we save the chunks, along with some metadata (a document title, date, and a unique id) to the source delta table.&lt;/P&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;DIV class="jp-Cell jp-CodeCell jp-Notebook-cell jp-mod-noOutputs"&gt;
&lt;DIV class="jp-Cell-inputWrapper"&gt;
&lt;DIV class="jp-Collapser jp-InputCollapser jp-Cell-inputCollapser"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class="jp-InputArea jp-Cell-inputArea"&gt;
&lt;DIV class="jp-CodeMirrorEditor jp-Editor jp-InputArea-editor" data-type="inline"&gt;
&lt;DIV class="cm-editor cm-s-jupyter language-python hljs"&gt;&lt;LI-CODE lang="python"&gt;from pyspark.sql.types import StructType, StructField, StringType, ArrayType, FloatType, DateType

schema = StructType(
    [
        StructField("id", StringType(), True),
        StructField("text", StringType(), True),
        StructField("title", StringType(), True),
        StructField("date", DateType(), True),
    ]
)

if chunks:
    result_df = spark.createDataFrame(chunks, schema=schema)
    result_df.write.format("delta").mode("append").saveAsTable(
        SOURCE_TABLE_FULLNAME
    )
     &lt;/LI-CODE&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;DIV class="jp-Cell jp-MarkdownCell jp-Notebook-cell"&gt;
&lt;DIV class="jp-Cell-inputWrapper"&gt;
&lt;DIV class="jp-Collapser jp-InputCollapser jp-Cell-inputCollapser"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class="jp-InputArea jp-Cell-inputArea"&gt;
&lt;DIV class="jp-RenderedHTMLCommon jp-RenderedMarkdown jp-MarkdownOutput" data-mime-type="text/markdown"&gt;
&lt;H2 id="Sync-the-Vector-Search-Index"&gt;Sync the Vector Search Index&lt;/H2&gt;
&lt;P&gt;Because we specified&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;CODE&gt;pipeline_type="TRIGGERED"&lt;/CODE&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;when configuring the Delta Index, we still need to manually tell the index to sync with the delta table. This will take a few minutes.&lt;/P&gt;
&lt;P&gt;This will not work if the index is not ready yet. We use the&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;CODE&gt;wait_until_ready&lt;/CODE&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;method to wait until the index is ready.&lt;/P&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;DIV class="jp-Cell jp-CodeCell jp-Notebook-cell jp-mod-noOutputs"&gt;
&lt;DIV class="jp-Cell-inputWrapper"&gt;
&lt;DIV class="jp-Collapser jp-InputCollapser jp-Cell-inputCollapser"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class="jp-InputArea jp-Cell-inputArea"&gt;
&lt;DIV class="jp-CodeMirrorEditor jp-Editor jp-InputArea-editor" data-type="inline"&gt;
&lt;DIV class="cm-editor cm-s-jupyter language-python hljs"&gt;&lt;LI-CODE lang="python"&gt;In [ ]:
# Sync 

index = vsc.get_index(endpoint_name=VS_ENDPOINT_NAME, index_name=VS_INDEX_FULLNAME) index.sync()&lt;/LI-CODE&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;DIV class="jp-Cell jp-MarkdownCell jp-Notebook-cell"&gt;
&lt;DIV class="jp-Cell-inputWrapper"&gt;
&lt;DIV class="jp-Collapser jp-InputCollapser jp-Cell-inputCollapser"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class="jp-InputArea jp-Cell-inputArea"&gt;
&lt;DIV class="jp-RenderedHTMLCommon jp-RenderedMarkdown jp-MarkdownOutput" data-mime-type="text/markdown"&gt;
&lt;H2 id="Query-the-Vector-Index"&gt;Query the Vector Index&lt;/H2&gt;
&lt;P&gt;Now that we have added our text chunks to the source delta table and synced it with the Vector Search index, we're ready to query the index! We do this with the&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;CODE&gt;index.similarity_search()&lt;/CODE&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;method.&lt;/P&gt;
&lt;P&gt;The&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;CODE&gt;columns&lt;/CODE&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;argument takes a list of the columns we want returned; in this case, we request the text and title columns.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;NOTE&lt;/STRONG&gt;: If the cell below does not return any results, wait a couple of minutes and try again. The index may still be syncing.&lt;/P&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;DIV class="jp-Cell jp-CodeCell jp-Notebook-cell jp-mod-noOutputs"&gt;
&lt;DIV class="jp-Cell-inputWrapper"&gt;
&lt;DIV class="jp-Collapser jp-InputCollapser jp-Cell-inputCollapser"&gt;&lt;LI-CODE lang="python"&gt;In [ ]:
# query

 index.similarity_search(columns=["text", "title"], query_text="What is the TDR Target for the SMARTER initiative?", num_results = 3)&lt;/LI-CODE&gt;&lt;/DIV&gt;
&lt;DIV class="jp-InputArea jp-Cell-inputArea"&gt;
&lt;DIV class="jp-CodeMirrorEditor jp-Editor jp-InputArea-editor" data-type="inline"&gt;
&lt;DIV class="cm-editor cm-s-jupyter language-python hljs"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;DIV class="jp-Cell jp-MarkdownCell jp-Notebook-cell"&gt;
&lt;DIV class="jp-Cell-inputWrapper"&gt;
&lt;DIV class="jp-InputArea jp-Cell-inputArea"&gt;
&lt;DIV class="jp-RenderedHTMLCommon jp-RenderedMarkdown jp-MarkdownOutput" data-mime-type="text/markdown"&gt;
&lt;H2 id="Answering-Questions-about-the-Output"&gt;Answering Questions about the Output&lt;/H2&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;DIV class="jp-Cell jp-CodeCell jp-Notebook-cell jp-mod-noOutputs"&gt;
&lt;DIV class="jp-Cell-inputWrapper"&gt;
&lt;DIV class="jp-Collapser jp-InputCollapser jp-Cell-inputCollapser"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class="jp-InputArea jp-Cell-inputArea"&gt;
&lt;DIV class="jp-CodeMirrorEditor jp-Editor jp-InputArea-editor" data-type="inline"&gt;
&lt;DIV class="cm-editor cm-s-jupyter language-python hljs"&gt;&lt;LI-CODE lang="python"&gt;from databricks_genai_inference import ChatSession

chat = ChatSession(model="databricks-meta-llama-3-70b-instruct",
                   system_message="You are a helpful assistant.",
                   max_tokens=128)&lt;/LI-CODE&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;DIV class="jp-Cell jp-MarkdownCell jp-Notebook-cell"&gt;
&lt;DIV class="jp-Cell-inputWrapper"&gt;
&lt;DIV class="jp-Collapser jp-InputCollapser jp-Cell-inputCollapser"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class="jp-InputArea jp-Cell-inputArea"&gt;
&lt;DIV class="jp-InputPrompt jp-InputArea-prompt"&gt;&lt;SPAN&gt;First, let's ask a question&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;EM style="color: #1b3139; font-family: inherit;"&gt;without&lt;/EM&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;RAG.&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;DIV class="jp-Cell jp-CodeCell jp-Notebook-cell jp-mod-noOutputs"&gt;
&lt;DIV class="jp-Cell-inputWrapper"&gt;
&lt;DIV class="jp-Collapser jp-InputCollapser jp-Cell-inputCollapser"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class="jp-InputArea jp-Cell-inputArea"&gt;
&lt;DIV class="jp-CodeMirrorEditor jp-Editor jp-InputArea-editor" data-type="inline"&gt;
&lt;DIV class="cm-editor cm-s-jupyter language-python hljs"&gt;&lt;LI-CODE lang="python"&gt;chat.reply("What is the TDR Target for the SMARTER initiative?")
chat.last&lt;/LI-CODE&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;DIV class="jp-Cell jp-MarkdownCell jp-Notebook-cell"&gt;
&lt;DIV class="jp-Cell-inputWrapper"&gt;
&lt;DIV class="jp-Collapser jp-InputCollapser jp-Cell-inputCollapser"&gt;&lt;SPAN&gt;As you can see, its response has nothing to do with the documents we processed above.&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;DIV class="jp-Cell jp-MarkdownCell jp-Notebook-cell"&gt;
&lt;DIV class="jp-Cell-inputWrapper"&gt;
&lt;DIV class="jp-InputArea jp-Cell-inputArea"&gt;
&lt;DIV class="jp-RenderedHTMLCommon jp-RenderedMarkdown jp-MarkdownOutput" data-mime-type="text/markdown"&gt;
&lt;P&gt;Now let's see what kind of reply we get when we provide context from vector search.&lt;/P&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;DIV class="jp-Cell jp-CodeCell jp-Notebook-cell jp-mod-noOutputs"&gt;
&lt;DIV class="jp-Cell-inputWrapper"&gt;
&lt;DIV class="jp-Collapser jp-InputCollapser jp-Cell-inputCollapser"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class="jp-InputArea jp-Cell-inputArea"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;DIV class="jp-Cell jp-MarkdownCell jp-Notebook-cell"&gt;
&lt;DIV class="jp-Cell-inputWrapper"&gt;
&lt;DIV class="jp-InputArea jp-Cell-inputArea"&gt;
&lt;DIV class="jp-InputPrompt jp-InputArea-prompt"&gt;&lt;LI-CODE lang="python"&gt;# reset history
chat = ChatSession(model="databricks-meta-llama-3-70b-instruct",
                   system_message="You are a helpful assistant. Answer the user's question based on the provided context.",
                   max_tokens=128)

# get context from vector search
raw_context = index.similarity_search(columns=["text", "title"],
                        query_text="What is the TDR Target for the SMARTER initiative?",
                        num_results = 3)

context_string = "Context:\n\n"

for (i,doc) in enumerate(raw_context.get('result').get('data_array')):
    context_string += f"Retrieved context {i+1}:\n"
    context_string += doc[0]
    context_string += "\n\n"

chat.reply(f"User question: What is the TDR Target for the SMARTER initiative?\n\nContext: {context_string}")
chat.last&lt;/LI-CODE&gt;&lt;/DIV&gt;
&lt;DIV class="jp-RenderedHTMLCommon jp-RenderedMarkdown jp-MarkdownOutput" data-mime-type="text/markdown"&gt;
&lt;P&gt;It is now able to answer based on the provided context.&lt;/P&gt;
&lt;H3 id="Congratulations!-Demo-complete."&gt;Congratulations! Your chatbot is ready.&lt;/H3&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;DIV class="jp-Cell jp-MarkdownCell jp-Notebook-cell"&gt;
&lt;DIV class="jp-Cell-inputWrapper"&gt;
&lt;DIV class="jp-Collapser jp-InputCollapser jp-Cell-inputCollapser"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class="jp-InputArea jp-Cell-inputArea"&gt;
&lt;DIV class="jp-InputPrompt jp-InputArea-prompt"&gt;&lt;SPAN&gt;Additional information&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV class="jp-RenderedHTMLCommon jp-RenderedMarkdown jp-MarkdownOutput" data-mime-type="text/markdown"&gt;
&lt;H2 id="Using-the-UI"&gt;Using the UI&lt;/H2&gt;
&lt;P&gt;Most of the Vector Database management steps above can be done via the UI: you can&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://docs.databricks.com/en/generative-ai/create-query-vector-search.html#create-a-vector-search-endpoint-using-the-ui" target="_blank" rel="noopener"&gt;create an endpoint&lt;/A&gt;,&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://docs.databricks.com/en/generative-ai/create-query-vector-search.html#create-index-using-the-ui" target="_blank" rel="noopener"&gt;create an index&lt;/A&gt;, sync the index, and more via the UI in the Databricks Catalog Explorer.&lt;/P&gt;
&lt;H2 id="Experimenting-in-the-AI-Playground"&gt;Experimenting in the AI Playground&lt;/H2&gt;
&lt;P&gt;The&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://docs.databricks.com/en/large-language-models/ai-playground.html" target="_blank" rel="noopener"&gt;Databricks AI Playground&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;provides a GUI for quickly experimenting with LLMs available via the FMAPI, enabling you to compare the outputs of those models and determine which model best serves your needs.&lt;/P&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;</description>
      <pubDate>Thu, 15 Aug 2024 17:53:44 GMT</pubDate>
      <guid>https://community.databricks.com/t5/get-started-guides/getting-started-with-databricks-deploy-an-llm-chatbot-using/ta-p/80764</guid>
      <dc:creator>DatabricksGuide</dc:creator>
      <dc:date>2024-08-15T17:53:44Z</dc:date>
    </item>
    <item>
      <title>Get started with an exploratory analysis on Databricks using Sample Data</title>
      <link>https://community.databricks.com/t5/get-started-guides/get-started-with-an-exploratory-analysis-on-databricks-using/ta-p/79482</link>
      <description>&lt;H1&gt;&lt;STRONG&gt;Getting started with Databricks - Exploratory analysis&lt;/STRONG&gt;&lt;/H1&gt;
&lt;P&gt;&lt;SPAN&gt;This guide walks you through using a Databricks notebook to query sample data stored in Unity Catalog using Python and then visualize the query results in the notebook.&lt;/SPAN&gt;&lt;SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;This is a beginner’s tutorial with hands-on instructions to execute in your own Databricks workspace. &lt;/SPAN&gt;&lt;A href="https://www.databricks.com/try-databricks#account" target="_blank" rel="noopener"&gt;&lt;SPAN&gt;You can request a free 14-day trial.&amp;nbsp;&lt;/SPAN&gt;&lt;/A&gt;&lt;/P&gt;
&lt;H3&gt;&lt;STRONG&gt;Step 1: Access sample data&lt;/STRONG&gt;&lt;/H3&gt;
&lt;OL&gt;
&lt;LI style="font-weight: 400;" aria-level="1"&gt;&lt;SPAN&gt;Click &lt;/SPAN&gt;&lt;STRONG&gt;Catalog&lt;/STRONG&gt;&lt;SPAN&gt; in the sidebar to open the Catalog Explorer. This is the primary UI for exploring and managing data, including schemas, tables, models, and other data objects.&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI style="font-weight: 400;" aria-level="1"&gt;&lt;SPAN&gt;Click the &lt;/SPAN&gt;&lt;STRONG&gt;samples&lt;/STRONG&gt;&lt;SPAN&gt; catalog. This Databricks-managed catalog contains two sample datasets for your exploration: &lt;/SPAN&gt;&lt;STRONG&gt;nyctaxi&lt;/STRONG&gt;&lt;SPAN&gt; and &lt;/SPAN&gt;&lt;STRONG&gt;tpch&lt;/STRONG&gt;&lt;SPAN&gt;.&amp;nbsp;&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI style="font-weight: 400;" aria-level="1"&gt;&lt;SPAN&gt;Click the &lt;/SPAN&gt;&lt;STRONG&gt;nyctaxi&lt;/STRONG&gt;&lt;SPAN&gt; schema, and then open the &lt;/SPAN&gt;&lt;STRONG&gt;trips&lt;/STRONG&gt;&lt;SPAN&gt; table.&lt;/SPAN&gt;&lt;/LI&gt;
&lt;/OL&gt;
&lt;H3&gt;&lt;STRONG&gt;Step 2: Create a notebook&lt;/STRONG&gt;&lt;/H3&gt;
&lt;OL&gt;
&lt;LI style="font-weight: 400;" aria-level="1"&gt;&lt;SPAN&gt;Use the &lt;/SPAN&gt;&lt;STRONG&gt;Create&lt;/STRONG&gt;&lt;SPAN&gt; button in the top-right to create a notebook with a pre-populated query of the &lt;/SPAN&gt;&lt;STRONG&gt;trips&lt;/STRONG&gt;&lt;SPAN&gt; table. New, blank queries and notebooks can also be created using the &lt;/SPAN&gt;&lt;STRONG&gt;+New &lt;/STRONG&gt;&lt;SPAN&gt;button from the top left of the screen.&amp;nbsp;&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI style="font-weight: 400;" aria-level="1"&gt;&lt;SPAN&gt;If you created a blank notebook or query, you can query the table you just created using the SQL SELECT statement &lt;/SPAN&gt;&lt;SPAN&gt;SELECT * from &amp;lt;catalog-name&amp;gt;.&amp;lt;schema-name&amp;gt;.&amp;lt;table-name&amp;gt;&lt;/SPAN&gt;&lt;SPAN&gt;. If you choose to run your analysis in a notebook, be sure to change the notebook language to SQL by changing the language selection toggle in the top pane of the notebook.&amp;nbsp;&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI style="font-weight: 400;" aria-level="1"&gt;&lt;SPAN&gt;Here are some sample commands to try out in Python:&lt;/SPAN&gt;&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="python"&gt;import pandas as pd

# Read the sample NYC Taxi Trips dataset and load it into a PySpark DataFrame.Convert  PySpark DataFrame to Pandas DataFrame
df = spark.read.table('samples.nyctaxi.trips')
pdf = df.toPandas()

# Select the 10 most expensive and the 10 longest trips based on fare_amount
most_expensive_trips = pdf.nlargest(10,'fare_amount')
longest_trips = pdf.nlargest(10,'trip_distance')&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H3&gt;&lt;STRONG&gt;Step 3: Use the Databricks Assistant for code suggestions&lt;/STRONG&gt;&lt;/H3&gt;
&lt;OL&gt;
&lt;LI style="font-weight: 400;" aria-level="1"&gt;&lt;SPAN&gt;Notebooks come equipped with the context-aware Databricks Assistant, which can help generate, explain, and fix code using natural language.&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI style="font-weight: 400;" aria-level="1"&gt;&lt;SPAN&gt;To use the assistant, create a new cell and click &lt;/SPAN&gt;&lt;STRONG&gt;CMD+I &lt;/STRONG&gt;&lt;SPAN&gt;or click the Assistant icon on the top right corner of the new cell.&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI style="font-weight: 400;" aria-level="1"&gt;&lt;SPAN&gt;Enter a prompt for the Assistant to provide code suggestions. Here are some sample prompts:&lt;/SPAN&gt;&lt;/LI&gt;
&lt;OL&gt;
&lt;LI style="font-weight: 400;" aria-level="2"&gt;&lt;I&gt;&lt;SPAN&gt;What is the most common pickup zip across all trips?&lt;/SPAN&gt;&lt;/I&gt;&lt;/LI&gt;
&lt;LI style="font-weight: 400;" aria-level="2"&gt;&lt;I&gt;&lt;SPAN&gt;What is the minimum, maximum, and average fare amount across all trips?&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/I&gt;&lt;/LI&gt;
&lt;/OL&gt;
&lt;LI style="font-weight: 400;" aria-level="2"&gt;&lt;SPAN&gt;Press Return or the submit button to submit the prompt and watch the Assistant suggest code to answer the prompt. Click “&lt;/SPAN&gt;&lt;STRONG&gt;Accept&lt;/STRONG&gt;&lt;SPAN&gt;” to save the code suggestion and run the cell to view the results!&lt;/SPAN&gt;&lt;/LI&gt;
&lt;/OL&gt;
&lt;H3&gt;&lt;STRONG&gt;Step 4: Visualize the data&lt;/STRONG&gt;&lt;/H3&gt;
&lt;OL&gt;
&lt;LI style="font-weight: 400;" aria-level="1"&gt;&lt;SPAN&gt;You can visualize the data in your table from the results of the query by clicking the &lt;/SPAN&gt;&lt;STRONG&gt;+&lt;/STRONG&gt;&lt;SPAN&gt; button at the top of the results experience and completing the visualization builder dialog.&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI style="font-weight: 400;" aria-level="1"&gt;&lt;SPAN&gt;Select your preferred visualization type, and fill out the chart values to prepare the chart.&lt;/SPAN&gt;&lt;/LI&gt;
&lt;/OL&gt;
&lt;H3&gt;&lt;STRONG&gt;Step 5: Share its results with non-Databricks users&lt;/STRONG&gt;&lt;/H3&gt;
&lt;H5&gt;&lt;STRONG&gt;Add users to your Databricks Workspace&lt;/STRONG&gt;&lt;/H5&gt;
&lt;OL&gt;
&lt;LI style="font-weight: 400;" aria-level="1"&gt;&lt;SPAN&gt;In the top bar of the Databricks workspace, click your username and then click Settings.&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI style="font-weight: 400;" aria-level="1"&gt;&lt;SPAN&gt;In the sidebar, click &lt;/SPAN&gt;&lt;STRONG&gt;Identity and Access&lt;/STRONG&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI style="font-weight: 400;" aria-level="1"&gt;&lt;SPAN&gt;Next to Users, click &lt;/SPAN&gt;&lt;STRONG&gt;Manage&lt;/STRONG&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI style="font-weight: 400;" aria-level="1"&gt;&lt;SPAN&gt;Click &lt;/SPAN&gt;&lt;STRONG&gt;Add user&lt;/STRONG&gt;&lt;SPAN&gt;, and then click &lt;/SPAN&gt;&lt;STRONG&gt;Add new&lt;/STRONG&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI style="font-weight: 400;" aria-level="1"&gt;&lt;SPAN&gt;Enter the user’s email address, and then click &lt;/SPAN&gt;&lt;STRONG&gt;Add&lt;/STRONG&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;&lt;SPAN&gt;Continue to add as many users to your account as you would like. New users receive an email prompting them to set up their account.&lt;/SPAN&gt;&lt;/P&gt;
&lt;H5&gt;&lt;STRONG&gt;Share the notebook with colleagues&lt;/STRONG&gt;&lt;/H5&gt;
&lt;OL&gt;
&lt;LI style="font-weight: 400;" aria-level="1"&gt;&lt;SPAN&gt;To manage access to the notebook, click &lt;/SPAN&gt;&lt;STRONG&gt;Share&lt;/STRONG&gt;&lt;SPAN&gt; at the top of the notebook to open the permissions dialog.&amp;nbsp;&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI style="font-weight: 400;" aria-level="1"&gt;&lt;SPAN&gt;Share your notebook with any colleague by adding the “All Users” group to the notebook’s access list with “Can View” or “Can Run” permission and sending your colleague the notebook’s URL, which can be copied to your clipboard using the “Copy link” button.&lt;/SPAN&gt;&lt;/LI&gt;
&lt;/OL&gt;
&lt;H2&gt;&lt;STRONG&gt;Next steps&lt;/STRONG&gt;&lt;/H2&gt;
&lt;OL&gt;
&lt;LI style="font-weight: 400;" aria-level="1"&gt;&lt;SPAN&gt;To learn about adding data from CSV files to Unity Catalog and visualize data, see &lt;/SPAN&gt;&lt;A href="https://docs.databricks.com/en/getting-started/import-visualize-data.html" target="_blank" rel="noopener"&gt;&lt;SPAN&gt;Get started: Import and visualize CSV data from a notebook&lt;/SPAN&gt;&lt;/A&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI style="font-weight: 400;" aria-level="1"&gt;&lt;SPAN&gt;To learn how to load data into Databricks using Apache Spark, see &lt;/SPAN&gt;&lt;A href="https://docs.databricks.com/en/getting-started/dataframes.html" target="_blank" rel="noopener"&gt;&lt;SPAN&gt;Tutorial: Load and transform data using Apache Spark DataFrames&lt;/SPAN&gt;&lt;/A&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI style="font-weight: 400;" aria-level="1"&gt;&lt;SPAN&gt;To learn more about ingesting data into Databricks, see &lt;/SPAN&gt;&lt;A href="https://docs.databricks.com/en/ingestion/index.html" target="_blank" rel="noopener"&gt;&lt;SPAN&gt;Ingest data into a Databricks lakehouse&lt;/SPAN&gt;&lt;/A&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI style="font-weight: 400;" aria-level="1"&gt;&lt;SPAN&gt;To learn more about querying data with Databricks, see &lt;/SPAN&gt;&lt;A href="https://docs.databricks.com/en/query/index.html" target="_blank" rel="noopener"&gt;&lt;SPAN&gt;Query data&lt;/SPAN&gt;&lt;/A&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI style="font-weight: 400;" aria-level="1"&gt;&lt;SPAN&gt;To learn more about visualizations, see &lt;/SPAN&gt;&lt;A href="https://docs.databricks.com/en/visualizations/index.html" target="_blank" rel="noopener"&gt;&lt;SPAN&gt;Visualizations in Databricks notebooks&lt;/SPAN&gt;&lt;/A&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;/LI&gt;
&lt;/OL&gt;</description>
      <pubDate>Mon, 26 Aug 2024 16:53:19 GMT</pubDate>
      <guid>https://community.databricks.com/t5/get-started-guides/get-started-with-an-exploratory-analysis-on-databricks-using/ta-p/79482</guid>
      <dc:creator>DatabricksGuide</dc:creator>
      <dc:date>2024-08-26T16:53:19Z</dc:date>
    </item>
    <item>
      <title>Getting Started with Databricks - Building a Forecasting Model on Databricks</title>
      <link>https://community.databricks.com/t5/get-started-guides/getting-started-with-databricks-building-a-forecasting-model-on/ta-p/69301</link>
      <description>&lt;DIV class="lia-message-template-content-zone"&gt;
&lt;H1&gt;&lt;SPAN&gt;Building a Forecasting Model on Databricks: A Step-by-Step Guide&lt;/SPAN&gt;&lt;/H1&gt;
&lt;P&gt;&lt;SPAN&gt;This guide offers a detailed, step-by-step approach for building a forecasting model on Databricks. By leveraging the power of Databricks, you will unlock new potentials in your data workflows, streamline model deployment processes, and optimize your forecasting accuracy with state-of-the-art tools and practices.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;*It assumes you have a basic familiarity with Databricks notebooks, PySpark, and common machine learning concepts.&lt;/SPAN&gt;&lt;/P&gt;
&lt;H2&gt;&lt;SPAN&gt;What Will You Learn?&lt;/SPAN&gt;&lt;/H2&gt;
&lt;P&gt;&lt;SPAN&gt;This guide is structured to provide a step-by-step approach to advanced forecasting and model deployment, incorporating best practices and leveraging modern tools such as MLflow. By the end of this guide, you will be equipped with the knowledge to:&lt;/SPAN&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI style="font-weight: 400;" aria-level="1"&gt;&lt;STRONG&gt;Effectively Prepare and Process Data&lt;/STRONG&gt;&lt;SPAN&gt;: Understand how to select, clean, and prepare your data for forecasting, emphasizing the importance of feature engineering and data quality.&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI style="font-weight: 400;" aria-level="1"&gt;&lt;STRONG&gt;Build Robust Forecasting Models&lt;/STRONG&gt;&lt;SPAN&gt;: Dive into the selection of sophisticated forecasting models that cater to various data characteristics.&amp;nbsp;&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI style="font-weight: 400;" aria-level="1"&gt;&lt;STRONG&gt;Master Model Logging with MLflow&lt;/STRONG&gt;&lt;SPAN&gt;: Learn the intricacies of model logging, enabling efficient tracking of model versions, parameters, and performance metrics.&amp;nbsp;&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI style="font-weight: 400;" aria-level="1"&gt;&lt;STRONG&gt;Deploy Models with Confidence&lt;/STRONG&gt;&lt;SPAN&gt;: Navigate through the model serving landscape, understanding different deployment strategies for making your models accessible for predictions.&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI style="font-weight: 400;" aria-level="1"&gt;&lt;STRONG&gt;Visualize and Interpret Model Predictions&lt;/STRONG&gt;&lt;SPAN&gt;: Discover techniques for visualizing forecasting results, allowing you to compare predicted values against actual historical data and assess model performance visually.&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI style="font-weight: 400;" aria-level="1"&gt;&lt;STRONG&gt;Best Practices for Forecasting and Model Deployment&lt;/STRONG&gt;&lt;SPAN&gt;: Throughout the guide, insights into best practices will prepare you to tackle common challenges and make informed decisions.&lt;/SPAN&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;H2&gt;&lt;SPAN&gt;Data Selection&lt;/SPAN&gt;&lt;/H2&gt;
&lt;P&gt;&lt;SPAN&gt;Data Selection is a crucial initial step for successful time series forecasting. Here's a breakdown of the key aspects to consider&lt;/SPAN&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI style="font-weight: 400;" aria-level="1"&gt;&lt;STRONG&gt;Identify the Forecasting Goal&lt;/STRONG&gt;&lt;SPAN&gt;: What are you trying to predict? Sales, website traffic, resource utilization? Clearly define the target variable you want to forecast.&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI style="font-weight: 400;" aria-level="1"&gt;&lt;STRONG&gt;Data Frequency&lt;/STRONG&gt;&lt;SPAN&gt;: Choose a data frequency that aligns with your forecasting needs. Daily, weekly, monthly, or even hourly data might be suitable depending on the problem.&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI style="font-weight: 400;" aria-level="1"&gt;&lt;STRONG&gt;Data Sufficiency&lt;/STRONG&gt;&lt;SPAN&gt;: Make sure you have enough data to train and validate your forecasting model. The amount of data required depends on the model complexity (e.g., LSTMs typically require more data than ARIMA).&lt;/SPAN&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&lt;SPAN&gt;A successful forecasting model relies on a well-structured dataset. For this tutorial, your data should ideally at least have the following columns:&lt;/SPAN&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI style="font-weight: 400;" aria-level="1"&gt;&lt;STRONG&gt;Date&lt;/STRONG&gt;&lt;SPAN&gt;: Timestamp for each observation.&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI style="font-weight: 400;" aria-level="1"&gt;&lt;STRONG&gt;Metric&lt;/STRONG&gt;&lt;SPAN&gt;: The specific aspect you’re forecasting (e.g., sales, website traffic).&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI style="font-weight: 400;" aria-level="1"&gt;&lt;STRONG&gt;Metric Value&lt;/STRONG&gt;&lt;SPAN&gt;: The numerical data point you aim to predict (e.g., number of users, sales amount).&lt;/SPAN&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&lt;SPAN&gt;Ensure the data is at the correct frequency (daily, weekly, etc.) and that you have enough data to capture seasonal patterns or trends relevant to your goals.&lt;/SPAN&gt;&lt;/P&gt;
&lt;H2 id="toc-hId-1508993404"&gt;&lt;SPAN&gt;Ingest Setup Steps [20 minutes]&lt;/SPAN&gt;&lt;/H2&gt;
&lt;H3 id="toc-hId--330908160"&gt;&lt;STRONG&gt;Step 0: Check your required prerequisites&lt;/STRONG&gt;&lt;/H3&gt;
&lt;P&gt;&lt;SPAN&gt;This section of the guide assumes you have the following:&lt;/SPAN&gt;&lt;/P&gt;
&lt;OL&gt;
&lt;LI aria-level="1"&gt;&lt;SPAN&gt;You have a Databricks workspace up and running&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI aria-level="1"&gt;&lt;SPAN&gt;Your account has Unity Catalog enabled. UC is enabled by default&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI aria-level="1"&gt;&lt;SPAN&gt;You have admin permissions for your Databricks account&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI aria-level="1"&gt;&lt;SPAN&gt;You have access to your AWS account and data residing in a S3 storage bucket&lt;/SPAN&gt;&lt;/LI&gt;
&lt;/OL&gt;
&lt;H3 id="toc-hId-1421029483"&gt;&lt;STRONG&gt;Step 1: Access and start your warehouse&lt;/STRONG&gt;&lt;/H3&gt;
&lt;P&gt;&lt;SPAN&gt;To get started with Databricks, you need to kickstart your starter warehouse. This compute resource will let you query and explore data on Databricks. You can also use Serverless Warehouse to use this guide.&lt;/SPAN&gt;&lt;SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;TABLE border="1" width="100%"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="100%"&gt;&lt;STRONG&gt;Note:&lt;SPAN&gt;&amp;nbsp;O&lt;/SPAN&gt;&lt;SPAN&gt;nly users with workspace administrator permissions are able to start the starter warehouse. If you don’t have admin permissions, please contact your administrator to get access to the starter warehouse or to create a new serverless warehouse.&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H3 id="toc-hId--1986434132"&gt;&lt;STRONG&gt;Step 2: Connect your workspace to data sources&lt;/STRONG&gt;&lt;/H3&gt;
&lt;P&gt;&lt;SPAN&gt;To connect your Databricks workspace to your cloud storage, you need to create an external location. An external location is an object that combines a cloud storage path with the credential that authorizes access to the storage path.&lt;/SPAN&gt;&lt;/P&gt;
&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="DatabricksGuide_0-1715968895219.gif" style="width: 400px;"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/7638iA6EC7771E693E9CD/image-size/medium?v=v2&amp;amp;px=400" role="button" title="DatabricksGuide_0-1715968895219.gif" alt="DatabricksGuide_0-1715968895219.gif" /&gt;&lt;/span&gt;
&lt;P class="lia-align-center"&gt;&lt;SPAN&gt;Watch and follow along in your workspace as you go!&lt;/SPAN&gt;&lt;/P&gt;
&lt;OL&gt;
&lt;LI aria-level="1"&gt;&lt;SPAN&gt;In your Databricks workspace, click Catalog on the sidebar.&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI aria-level="1"&gt;&lt;SPAN&gt;At the top of the page, click + Add.&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI aria-level="1"&gt;&lt;SPAN&gt;Click Add an external location.&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI aria-level="1"&gt;&lt;SPAN&gt;Databricks recommends using the AWS Quickstart, which ensures that your workspace is given the correct permissions on the bucket.&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI aria-level="1"&gt;&lt;SPAN&gt;In Bucket Name, enter the name of the bucket you want to import data from.&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI aria-level="1"&gt;&lt;SPAN&gt;Click Generate New Token and copy the token.&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI aria-level="1"&gt;&lt;SPAN&gt;Click Launch in Quickstart.&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI aria-level="1"&gt;&lt;SPAN&gt;In your AWS console, enter the copied token in the Databricks Personal Access Token field.&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI aria-level="1"&gt;&lt;SPAN&gt;Select the I acknowledge that AWS CloudFormation might create IAM resources with custom names checkbox.&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI aria-level="1"&gt;&lt;SPAN&gt;Click&amp;nbsp;&lt;STRONG&gt;Create stack&lt;/STRONG&gt;. To see the external locations in your workspace, click Catalog in the sidebar, at the bottom of the left navigation pane click External Data, and then click External Locations. Your new external location will have a name using the following syntax: db_s3_external_databricks-S3-ingest-&amp;lt;id&amp;gt;.&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI aria-level="1"&gt;Test your connection&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;&lt;SPAN&gt;To verify external locations have functioning connections, do the following:&lt;/SPAN&gt;&lt;/P&gt;
&lt;OL&gt;
&lt;LI aria-level="1"&gt;&lt;SPAN&gt;Click the external location you want to test.&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI aria-level="1"&gt;&lt;SPAN&gt;Click Test connection.&lt;/SPAN&gt;&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;&lt;SPAN&gt;For help, contact&amp;nbsp;&lt;A href="mailto:onboarding-help@databricks.com" target="_self" rel="nofollow noopener noreferrer"&gt;onboarding-help@databricks.com&lt;/A&gt;&amp;nbsp;or your Databricks account team directly.&lt;/SPAN&gt;&lt;/P&gt;
&lt;H3 id="toc-hId--211426770"&gt;&lt;STRONG&gt;Step 3: Add your data to Databricks&lt;/STRONG&gt;&lt;/H3&gt;
&lt;P&gt;&lt;SPAN&gt;Now that your workspace has a connection to your S3 bucket, you can add your data.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Part of this step is choosing where to put your data. Databricks has a three-level namespace that organizes your data (catalog.schema.table). For this exercise, you import the data into the default catalog named after your workspace.&lt;/SPAN&gt;&lt;/P&gt;
&lt;OL&gt;
&lt;LI aria-level="1"&gt;&lt;SPAN&gt;In the sidebar of your Databricks workspace, click New &amp;gt; Add data.&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI aria-level="1"&gt;&lt;SPAN&gt;Click Amazon S3.&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI aria-level="1"&gt;&lt;SPAN&gt;Select your external location from the drop-down menu.&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI aria-level="1"&gt;&lt;SPAN&gt;Select all the files you want to add to your Databricks catalog.&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI aria-level="1"&gt;&lt;SPAN&gt;Click Preview table.&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI aria-level="1"&gt;&lt;SPAN&gt;Select the default catalog (named after your workspace), the default schema, and then enter a name for your table.&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI aria-level="1"&gt;&lt;SPAN&gt;Click Create Table.&lt;/SPAN&gt;&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;&lt;SPAN&gt;You can now use Catalog Explorer in your workspace to see your data in Databricks.&lt;/SPAN&gt;&lt;/P&gt;
&lt;H2&gt;&lt;SPAN&gt;Forecasting on Databricks&lt;/SPAN&gt;&lt;/H2&gt;
&lt;P&gt;&lt;SPAN&gt;Once you have selected your Data, there are 2 primary ways to build a Forecasting Model on Databricks.&lt;/SPAN&gt;&lt;/P&gt;
&lt;OL&gt;
&lt;LI style="font-weight: 400;" aria-level="1"&gt;&lt;SPAN&gt;Databricks AutoML: This is a user-friendly option, especially for those new to forecasting or machine learning. Databricks AutoML automates the process of selecting and training the most suitable forecasting model for your data.&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI style="font-weight: 400;" aria-level="1"&gt;Databricks Notebook&lt;SPAN&gt;: This is designed for users with experience in machine learning and time series forecasting. It offers more control and flexibility for building customized models.&lt;/SPAN&gt;&lt;/LI&gt;
&lt;/OL&gt;
&lt;H2&gt;&lt;SPAN&gt;A) Forecasting Model Using AutoML&lt;/SPAN&gt;&lt;/H2&gt;
&lt;P&gt;&lt;SPAN&gt;Databricks AutoML is a valuable tool for getting started with time series forecasting on Databricks. It streamlines the process, reduces development time, and provides a solid baseline model. Use the following steps to set up an AutoML Model.&lt;/SPAN&gt;&lt;/P&gt;
&lt;H3&gt;&lt;SPAN&gt;Set up the Forecasting Problem&lt;/SPAN&gt;&lt;/H3&gt;
&lt;P&gt;&lt;SPAN&gt;You can set up a forecasting problem using the AutoML UI with the following steps:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="DatabricksGuide_0-1715967500817.gif" style="width: 400px;"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/7636i8F966CCBA53AC2AC/image-size/medium?v=v2&amp;amp;px=400" role="button" title="DatabricksGuide_0-1715967500817.gif" alt="DatabricksGuide_0-1715967500817.gif" /&gt;&lt;/span&gt;
&lt;OL&gt;
&lt;LI style="font-weight: 400;" aria-level="1"&gt;&lt;SPAN&gt;Click on New -&amp;gt; AutoML Experiment&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI style="font-weight: 400;" aria-level="1"&gt;&lt;SPAN&gt;In the Compute field, select a cluster running Databricks Runtime 10.0 ML or above.&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI style="font-weight: 400;" aria-level="1"&gt;&lt;SPAN&gt;From the ML problem type drop-down menu, select Forecasting.&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI style="font-weight: 400;" aria-level="1"&gt;&lt;SPAN&gt;Under Dataset, click Browse. Navigate to the table you want to use and click Select. The table schema appears.&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI style="font-weight: 400;" aria-level="1"&gt;&lt;SPAN&gt;Click in the Prediction target field. A dropdown menu appears listing the columns shown in the schema. Select the column you want the model to predict.&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI style="font-weight: 400;" aria-level="1"&gt;&lt;SPAN&gt;Click in the Time column field. A drop-down appears showing the dataset columns that are of type timestamp or date. Select the column containing the time periods for the time series.&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI style="font-weight: 400;" aria-level="1"&gt;&lt;SPAN&gt;For multi-series forecasting, select the column(s) that identify the individual time series from the Time series identifiers drop-down. AutoML groups the data by these columns as different time series and trains a model for each series independently.&amp;nbsp;&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI style="font-weight: 400;" aria-level="1"&gt;&lt;SPAN&gt;In the Forecast horizon and frequency fields, specify the number of time periods into the future for which AutoML should calculate forecasted values.&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI style="font-weight: 400;" aria-level="1"&gt;&lt;SPAN&gt;In Databricks Runtime 10.5 ML and above, you can save prediction results. To do so, specify a database in the Output Database field. Click Browse and select a database from the dialog. AutoML writes the prediction results to a table in this database.&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI style="font-weight: 400;" aria-level="1"&gt;&lt;SPAN&gt;The Experiment name field shows the default name. To change it, type the new name in the field.&lt;/SPAN&gt;&lt;/LI&gt;
&lt;/OL&gt;
&lt;H3&gt;&lt;SPAN&gt;Register the Best Model&lt;/SPAN&gt;&lt;/H3&gt;
&lt;OL&gt;
&lt;LI style="font-weight: 400;" aria-level="1"&gt;&lt;SPAN&gt;Once your AutoML experiment finishes, identify the best performing model run based on your chosen metric.&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI style="font-weight: 400;" aria-level="1"&gt;&lt;SPAN&gt;In the Experiments UI, navigate to the run details of the best model.&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI style="font-weight: 400;" aria-level="1"&gt;&lt;SPAN&gt;Look for a "Register Model" button or option.&amp;nbsp;&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI style="font-weight: 400;" aria-level="1"&gt;&lt;SPAN&gt;Select to register via ’Unity Catalog’.&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI style="font-weight: 400;" aria-level="1"&gt;&lt;SPAN&gt;Run the provided code in a notebook to register the model.&lt;/SPAN&gt;&lt;/LI&gt;
&lt;/OL&gt;
&lt;H3&gt;&lt;SPAN&gt;Create a Serving Endpoint&lt;/SPAN&gt;&lt;/H3&gt;
&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="DatabricksGuide_1-1715967500776.gif" style="width: 400px;"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/7635i5FEACB6D9C98E965/image-size/medium?v=v2&amp;amp;px=400" role="button" title="DatabricksGuide_1-1715967500776.gif" alt="DatabricksGuide_1-1715967500776.gif" /&gt;&lt;/span&gt;
&lt;OL&gt;
&lt;LI style="font-weight: 400;" aria-level="1"&gt;&lt;SPAN&gt;Click on New -&amp;gt; Serving Endpoint&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI style="font-weight: 400;" aria-level="1"&gt;&lt;SPAN&gt;Initiate the creation of the endpoint. In the Name field, provide a descriptive name for your endpoint.&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI style="font-weight: 400;" aria-level="1"&gt;&lt;SPAN&gt;Under the Served entities section, click on the Entity field.&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI style="font-weight: 400;" aria-level="1"&gt;&lt;SPAN&gt;Choose Unity Catalog as the source and select your model by choosing the appropriate catalog, schema and model name.&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI style="font-weight: 400;" aria-level="1"&gt;&lt;SPAN&gt;Select the specific model and its version you want to deploy.&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI style="font-weight: 400;" aria-level="1"&gt;&lt;SPAN&gt;Select the appropriate Compute Type (CPU for this model) based on your model's requirements.&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI style="font-weight: 400;" aria-level="1"&gt;&lt;SPAN&gt;Select ‘Small’ as the Compute Scale-out.&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI style="font-weight: 400;" aria-level="1"&gt;&lt;SPAN&gt;Once you've configured the settings, click the Create button.&lt;/SPAN&gt;&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;&lt;SPAN&gt;Monitor Endpoint Status: The Serving endpoints page will display your newly created endpoint. The initial state will likely be "Pending" as deployment progresses. You can refresh the page to monitor the endpoint's status until it becomes "Active."&lt;/SPAN&gt;&lt;/P&gt;
&lt;H2&gt;&lt;SPAN&gt;B) Forecasting Model Using Notebook&lt;/SPAN&gt;&lt;/H2&gt;
&lt;H3&gt;&lt;SPAN&gt;Select Data&lt;/SPAN&gt;&lt;/H3&gt;
&lt;LI-CODE lang="python"&gt;#Install Dependencies
!pip install prophet
!pip install databricks-sdk==0.12.0
!pip install mlflow
!pip install grpcio
!pip install grpcio-status
!pip install -U "pandas&amp;lt;2.0.0"
dbutils.library.restartPython()

#Select Data
query = f"SELECT &amp;lt;date&amp;gt;, &amp;lt;metric&amp;gt;, &amp;lt;metric_value&amp;gt; FROM &amp;lt;catalog_name&amp;gt;.&amp;lt;schema_name&amp;gt;.&amp;lt;table_name&amp;gt; where is_customer = 'true' and &amp;lt;date&amp;gt; &amp;gt; '2020-01-01' order by date desc" #Update the query to get data from your table

df = spark.sql(query)

# Choose a single metric to make the calculations simpler
df = df.filter(df.&amp;lt;metric&amp;gt; == "xxxxxxxxxxxxxxxxxxxxx") #Replace &amp;lt;metric&amp;gt; with your metric name
df.show(5)

&lt;/LI-CODE&gt;
&lt;H3&gt;&lt;SPAN&gt;Data Preparation&lt;/SPAN&gt;&lt;/H3&gt;
&lt;P&gt;&lt;SPAN&gt;Effectively preparing your data is a foundational step in the forecasting process. Proper preparation ensures the accuracy and reliability of your model's predictions.&lt;/SPAN&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI style="font-weight: 400;" aria-level="1"&gt;&lt;STRONG&gt;Missing Values&lt;/STRONG&gt;&lt;SPAN&gt;: Identify and address missing values in your data. Common strategies include deletion (if minimal), imputation (filling in missing values with statistical methods or previous observations), or interpolation (estimating missing values based on surrounding data points).&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI style="font-weight: 400;" aria-level="1"&gt;&lt;STRONG&gt;Outliers&lt;/STRONG&gt;&lt;SPAN&gt;: Identify and handle outliers, which are extreme data points that can significantly distort your forecasts. You can choose to remove outliers if they are truly erroneous or winsorize them (capping their values to a certain threshold).&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI style="font-weight: 400;" aria-level="1"&gt;&lt;STRONG&gt;Time Consistency&lt;/STRONG&gt;&lt;SPAN&gt;: Ensure your data has consistent timestamps and that the time steps are evenly spaced (e.g., daily data points should be recorded at the same time each day).&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI style="font-weight: 400;" aria-level="1"&gt;&lt;STRONG&gt;Feature Engineering&lt;/STRONG&gt;&lt;SPAN&gt;: Create new features from existing ones if it can improve the forecasting model's performance. This might involve calculating rolling averages, seasonality indicators, or lag features (past values of the target variable).&lt;/SPAN&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;LI-CODE lang="python"&gt;from pyspark.sql.functions import col, lit

# Dropping rows with missing values in the 'metric_value' column
cleaned_df = df.na.drop(subset=["&amp;lt;metric_value&amp;gt;"]) #Replace &amp;lt;metric_value&amp;gt; with your metric value column name
cleaned_df.show(5)

# Calculating IQR and defining bounds for outliers
quartiles = cleaned_df.approxQuantile("&amp;lt;metric_value&amp;gt;", [0.25, 0.75], 0.05) #Replace &amp;lt;metric_value&amp;gt; with your metric value column name
IQR = quartiles[1] - quartiles[0]
lower_bound = 0
upper_bound = quartiles[1] + 1.5 * IQR

# Filtering out outliers
no_outliers_df = cleaned_df.filter(
    (col("&amp;lt;metric_value&amp;gt;") &amp;gt; lit(lower_bound)) #Replace &amp;lt;metric_value&amp;gt; with your metric value column name
    &amp;amp; (col("&amp;lt;metric_value&amp;gt;") &amp;lt;= lit(upper_bound)) #Replace &amp;lt;metric_value&amp;gt; with your metric value column name
)

# Showing the updated DataFrame
no_outliers_df.show(5)&lt;/LI-CODE&gt;
&lt;H3&gt;&lt;SPAN&gt;Model Selection&lt;/SPAN&gt;&lt;/H3&gt;
&lt;P&gt;&lt;SPAN&gt;The model you choose will depend on the nature of your data and the specific forecasting problem you’re trying to solve. Take into consideration different data characteristics such as Frequency (daily vs weekly), granularity (hourly vs daily sales), seasonality, and any other external factors such as holidays, promotions etc. Machine learning methods:&lt;/SPAN&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI style="font-weight: 400;" aria-level="1"&gt;&lt;STRONG&gt;Prophet&lt;/STRONG&gt;&lt;SPAN&gt;: User-friendly and specifically designed for time series forecasting, offering built-in seasonality and holiday handling.&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI style="font-weight: 400;" aria-level="1"&gt;&lt;STRONG&gt;ARIMA&lt;/STRONG&gt;&lt;SPAN&gt;: A classical statistical method for time series forecasting, capturing short-term patterns and trends in stationary data through autocorrelation, differencing, and moving average components.&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI style="font-weight: 400;" aria-level="1"&gt;&lt;STRONG&gt;LSTMs (Long Short-Term Memory)&lt;/STRONG&gt;&lt;SPAN&gt;: Powerful for capturing complex relationships and long-term dependencies in time series data.&lt;/SPAN&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&lt;SPAN&gt;For the scope of this tutorial, &lt;/SPAN&gt;&lt;STRONG&gt;Prophet&lt;/STRONG&gt;&lt;SPAN&gt; will serve as our primary model. Prophet stands out for its user-friendly nature and robust handling of various time series forecasting challenges, making it a versatile option for a wide range of applications.&lt;/SPAN&gt;&lt;/P&gt;
&lt;H4&gt;&lt;SPAN&gt;Model Choice Justification&lt;/SPAN&gt;&lt;/H4&gt;
&lt;P&gt;&lt;SPAN&gt;When deciding on which model to use, evaluate your dataset's characteristics carefully:&lt;/SPAN&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI style="font-weight: 400;" aria-level="1"&gt;&lt;STRONG&gt;Prophet&lt;/STRONG&gt;&lt;SPAN&gt; is particularly beneficial when your data includes strong seasonal effects and you have some domain knowledge to incorporate holidays and other special events.&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI style="font-weight: 400;" aria-level="1"&gt;&lt;STRONG&gt;ARIMA&lt;/STRONG&gt;&lt;SPAN&gt; works well if your time series is relatively stable and exhibits trends and autocorrelation that ARIMA's structure can model.&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI style="font-weight: 400;" aria-level="1"&gt;&lt;STRONG&gt;LSTMs&lt;/STRONG&gt;&lt;SPAN&gt; offer the greatest flexibility and learning capability for complex and long-term dependencies, but at the cost of needing more data and computational resources.&lt;/SPAN&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&lt;SPAN&gt;Each model has its strengths, and sometimes a combination or ensemble approach might yield the best results. Trial and experimentation with each model on your specific dataset are essential steps to identify the most suitable model for your forecasting goals.&lt;/SPAN&gt;&lt;/P&gt;
&lt;LI-CODE lang="python"&gt;from prophet import Prophet
from pyspark.sql.functions import col, to_date

# Prophet requires at the minimum 2 columns - ds &amp;amp; y
train_df = no_outliers_df.select(to_date(col("&amp;lt;date&amp;gt;")).alias("ds"), col("&amp;lt;metric&amp;gt;"), col("&amp;lt;metric_value&amp;gt;").alias("y").cast("double")).orderBy(col("ds").desc())

# set model parameters
prophet_model = Prophet(
  interval_width=0.95,
  growth='linear',
  daily_seasonality=True,
  weekly_seasonality=True,
  yearly_seasonality=True,
  seasonality_mode='additive'
  )
 
# fit the model to historical data
history_pd = train_df.toPandas()
prophet_model.fit(history_pd)&lt;/LI-CODE&gt;
&lt;H4&gt;&lt;SPAN&gt;Fit Data &amp;amp; Build Forecast&lt;/SPAN&gt;&lt;/H4&gt;
&lt;P&gt;&lt;SPAN&gt;To effectively utilize Prophet for forecasting in Databricks, follow these concise steps:&lt;/SPAN&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI style="font-weight: 400;" aria-level="1"&gt;&lt;STRONG&gt;Data Preparation&lt;/STRONG&gt;&lt;SPAN&gt;: Your dataset must have two columns: one for the datetime (ds) in YYYY-MM-DD format, and another for the metric you're forecasting (y). This format is crucial for the model to correctly learn from your data.&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI style="font-weight: 400;" aria-level="1"&gt;&lt;STRONG&gt;Model Initialization and Fitting&lt;/STRONG&gt;&lt;SPAN&gt;: Once your data is properly formatted, you will initiate a Prophet model instance and fit it with your historical data. During this step, Prophet analyzes your data's patterns to prepare for forecasting.&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI style="font-weight: 400;" aria-level="1"&gt;&lt;STRONG&gt;Forecasting Future Values&lt;/STRONG&gt;&lt;SPAN&gt;: After fitting the model, you will create a DataFrame that outlines the future dates you wish to predict. Using this DataFrame, Prophet will generate forecasts for the specified future dates.&amp;nbsp;&lt;/SPAN&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;LI-CODE lang="python"&gt;#Fit the model to historical data
history_pd = train_df.toPandas()
prophet_model.fit(history_pd)

#Define Dataset with historical dates &amp;amp; 10-days beyond the last available date
future_pd = prophet_model.make_future_dataframe(
  periods=10, 
  freq='d', 
  include_history=True
  )
 
#Forecast
forecast_pd = prophet_model.predict(future_pd)
display(forecast_pd)&lt;/LI-CODE&gt;
&lt;H3&gt;&lt;SPAN&gt;Evaluation&lt;/SPAN&gt;&lt;/H3&gt;
&lt;P&gt;&lt;SPAN&gt;This can be done by comparing the model’s forecasts to actual data and calculating performance metrics like Mean Squared Error (MSE). Performance Metrics:&lt;/SPAN&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI style="font-weight: 400;" aria-level="1"&gt;&lt;STRONG&gt;Mean Squared Error (MSE)&lt;/STRONG&gt;&lt;SPAN&gt;: Measures the average squared difference between the estimated values and the actual value, offering a view of the overall variance in the forecasting errors. Lower MSE values denote a model with fewer errors.&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI style="font-weight: 400;" aria-level="1"&gt;&lt;STRONG&gt;Root Mean Squared Error (RMSE)&lt;/STRONG&gt;&lt;SPAN&gt;: Represents the square root of MSE, thus re-scaling errors to the original units of the target variable, which improves interpretability.&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI style="font-weight: 400;" aria-level="1"&gt;&lt;STRONG&gt;Mean Absolute Error (MAE)&lt;/STRONG&gt;&lt;SPAN&gt;: Averages the absolute differences between predicted and actual values. Unlike MSE, MAE is more robust to outliers, as it does not square the errors.&lt;/SPAN&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;H4&gt;&lt;SPAN&gt;Interpreting the Metrics&lt;/SPAN&gt;&lt;/H4&gt;
&lt;UL&gt;
&lt;LI style="font-weight: 400;" aria-level="1"&gt;&lt;STRONG&gt;MSE and RMSE&lt;/STRONG&gt;&lt;SPAN&gt; are more sensitive to outliers due to squaring the errors, often used when large errors are particularly undesirable.&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI style="font-weight: 400;" aria-level="1"&gt;&lt;STRONG&gt;MAE&lt;/STRONG&gt;&lt;SPAN&gt; is straightforward and easy to interpret, as it directly represents the average error.&lt;/SPAN&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&lt;SPAN&gt;The choice between these metrics should be informed by your specific forecasting objectives and the nature of the data. In practice, assessing model performance might involve looking at multiple metrics to get a comprehensive view of the model's accuracy.&lt;/SPAN&gt;&lt;/P&gt;
&lt;LI-CODE lang="python"&gt;import pandas as pd

from sklearn.metrics import mean_squared_error, mean_absolute_error, r2_score
from math import sqrt
from datetime import date

# get historical actuals &amp;amp; predictions for comparison
actuals_pd = history_pd[history_pd['ds'] &amp;lt; date(2024, 4, 29)]['y'] #Update it to max date on your dataset
predicted_pd = forecast_pd[forecast_pd['ds'] &amp;lt; pd.to_datetime('2024-04-29')]['yhat'] #Update it to max date on your dataset

# calculate evaluation metrics
mae = mean_absolute_error(actuals_pd, predicted_pd)
mse = mean_squared_error(actuals_pd, predicted_pd)
rmse = sqrt(mse)

# Print other metrics
print(f"MAE: {mae}")
print(f"MSE: {mse}")
print(f"RMSE: {rmse}")&lt;/LI-CODE&gt;
&lt;H3&gt;&lt;SPAN&gt;Log the model with MLflow&lt;/SPAN&gt;&lt;/H3&gt;
&lt;P&gt;&lt;STRONG&gt;Model Logging&lt;/STRONG&gt;&lt;SPAN&gt; is critical for tracking the performance and changes to models over time, ensuring reproducibility and accountability. Techniques include:&lt;/SPAN&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI style="font-weight: 400;" aria-level="1"&gt;&lt;STRONG&gt;MLflow Logging&lt;/STRONG&gt;&lt;SPAN&gt;: Utilize MLflow's robust platform for logging models, parameters, and artifacts. It supports structured experiment tracking, perfect for recording and comparing different versions of your models.&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI style="font-weight: 400;" aria-level="1"&gt;&lt;STRONG&gt;Custom Logging&lt;/STRONG&gt;&lt;SPAN&gt;: Implement tailored logging approaches to capture unique model insights or additional metadata not standardly logged by existing tools.&lt;/SPAN&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;H4&gt;&lt;SPAN&gt;Benefits of Logging with MLflow&lt;/SPAN&gt;&lt;/H4&gt;
&lt;P&gt;&lt;SPAN&gt;Logging models with MLflow offers several advantages:&lt;/SPAN&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI style="font-weight: 400;" aria-level="1"&gt;&lt;STRONG&gt;Reproducibility&lt;/STRONG&gt;&lt;SPAN&gt;: By capturing all necessary details of the experimentation phase, MLflow makes it easier to replicate results and understand decision-making processes.&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI style="font-weight: 400;" aria-level="1"&gt;&lt;STRONG&gt;Model Registry&lt;/STRONG&gt;&lt;SPAN&gt;: MLflow allows for versioning of models, making it simple to manage and deploy specific model versions based on performance metrics.&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI style="font-weight: 400;" aria-level="1"&gt;&lt;STRONG&gt;Collaboration and Sharing&lt;/STRONG&gt;&lt;SPAN&gt;: Teams can leverage MLflow’s centralized model storage to share models and results, enhancing collaboration.&lt;/SPAN&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&lt;SPAN&gt;For the purpose of this tutorial, we demonstrate how to efficiently log a Prophet model using MLflow, capturing essential information that supports further analysis and model deployment.&lt;/SPAN&gt;&lt;/P&gt;
&lt;LI-CODE lang="python"&gt;import mlflow
from mlflow.tracking import MlflowClient
from mlflow.models.signature import infer_signature
from mlflow.pyfunc import PythonModel, log_model

# Define the catalog, schema, and model name for organizing the model within the MLflow model registry
catalog = "catalog_name" #Update it to your catalog name
schema = "schema_name" #Update it to your schema name
model_name = "forecastingmodel" #Update it to your model name

class MyPythonModel(mlflow.pyfunc.PythonModel):
    def __init__(self, model):
        self.model = model

    def predict(self, context, model_input):
        future_pd = self.model.make_future_dataframe(periods=10, freq="d", include_history=True)
        forecast_pd = self.model.predict(future_pd)
        return forecast_pd[["ds", "yhat", "yhat_upper", "yhat_lower"]]
    
wrapped_model = MyPythonModel(prophet_model)

# Enable MLflow auto logging for tracking machine learning metrics and artifacts
with mlflow.start_run(run_name="Prophet Model Run") as run:

    input_example = history_pd.head()[["ds", "y"]]
    output_example = prophet_model.predict(input_example).iloc[:10]

    # Log calculated metrics
    mlflow.log_metric("mae", mae)
    mlflow.log_metric("rmse", rmse)

    print(output_example)
    # Infer the signature of the machine learning model
    signature = infer_signature(input_example, output_example)

    # Update dependencies in the default conda environment
    env = mlflow.pyfunc.get_default_conda_env()
    env['dependencies'][-1]['pip'] += ["prophet==1.1.5"]
    env['dependencies'][-1]['pip'] += ["pandas==1.5.3"]
    env['dependencies'][-1]['pip'] += ["pyspark==3.5.1"]
    env['dependencies'][-1]['pip'] += ["grpcio==1.62.0"]
    env['dependencies'][-1]['pip'] += ["grpcio_status==1.62.0"]

    # Log the trained model to MLflow with the inferred signature
    model_log = log_model(
        artifact_path="forecasting_model",
        python_model=wrapped_model,
        signature=signature,
        input_example=input_example,
        registered_model_name=f"{catalog}.{schema}.{model_name}",
        conda_env=env
    )

    # Retain the "run_id" for use with other MLflow functionalities like registering the model
    run_id = run.info.run_uuid&lt;/LI-CODE&gt;&lt;LI-CODE lang="python"&gt;#Get the latest Model Version
def get_latest_model_version(model_name:str = None):
    latest_version = 1
    mlflow_client = MlflowClient()
    for mv in mlflow_client.search_model_versions(f"name='{model_name}'"):
      version_int = int(mv.version)
      if version_int &amp;gt; latest_version:
        latest_version = version_int
    return latest_version
  
model_version = get_latest_model_version(f"{catalog}.{schema}.{model_name}")&lt;/LI-CODE&gt;
&lt;H3&gt;&lt;SPAN&gt;Deploy Models on Databricks&lt;/SPAN&gt;&lt;/H3&gt;
&lt;P&gt;&lt;SPAN&gt;Deploying machine learning models into production on Databricks can be achieved through two primary methods: MLflow for batch inference and prediction, and Databricks Model Serving for real-time inference. Each serves different use cases based on the requirement for real-time responses and the scale of data processing.&lt;/SPAN&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI style="font-weight: 400;" aria-level="1"&gt;&lt;STRONG&gt;MLflow for Batch Inference and Prediction: &lt;/STRONG&gt;&lt;SPAN&gt;Batch processing is ideal for scenarios where predictions can be made on large datasets at once without the need for immediate responses. This method fits well with scheduled analytics and reporting.&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI style="font-weight: 400;" aria-level="1"&gt;&lt;STRONG&gt;Databricks Model Serving for Real-Time Inference: &lt;/STRONG&gt;&lt;SPAN&gt;This method is better suited for scenarios where low latency and real-time responses are important.&lt;/SPAN&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;LI-CODE lang="python"&gt;import mlflow, os
import requests, json
from databricks.sdk import WorkspaceClient
from databricks.sdk.service.serving import EndpointCoreConfigInput, ServedModelInput
from mlflow.deployments import get_deploy_client

serving_endpoint_name = "forecasting_model_serving"

# Get the API endpoint and token for the current notebook context
API_ROOT = dbutils.notebook.entry_point.getDbutils().notebook().getContext().apiUrl().get()
API_TOKEN = dbutils.notebook.entry_point.getDbutils().notebook().getContext().apiToken().getOrElse(None)


client = get_deploy_client("databricks")

# Check if the endpoint already exists
existing_endpoint = next(
    (e for e in client.list_endpoints() if e['name'] == serving_endpoint_name), None
)

# Update the endpoint configuration
endpoint_config = {
    "served_entities": [
        {
            "entity_name": f"{catalog}.{schema}.{model_name}",
            "entity_version": model_version,
            "workload_size": "Small",
            "workload_type": "CPU",
            "scale_to_zero_enabled": True
        }
    ]
}

if existing_endpoint is not None:
    # Update the existing endpoint
    endpoint = client.update_endpoint(
        endpoint=serving_endpoint_name,
        config=endpoint_config
    )
else:
    # Create a new endpoint if it does not exist
    endpoint = client.create_endpoint(
        name=serving_endpoint_name,
        config=endpoint_config
    )&lt;/LI-CODE&gt;&lt;LI-CODE lang="python"&gt;# Wait for Endpoint to be ready

import time
from datetime import datetime, timedelta

# Define the maximum wait time (20 minutes)
max_wait_time = timedelta(minutes=20)
deadline = datetime.now() + max_wait_time

# Function to check the status of the endpoint
def check_endpoint_status(client, endpoint_name):
    endpoints = client.list_endpoints()
    for endpoint in endpoints:
        if endpoint['name'] == endpoint_name:
            return endpoint
    return None

# Wait for the endpoint to be ready or until the deadline is reached
while datetime.now() &amp;lt; deadline:
    endpoint_info = check_endpoint_status(client, serving_endpoint_name)
    if endpoint_info is not None and str(endpoint_info['state']['ready']).lower() == 'ready' and str(endpoint_info['state']['config_update']).lower() != 'in_progress':
        print(f"Endpoint {serving_endpoint_name} is ready.")
        break
    else:
        print(f"Waiting for endpoint {serving_endpoint_name} to be ready. Current status: {endpoint_info['state'] if endpoint_info else 'Not Found'}")
        time.sleep(60)  # Wait for 60 seconds before checking again
else:
    print(f"Timeout reached. Endpoint {serving_endpoint_name} may not be ready.")

displayHTML(
    f'Your Model Endpoint Serving is now available. Open the &amp;lt;a href="/ml/endpoints/{serving_endpoint_name}"&amp;gt;Model Serving Endpoint page&amp;lt;/a&amp;gt; for more details.'
)&lt;/LI-CODE&gt;
&lt;H3&gt;&lt;SPAN&gt;Build Forecast and Continuous Improvement&lt;/SPAN&gt;&lt;/H3&gt;
&lt;P&gt;&lt;SPAN&gt;After developing and deploying your machine learning model, the final step is to utilize the model to make predictions. This process involves sending new data to the model endpoint and interpreting the predictions returned by the model.&lt;/SPAN&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI style="font-weight: 400;" aria-level="1"&gt;&lt;STRONG&gt;Generate Forecasts&lt;/STRONG&gt;&lt;SPAN&gt;: Use your model to predict future values based on historical data.&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI style="font-weight: 400;" aria-level="1"&gt;&lt;STRONG&gt;Validate and Iterate&lt;/STRONG&gt;&lt;SPAN&gt;: Continuously validate your model against new data and iterate to improve accuracy and reliability.&lt;/SPAN&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;LI-CODE lang="python"&gt;#Predict using Served Model
import requests
import json
from datetime import date, datetime

# Custom encoder for handling date and datetime objects in JSON serialization
class CustomJSONEncoder(json.JSONEncoder):
    def default(self, obj):
        if isinstance(obj, (datetime, date)):
            return obj.isoformat()
        return json.JSONEncoder.default(self, obj)

# Prepare data payload from DataFrame for model invocation
data_payload = {"dataframe_records": history_pd.to_dict(orient='records')}
data_json = json.dumps(data_payload, cls=CustomJSONEncoder)

# Setup headers for the POST request
headers = {
    "Content-Type": "application/json",
    "Authorization": f"Bearer {API_TOKEN}",
}

# Endpoint URL for model invocation
serving_endpoint_url = f"{API_ROOT}/serving-endpoints/{serving_endpoint_name}/invocations"

# API call to deploy model and obtain predictions
response = requests.post(serving_endpoint_url, headers=headers, data=data_json)

# Check and display the response
if response.status_code == 200:
    predictions = response.json()
    print("Predictions:", predictions)
else:
    print("Failed to make predictions")&lt;/LI-CODE&gt;&lt;LI-CODE lang="python"&gt;#Visualize the Predictions
import pandas as pd
import matplotlib.pyplot as plt
from datetime import datetime, timedelta

# Convert predictions JSON to DataFrame
pred_df = pd.json_normalize(predictions['predictions'])

# Ensure 'ds' columns are datetime objects for merging and filtering
history_pd['ds'] = pd.to_datetime(history_pd['ds'])
pred_df['ds'] = pd.to_datetime(pred_df['ds'])

# Merge historical and prediction data on 'ds'
combined_df = pd.merge(left=pred_df, right=history_pd, on='ds', how='left')

# Filter for data from the last 60 days
combined_df = combined_df[combined_df['ds'] &amp;gt;= history_pd['ds'].max() - timedelta(days=60)]

# Plotting setup
plt.figure(figsize=(12, 6))

# Plot actual values and predictions
plt.plot(combined_df['ds'], combined_df['y'], label='Actual', color='black')
plt.plot(combined_df['ds'], combined_df['yhat'], label='Predicted', color='blue')

# Indicate prediction uncertainty
plt.fill_between(combined_df['ds'], combined_df['yhat_lower'], combined_df['yhat_upper'], color='gray', alpha=0.2)

# Finalize plot
plt.title('Model Predictions vs Actual Values')
plt.xlabel('Date')
plt.ylabel('Value')
plt.legend()
plt.grid(True)

# Display the plot
plt.show()&lt;/LI-CODE&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="DatabricksGuide_2-1715968440657.png" style="width: 400px;"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/7637iA5462F3F0580000E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="DatabricksGuide_2-1715968440657.png" alt="DatabricksGuide_2-1715968440657.png" /&gt;&lt;/span&gt;
&lt;P&gt;&lt;SPAN&gt;In conclusion, successfully forecasting on Databricks hinges on a thorough understanding of your data, meticulous preparation, strategic model selection, and continuous improvement through iteration, logging, and serving. By integrating these practices into your workflow, you can develop powerful forecasting models that drive informed decisions for your organization.&lt;/SPAN&gt;&lt;/P&gt;
&lt;/DIV&gt;</description>
      <pubDate>Mon, 12 Aug 2024 18:15:10 GMT</pubDate>
      <guid>https://community.databricks.com/t5/get-started-guides/getting-started-with-databricks-building-a-forecasting-model-on/ta-p/69301</guid>
      <dc:creator>DatabricksGuide</dc:creator>
      <dc:date>2024-08-12T18:15:10Z</dc:date>
    </item>
    <item>
      <title>Getting Started with Databricks - Build a simple Lakehouse analytics pipeline</title>
      <link>https://community.databricks.com/t5/get-started-guides/getting-started-with-databricks-build-a-simple-lakehouse/ta-p/67404</link>
      <description>&lt;H1&gt;&lt;STRONG&gt;Getting started with Databricks - Build a simple Lakehouse analytics pipeline&lt;/STRONG&gt;&lt;/H1&gt;
&lt;P&gt;&lt;SPAN&gt;The demo example in this guide illustrates a lakehouse analytics pipeline using the well-known NYC taxi trip dataset. This public dataset is also available at Kaggle.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;This guide provides a practical demonstration of how to structure a data pipeline using the medallion architecture, progressively refining and analyzing data as it moves through each layer. It also demonstrates the pipeline’s integration with Unity Catalog, showing how to set up data lineage and governance. Finally, it covers AI/BI dashboards for enhancing analytical decision-making and sharing insights with team members.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;This is a beginner’s tutorial with hands-on instructions to execute in your own Databricks workspace. &lt;/SPAN&gt;&lt;A href="https://www.databricks.com/try-databricks#account" target="_blank" rel="noopener"&gt;&lt;SPAN&gt;You can request a free 14-day trial.&amp;nbsp;&lt;/SPAN&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Understanding the medallion architecture&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;The medallion architecture is a method for organizing and refining data in a lakehouse by moving it through three layers—Bronze (raw data), Silver (cleaned data), and Gold (final, ready-to-use data).&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="lia-align-center"&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="DatabricksGuide_0-1723742834161.png" style="width: 400px;"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/10370i1686F6209E18FFFD/image-size/medium?v=v2&amp;amp;px=400" role="button" title="DatabricksGuide_0-1723742834161.png" alt="DatabricksGuide_0-1723742834161.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;H3&gt;&lt;STRONG&gt;Step 1: Create a notebook and add SQL pipeline code&lt;/STRONG&gt;&lt;/H3&gt;
&lt;OL&gt;
&lt;LI style="font-weight: 400;" aria-level="1"&gt;&lt;SPAN&gt;In your Databricks workspace, click "+New" in the left sidebar and select Notebook. Name the notebook “NYTaxi Pipeline SQL.”&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI style="font-weight: 400;" aria-level="1"&gt;&lt;SPAN&gt;Set the notebook’s default language to SQL next to its name. We want to code the pipeline in SQL for simplicity.&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI style="font-weight: 400;" aria-level="1"&gt;&lt;SPAN&gt;Copy and paste the following code into your new SQL notebook.&amp;nbsp;&lt;/SPAN&gt;&lt;/LI&gt;
&lt;/OL&gt;
&lt;H4&gt;&lt;STRONG&gt;&amp;nbsp;Bronze layer&lt;/STRONG&gt;&lt;/H4&gt;
&lt;P&gt;&lt;I&gt;&lt;SPAN&gt;Bronze Table: &lt;/SPAN&gt;&lt;/I&gt;&lt;I&gt;&lt;SPAN&gt;Raw data ingestion&lt;BR /&gt;&lt;/SPAN&gt;&lt;/I&gt;&lt;SPAN&gt;Here, raw taxi trip data is ingested, with a basic data quality check applied to ensure trip distances are positive.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="python"&gt;- Bronze layer: Raw data ingestion

CREATE OR REPLACE TABLE taxi_raw_records AS
SELECT *
FROM samples.nyctaxi.trips
WHERE trip_distance &amp;gt; 0.0;&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;-Silver layer&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;The Silver layer creates two tables:&amp;nbsp;&lt;BR /&gt;&lt;/SPAN&gt;&lt;I&gt;&lt;SPAN&gt;Silver Table 1:&amp;nbsp; Flagged rides&lt;BR /&gt;&lt;/SPAN&gt;&lt;/I&gt;&lt;SPAN&gt;This table identifies potentially suspicious rides based on fare and distance criteria.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="python"&gt;-- Silver Table 1: Flagged rides

CREATE OR REPLACE TABLE flagged_rides AS
SELECT
  date_trunc("week", tpep_pickup_datetime) AS week,
  pickup_zip AS zip,
  fare_amount,
  trip_distance
FROM
  taxi_raw_records
WHERE ((pickup_zip = dropoff_zip AND fare_amount &amp;gt; 50) OR
       (trip_distance &amp;lt; 5 AND fare_amount &amp;gt; 50));&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;I&gt;&lt;SPAN&gt;Silver Table 2: Weekly statistics&lt;BR /&gt;&lt;/SPAN&gt;&lt;/I&gt;&lt;SPAN&gt;This silver table calculates weekly average fares and trip distances.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="python"&gt;- Silver layer 2: Weekly statistics

CREATE OR REPLACE TABLE weekly_stats AS
SELECT
  date_trunc("week", tpep_pickup_datetime) AS week,
  AVG(fare_amount) AS avg_amount,
  AVG(trip_distance) AS avg_distance
FROM
  taxi_raw_records
GROUP BY week
ORDER BY week ASC;&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Gold layer&lt;BR /&gt;&lt;/STRONG&gt;&lt;EM&gt;Gold Table 1: Top N rides&lt;/EM&gt;&lt;BR /&gt;&lt;SPAN&gt;Here, these silver tables are integrated to provide a comprehensive view of the top three highest-fare rides.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="python"&gt;-- Gold layer: Top N rides to investigate

CREATE OR REPLACE TABLE top_n AS
SELECT
  ws.week,
  ROUND(ws.avg_amount, 2) AS avg_amount,
  ROUND(ws.avg_distance, 3) AS avg_distance,
  fr.fare_amount,
  fr.trip_distance,
  fr.zip
FROM
  flagged_rides fr
LEFT JOIN weekly_stats ws ON ws.week = fr.week
ORDER BY fr.fare_amount DESC
LIMIT 3;&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H3&gt;&lt;STRONG&gt;Step 2: Schedule a notebook job&lt;/STRONG&gt;&lt;/H3&gt;
&lt;P&gt;&lt;SPAN&gt;To ensure that the Bronze, Silver, and Gold tables are regularly updated with fresh data, it’s recommended to schedule the notebook as a job to run periodically. This will keep the tables current with the latest information.&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;To schedule a notebook job to run periodically:&lt;/SPAN&gt;&lt;/P&gt;
&lt;OL&gt;
&lt;LI style="font-weight: 400;" aria-level="1"&gt;&lt;SPAN&gt;In the notebook, click the &lt;/SPAN&gt;&lt;STRONG&gt;Schedule &lt;/STRONG&gt;&lt;SPAN&gt;button at the top right.&amp;nbsp;&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI style="font-weight: 400;" aria-level="1"&gt;&lt;SPAN&gt;In the Schedule dialog, optionally enter a name for the job. The default name is the name of the notebook.&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI style="font-weight: 400;" aria-level="1"&gt;&lt;SPAN&gt;Scheduled runs allow you to define a schedule for your job run. Adjust the frequency, time, and time zone for the job run.&amp;nbsp;&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI style="font-weight: 400;" aria-level="1"&gt;&lt;SPAN&gt;Leave everything else as is and click &lt;/SPAN&gt;&lt;STRONG&gt;Create&lt;/STRONG&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI style="font-weight: 400;" aria-level="1"&gt;&lt;SPAN&gt;Once the schedule is successfully created, click &lt;/SPAN&gt;&lt;STRONG&gt;Run Now &lt;/STRONG&gt;&lt;SPAN&gt;to trigger a job run for the NYCTaxiSQL Pipeline.&lt;/SPAN&gt;&lt;/LI&gt;
&lt;/OL&gt;
&lt;H3&gt;&lt;STRONG&gt;Step 3: Discover data using Catalog Explorer&lt;/STRONG&gt;&lt;/H3&gt;
&lt;P&gt;&lt;SPAN&gt;Explore and manage your generated datasets through Unity Catalog using Catalog Explorer. Unity Catalog organizes data in a three-level namespace:&lt;/SPAN&gt;&lt;SPAN&gt; Catalog.Schema.Table.&lt;/SPAN&gt;&lt;SPAN&gt; Follow the steps below to examine the data produced by your pipeline and visualize its lineage. This allows you to inspect sample data, view table details, and explore the end-to-end data lineage of your pipeline objects.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="DatabricksGuide_1-1723742833943.png" style="width: 400px;"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/10369iA5B60EF6A4DF52E9/image-size/medium?v=v2&amp;amp;px=400" role="button" title="DatabricksGuide_1-1723742833943.png" alt="DatabricksGuide_1-1723742833943.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;OL&gt;
&lt;LI style="font-weight: 400;" aria-level="1"&gt;&lt;SPAN&gt;Click &lt;/SPAN&gt;&lt;STRONG&gt;Catalog&lt;/STRONG&gt;&lt;SPAN&gt; in the sidebar to open the Catalog Explorer.&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI style="font-weight: 400;" aria-level="1"&gt;&lt;SPAN&gt;The newly created tables from our NYCTaxiSQLPipeline should be accessible by clicking the Recents top on the top of the page.&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI style="font-weight: 400;" aria-level="1"&gt;&lt;SPAN&gt;Click weekly_stats to load the table details.&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI style="font-weight: 400;" aria-level="1"&gt;&lt;SPAN&gt;Click &lt;/SPAN&gt;&lt;STRONG&gt;Lineage&lt;/STRONG&gt;&lt;SPAN&gt; and then &lt;/SPAN&gt;&lt;STRONG&gt;Lineage Graph&lt;/STRONG&gt;&lt;SPAN&gt; to view a graphical representation of all the upstream and downstream tables from weekly_stats.&amp;nbsp;&lt;/SPAN&gt;&lt;/LI&gt;
&lt;/OL&gt;
&lt;H3&gt;&lt;STRONG&gt;Step 4: Create a Dashboard&lt;/STRONG&gt;&lt;/H3&gt;
&lt;OL&gt;
&lt;LI style="font-weight: 400;" aria-level="1"&gt;&lt;SPAN&gt;Use the &lt;/SPAN&gt;&lt;STRONG&gt;Create&lt;/STRONG&gt;&lt;SPAN&gt; button on the right side to create a &lt;/SPAN&gt;&lt;STRONG&gt;Dashboard&lt;/STRONG&gt;&lt;SPAN&gt; from the weekly_stats table. This automatically creates a new dashboard for the weekly_stats table. Rename the dashboard on the top as NYCTaxiPipelineDash.&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI style="font-weight: 400;" aria-level="1"&gt;&lt;SPAN&gt;Start building out your dashboard by using the &lt;/SPAN&gt;&lt;STRONG&gt;Ask the Assistant&lt;/STRONG&gt;&lt;SPAN&gt; prompt at the top of the dashboard to create your first chart using AI. Click one of the auto-generated prompts to get started.&amp;nbsp;&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI style="font-weight: 400;" aria-level="1"&gt;&lt;SPAN&gt;Add more charts by using the “Add a Visualization” widget from the selector at the bottom and place the cursor on a space on the dashboard. Here are some additional prompts:&lt;/SPAN&gt;&lt;/LI&gt;
&lt;OL&gt;
&lt;LI style="font-weight: 400;" aria-level="2"&gt;&lt;I&gt;&lt;SPAN&gt;Show a scatter plot of the trip distance and average fare amount by day of the week.&lt;/SPAN&gt;&lt;/I&gt;&lt;/LI&gt;
&lt;LI style="font-weight: 400;" aria-level="2"&gt;&lt;I&gt;&lt;SPAN&gt;Visualize total trips across zip codes as a bar chart&lt;/SPAN&gt;&lt;/I&gt;&lt;/LI&gt;
&lt;/OL&gt;
&lt;LI style="font-weight: 400;" aria-level="1"&gt;&lt;SPAN&gt;Click &lt;/SPAN&gt;&lt;STRONG&gt;Accept &lt;/STRONG&gt;&lt;SPAN&gt;to save the AI-generated chart or use the widget on the right to regenerate the chart. Use the&lt;/SPAN&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="DatabricksGuide_2-1723742833913.png" style="width: 24px;"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/10368i19F1AA0BD1A46FB5/image-dimensions/24x22?v=v2" width="24" height="22" role="button" title="DatabricksGuide_2-1723742833913.png" alt="DatabricksGuide_2-1723742833913.png" /&gt;&lt;/span&gt;&lt;SPAN&gt;button on the upper-right of each chart to provide a different prompt to update the chart.&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI style="font-weight: 400;" aria-level="1"&gt;&lt;SPAN&gt;Alternatively, use the chart builder on the right side to choose a chart type and then select values for the x-axis and y-axis.&lt;/SPAN&gt;&lt;/LI&gt;
&lt;/OL&gt;
&lt;H3&gt;&lt;STRONG&gt;Step 5: Publish and distribute your dashboard&lt;/STRONG&gt;&lt;/H3&gt;
&lt;P&gt;&lt;SPAN&gt;While you develop a dashboard, your progress is saved as a draft. To create a clean copy for easy consumption, publish your dashboard. After you publish a dashboard, the published version remains intact until you publish again, even if you make changes to the draft. You can make modifications and improvements to the draft version without affecting the published copy.&lt;/SPAN&gt;&lt;/P&gt;
&lt;OL&gt;
&lt;LI style="font-weight: 400;" aria-level="1"&gt;&lt;SPAN&gt;When you’re done adding charts to this dashboard, click &lt;/SPAN&gt;&lt;STRONG&gt;Publish&lt;/STRONG&gt;&lt;SPAN&gt; in the upper-right corner to create a clean copy of the current dashboard.&amp;nbsp;&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI style="font-weight: 400;" aria-level="1"&gt;&lt;SPAN&gt;Click &lt;/SPAN&gt;&lt;STRONG&gt;Publish.&lt;/STRONG&gt;&lt;SPAN&gt; Your dashboard is now ready to be shared with other team members.&lt;/SPAN&gt;&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;&lt;STRONG&gt;Add users to your Databricks Workspace&lt;/STRONG&gt;&lt;/P&gt;
&lt;OL&gt;
&lt;LI style="font-weight: 400;" aria-level="1"&gt;&lt;SPAN&gt;In the top bar of the Databricks workspace, click your username and then click Settings.&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI style="font-weight: 400;" aria-level="1"&gt;&lt;SPAN&gt;In the sidebar, click &lt;STRONG&gt;Identity and Access&lt;/STRONG&gt;.&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI style="font-weight: 400;" aria-level="1"&gt;&lt;SPAN&gt;Next to Users, click &lt;STRONG&gt;Manage&lt;/STRONG&gt;.&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI style="font-weight: 400;" aria-level="1"&gt;&lt;SPAN&gt;Click&lt;STRONG&gt; Add user&lt;/STRONG&gt;, and then click &lt;STRONG&gt;Add new&lt;/STRONG&gt;.&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI style="font-weight: 400;" aria-level="1"&gt;&lt;SPAN&gt;Enter the user’s email address, and then click &lt;STRONG&gt;Add&lt;/STRONG&gt;.&lt;/SPAN&gt;&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;&lt;SPAN&gt;Continue to add as many users to your account as you would like. New users receive an email prompting them to set up their account.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Share the dashboard with colleagues&lt;/STRONG&gt;&lt;/P&gt;
&lt;OL&gt;
&lt;LI style="font-weight: 400;" aria-level="1"&gt;&lt;SPAN&gt;To manage access to the dashboard, click &lt;/SPAN&gt;&lt;STRONG&gt;Share&lt;/STRONG&gt;&lt;SPAN&gt; at the top of the dashboard to open the permissions dialog.&amp;nbsp;&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI style="font-weight: 400;" aria-level="1"&gt;&lt;SPAN&gt;Enter the email address of the user you want to share the dashboard with and click "&lt;/SPAN&gt;&lt;STRONG&gt;Add&lt;/STRONG&gt;&lt;SPAN&gt;." They will receive an email notification and will be able to access the dashboard in Databricks.&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI style="font-weight: 400;" aria-level="1"&gt;&lt;SPAN&gt;[Optional] To share the dashboard with all colleagues, add the “All Users” group to the dashboard’s access list with “Can View” or “Can Run” permissions. You can also copy the dashboard’s URL to your clipboard using the “Copy link” button and send it directly to your colleagues. &lt;span class="lia-unicode-emoji" title=":party_popper:"&gt;🎉&lt;/span&gt;&lt;/SPAN&gt;&lt;/LI&gt;
&lt;/OL&gt;
&lt;H2&gt;&lt;STRONG&gt;Congratulations!&lt;/STRONG&gt;&lt;/H2&gt;
&lt;P&gt;&lt;SPAN&gt;You’ve now created, run, and analyzed an analytics pipeline demonstrating data processing, data quality checks, and the creation of analytics-ready tables and dashboards. Not only have you gained insights into the taxi trip data, but you’ve also likely learned how expensive a ride in the Big Apple can be if things go wrong — perhaps it’s time to consider the subway!&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;As you become more comfortable with ETL pipelines, you can expand this pipeline with more complex transformations, data streaming, and more comprehensive data quality checks.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI style="font-weight: 400;" aria-level="1"&gt;&lt;SPAN&gt;To learn more about Databricks Jobs, see &lt;/SPAN&gt;&lt;A href="https://docs.databricks.com/en/workflows/index.html#what-is-jobs" target="_blank" rel="noopener"&gt;&lt;SPAN&gt;What is Databricks Jobs?&lt;/SPAN&gt;&lt;/A&gt;&lt;/LI&gt;
&lt;LI style="font-weight: 400;" aria-level="1"&gt;&lt;SPAN&gt;To learn more about Delta Lake, see &lt;/SPAN&gt;&lt;A href="https://docs.databricks.com/en/delta/index.html" target="_blank" rel="noopener"&gt;&lt;SPAN&gt;What is Delta Lake?&lt;/SPAN&gt;&lt;/A&gt;&lt;/LI&gt;
&lt;LI style="font-weight: 400;" aria-level="1"&gt;&lt;SPAN&gt;To learn more about data processing pipelines with Delta Live Tables, see &lt;/SPAN&gt;&lt;A href="https://docs.databricks.com/en/delta-live-tables/index.html" target="_blank" rel="noopener"&gt;&lt;SPAN&gt;What is Delta Live Tables?&lt;/SPAN&gt;&lt;/A&gt;&lt;/LI&gt;
&lt;/UL&gt;</description>
      <pubDate>Thu, 15 Aug 2024 18:09:35 GMT</pubDate>
      <guid>https://community.databricks.com/t5/get-started-guides/getting-started-with-databricks-build-a-simple-lakehouse/ta-p/67404</guid>
      <dc:creator>DatabricksGuide</dc:creator>
      <dc:date>2024-08-15T18:09:35Z</dc:date>
    </item>
    <item>
      <title>Getting Started with Databricks SQL Serverless on Azure</title>
      <link>https://community.databricks.com/t5/get-started-guides/getting-started-with-databricks-sql-serverless-on-azure/ta-p/63086</link>
      <description>&lt;DIV class="lia-message-template-content-zone"&gt;
&lt;H1 id="toc-hId-478787956"&gt;Getting Started with Databricks SQL Serverless on Azure&lt;/H1&gt;
&lt;P&gt;This is an Azure admin guide for existing Databricks SQL customers interested in SQL Serverless features. This guide covers the following topics:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;&lt;A title="What is Serverless Architecture" href="#toc-hId--441162826" target="_self" rel="nofollow noreferrer"&gt;What is Serverless Architecture&lt;/A&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;A href="#toc-hId-446340855" target="_self" rel="nofollow noreferrer"&gt;Security on Serverless Architecture&lt;/A&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;A href="#toc-hId-1333844536" target="_self" rel="nofollow noreferrer"&gt;Why use Databricks SQL Serverless&lt;/A&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;A href="#toc-hId--2073619079" target="_self" rel="nofollow noreferrer"&gt;Serverless SQL Setup Steps (in 5 minutes)&lt;/A&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;A href="#toc-hId-1617392330" target="_self" rel="nofollow noreferrer"&gt;Additional Resources (troubleshooting steps, customer FAQs)&lt;/A&gt;&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;&lt;SPAN&gt;To learn more about Databricks SQL and data warehousing on the Databricks Data&amp;nbsp;Intelligence Platform,&amp;nbsp;&lt;/SPAN&gt;visit our&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://www.databricks.com/product/databricks-sql" target="_blank" rel="noopener nofollow noreferrer"&gt;website&lt;/A&gt;.&lt;/P&gt;
&lt;H2 id="toc-hId--441162826"&gt;&lt;U&gt;&lt;STRONG&gt;What is Serverless Architecture?&lt;/STRONG&gt;&lt;/U&gt;&lt;/H2&gt;
&lt;P&gt;&lt;SPAN&gt;Serverless is an architectural design where the compute layer and its associated resources are managed in the Databricks account rather than your Azure account. That means your resource and infrastructure management shifts to Databricks.&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;A serverless architecture is advantageous in the following ways:&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI aria-level="1"&gt;&lt;STRONG&gt;Productivity:&lt;/STRONG&gt;&amp;nbsp;&lt;SPAN&gt;cloud resources are efficiently managed by Databricks, eliminating management overhead and providing instant compute that boosts user productivity.&lt;/SPAN&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;UL&gt;
&lt;LI aria-level="1"&gt;&lt;STRONG&gt;Efficiency:&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;Serverless ensures near-instant start-up/scaling time while preventing underutilization. You benefit by only paying for the used compute and eliminating unnecessary idle time.&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI aria-level="1"&gt;&lt;STRONG&gt;Reliability:&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;Serverless is fully managed with capacity, security, patching and upgrades managed automatically, which eliminates concerns about security policies and reliability issues such as capacity shortages or quota limitations.&lt;/SPAN&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="DatabricksGuide_0-1709914347916.png" style="width: 564px;"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/6575i09BE4F60A9CDDFC2/image-dimensions/564x295?v=v2" width="564" height="295" role="button" title="DatabricksGuide_0-1709914347916.png" alt="DatabricksGuide_0-1709914347916.png" /&gt;&lt;/span&gt;&lt;BR /&gt;&lt;SPAN&gt;To learn more, please visit our&amp;nbsp;&lt;/SPAN&gt;&lt;A style="font-family: inherit; background-color: #ffffff;" href="https://learn.microsoft.com/en-us/azure/databricks/serverless-compute/" target="_blank" rel="nofollow noopener noreferrer"&gt;documentation&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;for more details on Databricks serverless compute.&lt;/SPAN&gt;
&lt;H2 id="toc-hId-446340855"&gt;&lt;U&gt;Security on Serverless Architecture&lt;/U&gt;&lt;/H2&gt;
&lt;P&gt;&lt;SPAN&gt;To safeguard customer data, serverless workloads run within multiple isolation layers. These security layers form the foundation of Databricks’ commitment to providing a secure and reliable environment for even the most sensitive workloads. They include but are not limited to:&lt;/SPAN&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;SPAN&gt;Dedicated compute resources&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI aria-level="1"&gt;&lt;SPAN&gt;Network segmentation&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI aria-level="1"&gt;&lt;SPAN&gt;Encryption at rest and in transit&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI aria-level="1"&gt;Principle of least privilege&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&lt;SPAN&gt;The high-level connections into and out of your Azure Databricks account for serverless is shown below:&lt;/SPAN&gt;&lt;/P&gt;
&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2024-03-09 at 1.11.11 PM.png" style="width: 623px;"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/6586i4E862A8140BF9009/image-dimensions/623x256?v=v2" width="623" height="256" role="button" title="Screenshot 2024-03-09 at 1.11.11 PM.png" alt="Screenshot 2024-03-09 at 1.11.11 PM.png" /&gt;&lt;/span&gt;
&lt;P&gt; To learn more about security with serverless compute, visit our&amp;nbsp;&lt;A style="font-family: inherit; background-color: #ffffff;" href="https://www.databricks.com/trust/security-features/serverless-security" target="_blank" rel="noopener nofollow noreferrer"&gt;website.&lt;/A&gt;&lt;/P&gt;
&lt;H2 id="toc-hId-1333844536"&gt;&lt;U&gt;&lt;STRONG&gt;Why use Databricks SQL Serverless?&lt;/STRONG&gt;&lt;/U&gt;&lt;/H2&gt;
&lt;P&gt;&lt;SPAN&gt;Databricks SQL is best with Serverless. Here are three main benefits of Serverless over Pro and Classic warehouses:&lt;/SPAN&gt;&lt;/P&gt;
&lt;OL&gt;
&lt;LI aria-level="1"&gt;&lt;STRONG&gt;Instant and elastic compute:&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN&gt;Serverless removes the need to wait for infrastructure resources to run queries or over provision resources to handle spikes in usage. Serverless warehouses dynamically handle scaling using intelligent workload management.&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI aria-level="1"&gt;&lt;STRONG&gt;Zero Management:&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN&gt;Serverless warehouses are fully managed by Databricks, eliminating the burden of capacity management, patching, upgrading and performance optimization. This leads to a simple and predictable pricing model compared to Pro or Classic.&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI aria-level="1"&gt;&lt;STRONG&gt;Lower TCO:&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;Serverless warehouses automatically provision and scale resources right when you need them. This avoids over-provisioning and reduces idle time, which can help reduce your TCO (Total Cost of Ownership).&lt;/SPAN&gt;&lt;/LI&gt;
&lt;/OL&gt;
&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="DatabricksGuide_1-1709914347918.png" style="width: 566px;"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/6576iEBA271DB3042A4D4/image-dimensions/566x287?v=v2" width="566" height="287" role="button" title="DatabricksGuide_1-1709914347918.png" alt="DatabricksGuide_1-1709914347918.png" /&gt;&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;To learn more about Serverless advantages or specific projected cost-savings scenarios from migrating Classic/Pro warehouses to Serverless, visit our&amp;nbsp;&lt;A href="https://www.databricks.com/product/pricing/databricks-sql" target="_blank" rel="nofollow noopener noreferrer"&gt;pricing page&lt;/A&gt;. For more help, contact&amp;nbsp;&lt;/SPAN&gt;&lt;A style="font-family: inherit; background-color: #ffffff;" href="mailto:onboarding-help@databricks.com" target="_blank" rel="noopener nofollow noreferrer"&gt;onboarding-help@databricks.com&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;or your Databricks account team directly.&lt;/SPAN&gt;
&lt;H2 id="toc-hId--2073619079"&gt;&lt;U&gt;&lt;STRONG&gt;SQL Serverless Setup Steps [5 minute guide]:&lt;/STRONG&gt;&lt;/U&gt;&lt;/H2&gt;
&lt;H3 id="toc-hId-1301397435"&gt;&lt;SPAN&gt;Step 0: Check the required prerequisites&lt;/SPAN&gt;&lt;/H3&gt;
&lt;P&gt;&lt;SPAN&gt;This section of the guide assumes you have the following:&lt;/SPAN&gt;&lt;/P&gt;
&lt;OL&gt;
&lt;LI aria-level="1"&gt;&lt;SPAN&gt;Workspace admin permissions on your Databricks account and intended workspace.&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI aria-level="1"&gt;&lt;SPAN&gt;Admin permissions to your Azure account.&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI aria-level="1"&gt;&lt;SPAN&gt;Non-free trial Databricks account. If you are interested in SQL Serverless on a free trial, contact&amp;nbsp;&lt;/SPAN&gt;&lt;A href="mailto:onboarding-help@databricks.com" target="_blank" rel="noopener nofollow noreferrer"&gt;&lt;SPAN&gt;onboarding-help@databricks.com&lt;/SPAN&gt;&lt;/A&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI aria-level="1"&gt;Premium or enterprise account subscription. This can be verified in your&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://accounts.cloud.databricks.com/settings/subscription-billing/subscription-plan-select" target="_blank" rel="noopener nofollow noreferrer"&gt;Databricks account console&lt;/A&gt;&lt;SPAN&gt;. Below is an example Databricks account on the correct premium plan.&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;If you are on standard, upgrade to premium or contact&amp;nbsp;&lt;/SPAN&gt;&lt;A href="mailto:onboarding-help@databricks.com" target="_blank" rel="noopener nofollow noreferrer"&gt;&lt;SPAN&gt;onboarding-help@databricks.com&lt;/SPAN&gt;&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;for help.&lt;/SPAN&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="DatabricksGuide_2-1709914347924.gif" style="width: 400px;"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/6577iE621DA0C28B97076/image-size/medium?v=v2&amp;amp;px=400" role="button" title="DatabricksGuide_2-1709914347924.gif" alt="DatabricksGuide_2-1709914347924.gif" /&gt;&lt;/span&gt;&lt;/LI&gt;
&lt;LI aria-level="1"&gt;Intended workspace is in a&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://learn.microsoft.com/en-us/azure/databricks/resources/supported-regions#regions-azure" target="_blank" rel="nofollow noopener noreferrer"&gt;supported region&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;for Serverless warehouses.&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI aria-level="1"&gt;&lt;SPAN&gt;Intended workspace is on the &lt;A href="https://www.databricks.com/product/pricing/platform-addons" target="_self"&gt;Premium plan&lt;/A&gt;&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI aria-level="1"&gt;Intended workspace does not use an&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://learn.microsoft.com/en-us/azure/databricks/archive/external-metastores/external-hive-metastore" target="_blank" rel="nofollow noopener noreferrer"&gt;external Apache Hive metastore&lt;/A&gt;&lt;SPAN&gt;. SQL&amp;nbsp;Serverless does not support this today, and we require upgrading to&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://learn.microsoft.com/en-us/azure/databricks/data-governance/unity-catalog/" target="_blank" rel="nofollow noopener noreferrer"&gt;Unity Catalog&lt;/A&gt;&lt;SPAN&gt;. For help, contact your Databricks account team or&amp;nbsp;&lt;/SPAN&gt;&lt;A href="mailto:onboarding-help@databricks.com" target="_blank" rel="noopener nofollow noreferrer"&gt;onboarding-help@databricks.com.&lt;/A&gt;&lt;/LI&gt;
&lt;/OL&gt;
&lt;H3 id="toc-hId--2106066180"&gt;&lt;SPAN&gt;Step 1: Activate and Configure Serverless&lt;/SPAN&gt;&lt;/H3&gt;
&lt;P&gt;&lt;SPAN&gt;Serverless is automatically enabled by default in Databricks SQL. If your account uses Azure Private Link, Azure Storage firewall, or NCC private end points, visit the&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;Appendix section for additional manual setup steps.&lt;/SPAN&gt;&lt;/P&gt;
&lt;H3 id="toc-hId--1218562499"&gt;&lt;SPAN&gt;Step 2: Create a serverless warehouse and grant permissions&lt;/SPAN&gt;&lt;/H3&gt;
&lt;P&gt;&lt;SPAN&gt;Log into your&amp;nbsp;&lt;/SPAN&gt;&lt;A href="http://cloud.databricks.com/" target="_blank" rel="noopener nofollow noreferrer"&gt;&lt;SPAN&gt;workspace&lt;/SPAN&gt;&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;and click on&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;SQL Warehouses&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;on the left sidebar.&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;Use this&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://app.getreprise.com/launch/3yAojBn/" target="_blank" rel="noopener nofollow noreferrer"&gt;&lt;SPAN&gt;guided tour&lt;/SPAN&gt;&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;for a step by step walkthrough in a demo workspace.&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;Alternatively,&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;visit our&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://learn.microsoft.com/en-us/azure/databricks/compute/sql-warehouse/create" target="_blank" rel="nofollow noopener noreferrer"&gt;&lt;SPAN&gt;documentation&lt;/SPAN&gt;&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;for setup instructions.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="DatabricksGuide_3-1709914347927.gif" style="width: 448px;"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/6580iBC6CBE6C6C8FF952/image-dimensions/448x279?v=v2" width="448" height="279" role="button" title="DatabricksGuide_3-1709914347927.gif" alt="DatabricksGuide_3-1709914347927.gif" /&gt;&lt;/span&gt;
&lt;H3 id="toc-hId--331058818"&gt;&lt;SPAN&gt;Step 3: Convert all existing Pro and Classic Warehouses to Serverless&lt;/SPAN&gt;&lt;/H3&gt;
&lt;P&gt;&lt;SPAN&gt;Log into your&amp;nbsp;&lt;A href="http://cloud.databricks.com/" target="_blank" rel="noopener nofollow noreferrer"&gt;workspace&lt;/A&gt;&amp;nbsp;and click on&amp;nbsp;&lt;STRONG&gt;SQL Warehouses&lt;/STRONG&gt;&amp;nbsp;on the left sidebar.&amp;nbsp;&lt;/SPAN&gt;To upgrade a SQL warehouse to serverless, click the kebab menu, then click &lt;STRONG&gt;Upgrade to Serverless&lt;/STRONG&gt;.&lt;/P&gt;
&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="DatabricksGuide_4-1709914347926.gif" style="width: 462px;"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/6579iDAA10DD81CC064D9/image-dimensions/462x274?v=v2" width="462" height="274" role="button" title="DatabricksGuide_4-1709914347926.gif" alt="DatabricksGuide_4-1709914347926.gif" /&gt;&lt;/span&gt;
&lt;H3 id="toc-hId-556444863"&gt;&lt;SPAN&gt;Step 4: Enable your users on Serverless&lt;/SPAN&gt;&lt;/H3&gt;
&lt;P&gt;&lt;SPAN&gt;Your serverless setup on Azure is now complete! Enable your users to start using serverless for their SQL workloads.&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;Ensure your serverless warehouse(s) are properly configured with user permissions. Visit our&amp;nbsp;&lt;A href="https://docs.databricks.com/en/security/auth-authz/access-control/sql-endpoint-acl.html" target="_blank" rel="noopener nofollow noreferrer"&gt;documentation&lt;/A&gt;&amp;nbsp;for more details. Workspace users are able to use warehouses in multiple ways including:&lt;/SPAN&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;UL&gt;
&lt;LI aria-level="2"&gt;&lt;SPAN&gt;SQL Editor&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI aria-level="2"&gt;&lt;A href="https://www.youtube.com/watch?v=EWzxw-8YJas" target="_blank" rel="noopener nofollow noreferrer"&gt;&lt;SPAN&gt;Notebooks&lt;/SPAN&gt;&lt;/A&gt;&lt;/LI&gt;
&lt;LI aria-level="2"&gt;&lt;A href="https://docs.databricks.com/en/dashboards/lakeview.html" target="_blank" rel="noopener nofollow noreferrer"&gt;&lt;SPAN&gt;Lakeview dashboards&lt;/SPAN&gt;&lt;/A&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;/UL&gt;
&lt;H2 id="toc-hId-1617392330"&gt;&lt;U&gt;&lt;STRONG&gt;Additional Resources&lt;/STRONG&gt;&lt;/U&gt;&lt;/H2&gt;
&lt;H3 id="toc-hId--1986584790"&gt;&lt;SPAN&gt;Troubleshooting Steps&lt;BR /&gt;&lt;/SPAN&gt;&lt;/H3&gt;
&lt;TABLE border="1" width="100%"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="4.81622306717364%"&gt;#&lt;/TD&gt;
&lt;TD width="19.138149556400514%"&gt;&lt;STRONG&gt;Scenario&lt;/STRONG&gt;&lt;/TD&gt;
&lt;TD width="76.04562737642586%"&gt;&lt;STRONG&gt;Action Required&lt;/STRONG&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="4.81622306717364%"&gt;
&lt;P&gt;1&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="19.138149556400514%"&gt;
&lt;P&gt;&lt;SPAN&gt;If you use a Azure storage firewall&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="76.04562737642586%"&gt;
&lt;P&gt;&lt;SPAN&gt;Configure your firewall to allow access from serverless compute nodes. This will allow Azure Databricks serverless subnet to contact your Azure storage.&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;Visit our&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://learn.microsoft.com/en-us/azure/databricks/security/network/serverless-network-security/serverless-private-link" target="_blank" rel="nofollow noopener noreferrer"&gt;&lt;SPAN&gt;documentation&lt;/SPAN&gt;&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;for setup steps. Completing this will prevent unauthorized access and added security of your data while using serverless computing on Azure Databricks.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="4.81622306717364%"&gt;2&lt;/TD&gt;
&lt;TD width="19.138149556400514%"&gt;
&lt;P&gt;If you use Azure private link&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="76.04562737642586%"&gt;
&lt;P&gt;Azure private link is in gated public preview. Please reach out to &lt;A href="mailto:onboarding-help@databricks.com" target="_blank" rel="noopener"&gt;onboarding-help@databricks.com&lt;/A&gt;&amp;nbsp;or contact your Databricks account team for more information on how to enroll.&amp;nbsp;&lt;SPAN&gt;Azure Private Link support will be generally available in April 2024, please visit our &lt;A href="https://www.databricks.com/blog/announcing-general-availability-azure-private-link-and-azure-storage-firewall-support" target="_self"&gt;blog announcement&lt;/A&gt; for more information.&lt;/SPAN&gt;&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="4.81622306717364%"&gt;
&lt;P&gt;3&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="19.138149556400514%"&gt;
&lt;P&gt;If you use private connectivity for serverless compute&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="76.04562737642586%"&gt;
&lt;P&gt;Configure your NCCs in the account console and attach them to one or more workspaces. This allows Azure Databricks to create a private endpoint request to your Azure resource. Below is a example of correctly configured end point rules for serverless compute in the Azure portal.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="serverless-network-security-endpoints.png" style="width: 999px;"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/6603i8B09D31333D3566A/image-size/large?v=v2&amp;amp;px=999" role="button" title="serverless-network-security-endpoints.png" alt="serverless-network-security-endpoints.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;This is in public preview, contact&amp;nbsp;&lt;A href="mailto:onboarding-help@databricks.com" target="_blank" rel="noopener"&gt;onboarding-help@databricks.com&lt;/A&gt;&amp;nbsp;or your Databricks account team for additional help&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;H3&gt;&amp;nbsp;&lt;SPAN&gt;Customer FAQs&lt;/SPAN&gt;&lt;/H3&gt;
&lt;TABLE border="1" width="100%"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="5.0761421319796955%" height="30px"&gt;&lt;SPAN&gt;#&lt;/SPAN&gt;&lt;/TD&gt;
&lt;TD width="27.538071065989858%" height="30px"&gt;&lt;STRONG&gt;Question&lt;/STRONG&gt;&lt;/TD&gt;
&lt;TD width="67.25888324873097%" height="30px"&gt;&lt;STRONG&gt;Answer&lt;/STRONG&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="5.0761421319796955%" height="214px"&gt;
&lt;P&gt;&lt;SPAN&gt;1&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="27.538071065989858%" height="214px"&gt;
&lt;P&gt;&lt;SPAN&gt;Does SQL&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;Serverless require Unity Catalog to work?&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="67.25888324873097%" height="214px"&gt;
&lt;P&gt;&lt;SPAN&gt;No, you can start using Serverless SQL today and get started on your current Hive Metastore setup. You can transition to Unity Catalog while actively using Serverless SQL.&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;To upgrade your workspace to Unity Catalog, follow our tutorial&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://learn.microsoft.com/en-us/azure/databricks/data-governance/unity-catalog/get-started" target="_blank" rel="nofollow noopener noreferrer"&gt;&lt;SPAN&gt;documentation&lt;/SPAN&gt;&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;or contact your Databricks account team.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="5.0761421319796955%" height="132px"&gt;
&lt;P&gt;&lt;BR /&gt;3&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="27.538071065989858%" height="132px"&gt;
&lt;P&gt;&lt;SPAN&gt;Does SQL&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;Serverless support HIPAA?&lt;/SPAN&gt;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="67.25888324873097%" height="132px"&gt;
&lt;P&gt;&lt;SPAN&gt;Yes, we support the regions listed&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://learn.microsoft.com/en-us/azure/databricks/resources/supported-regions#regions-azure" target="_blank" rel="nofollow noopener noreferrer"&gt;&lt;SPAN&gt;here&lt;/SPAN&gt;&lt;/A&gt;&lt;SPAN&gt;. To prioritize a specific region for HIPPA support, contact&amp;nbsp;&lt;/SPAN&gt;&lt;A href="mailto:onboarding-help@databricks.com" target="_blank" rel="noopener nofollow noreferrer"&gt;&lt;SPAN&gt;onboarding-help@databricks.com&lt;/SPAN&gt;&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;or your Databricks account team directly.&lt;/SPAN&gt;&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="5.0761421319796955%" height="132px"&gt;
&lt;P&gt;4&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="27.538071065989858%" height="132px"&gt;&lt;SPAN&gt;Do SQL warehouses support compliance security profiles?&lt;BR /&gt;&lt;/SPAN&gt;&lt;/TD&gt;
&lt;TD width="67.25888324873097%" height="132px"&gt;
&lt;P&gt;&lt;SPAN&gt;Yes, but it varies by region. See the regions with support for compliance security profiles&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://learn.microsoft.com/en-us/azure/databricks/resources/supported-regions#regions-azure" target="_blank" rel="nofollow noopener noreferrer"&gt;&lt;SPAN&gt;here&lt;/SPAN&gt;&lt;/A&gt;&lt;SPAN&gt;. To prioritize your account’s enrollment, contact&amp;nbsp;&lt;/SPAN&gt;&lt;A href="mailto:onboarding-help@databricks.com" target="_blank" rel="noopener nofollow noreferrer"&gt;&lt;SPAN&gt;onboarding-help@databricks.com&lt;/SPAN&gt;&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;or your Databricks account team directly.&lt;/SPAN&gt;&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="5.0761421319796955%" height="132px"&gt;
&lt;P&gt;5&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="27.538071065989858%" height="132px"&gt;&lt;SPAN&gt;Will using&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;SQL warehouses affect my runtime clusters?&lt;BR /&gt;&lt;/SPAN&gt;&lt;/TD&gt;
&lt;TD width="67.25888324873097%" height="132px"&gt;
&lt;P&gt;&lt;SPAN&gt;No, using serverless warehouses affects only the workloads using Databricks SQL. Databricks Runtime clusters continue to work with notebooks and jobs. Databricks Runtime clusters always run in the classic compute plane in your Azure account.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="5.0761421319796955%" height="144px"&gt;
&lt;P&gt;6&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="27.538071065989858%" height="144px"&gt;&lt;SPAN&gt;How can I migrate to SQL warehouses if I provision my warehouses using IaC tools like Terraform?&lt;BR /&gt;&lt;/SPAN&gt;&lt;/TD&gt;
&lt;TD width="67.25888324873097%" height="144px"&gt;
&lt;P&gt;&lt;SPAN&gt;Upgrading to SQL Serverless is a simple code change in your IaC scripts. Contact your account team if you need additional support.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="5.0761421319796955%" height="179px"&gt;
&lt;P&gt;7&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="27.538071065989858%" height="179px"&gt;&lt;SPAN&gt;How do I find the cost of running a SQL Query against SQL&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;Serverless? I want to see the DBU usage from a specific SQL query.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/TD&gt;
&lt;TD width="67.25888324873097%" height="179px"&gt;
&lt;P&gt;&lt;SPAN&gt;This can be done using&amp;nbsp;&lt;A href="https://learn.microsoft.com/en-us/azure/databricks/administration-guide/system-tables/" target="_blank" rel="nofollow noopener noreferrer"&gt;system tables&lt;/A&gt;&amp;nbsp;on Databricks SQL. Note, this requires a Unity Catalog enabled workspace.&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;If you need to&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;upgrade your workspace to Unity Catalog, follow our&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://learn.microsoft.com/en-us/azure/databricks/data-governance/unity-catalog/get-started" target="_blank" rel="nofollow noopener noreferrer"&gt;&lt;SPAN&gt;documentation&lt;/SPAN&gt;&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;or contact your Databricks account team.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;H3 id="toc-hId--211577428"&gt;&lt;SPAN&gt;Learn More&lt;/SPAN&gt;&lt;/H3&gt;
&lt;UL&gt;
&lt;LI aria-level="2"&gt;&lt;SPAN&gt;Register for our weekly&amp;nbsp;&lt;A href="https://events.databricks.com/EV-AEB-Hands-on-Workshop-SQLandDelta" target="_blank" rel="noopener nofollow noreferrer"&gt;Hands-on Workshop: Databricks SQL and Serverless&lt;/A&gt;&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI aria-level="2"&gt;&lt;SPAN&gt;Register for&lt;/SPAN&gt;&lt;A href="https://files.training.databricks.com/static/ilt-sessions/onboarding/index.html" target="_blank" rel="noopener nofollow noreferrer"&gt;&lt;SPAN&gt;&amp;nbsp;free live onboarding training&lt;/SPAN&gt;&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;for Databricks SQL&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;SPAN&gt;Watch the&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://www.youtube.com/watch?v=I3c8PtR9OsA" target="_blank" rel="noopener nofollow noreferrer"&gt;&lt;SPAN&gt;Data + AI Summit talk&lt;/SPAN&gt;&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;on how SQL Serverless uses Machine Learning to drive best price to performance.&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI aria-level="2"&gt;&lt;SPAN&gt;If you encounter any errors or need additional help, email us at&amp;nbsp;&lt;/SPAN&gt;&lt;A href="mailto:onboarding-help@databricks.com" target="_blank" rel="noopener nofollow noreferrer"&gt;onboarding-help@databricks.com&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;for assistance. For specific questions and serverless POCs, contact your Databricks account team.&lt;/SPAN&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;/DIV&gt;</description>
      <pubDate>Mon, 11 Mar 2024 16:28:40 GMT</pubDate>
      <guid>https://community.databricks.com/t5/get-started-guides/getting-started-with-databricks-sql-serverless-on-azure/ta-p/63086</guid>
      <dc:creator>DatabricksGuide</dc:creator>
      <dc:date>2024-03-11T16:28:40Z</dc:date>
    </item>
    <item>
      <title>Getting Started with Databricks SQL Serverless on AWS</title>
      <link>https://community.databricks.com/t5/get-started-guides/getting-started-with-databricks-sql-serverless-on-aws/ta-p/62276</link>
      <description>&lt;H1&gt;Getting Started with Databricks SQL Serverless on AWS&lt;/H1&gt;
&lt;P&gt;This is an AWS admin guide for existing Databricks SQL customers interested in SQL Serverless features. This guide covers the following topics:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;&lt;A title="What is Serverless Architecture" href="#h_93497069621709158623117" target="_self"&gt;What is Serverless Architecture&lt;/A&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;A href="#h_798906690531709158650554" target="_self"&gt;Security on Serverless Architecture&lt;/A&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;A href="#h_961191342171709158632744" target="_self"&gt;Why use Databricks SQL Serverless&lt;/A&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;A href="#h_457429607651709158667876" target="_self"&gt;Serverless SQL Setup Steps (in 5 minutes)&lt;/A&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;A href="#h_773238636811709158686604" target="_self"&gt;Additional Resources (troubleshooting steps, customer FAQs)&lt;/A&gt;&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;&lt;SPAN&gt;To learn more about Databricks SQL and data warehousing on the Databricks Intelligent Data Platform,&amp;nbsp;&lt;/SPAN&gt;visit our &lt;A href="https://www.databricks.com/product/databricks-sql" target="_blank" rel="noopener"&gt;website&lt;/A&gt;.&lt;/P&gt;
&lt;H2 id="h_93497069621709158623117"&gt;&lt;U&gt;&lt;STRONG&gt;What is Serverless Architecture?&lt;/STRONG&gt;&lt;/U&gt;&lt;/H2&gt;
&lt;P&gt;&lt;SPAN&gt;Serverless is an architectural design where the compute layer and its associated resources are managed in the Databricks account rather than your AWS account. That means your resource and infrastructure management shifts to Databricks.&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;A serverless architecture is advantageous in the following ways:&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI style="font-weight: 400;" aria-level="1"&gt;&lt;STRONG&gt;Productivity:&lt;/STRONG&gt;&amp;nbsp;&lt;SPAN&gt;cloud resources are efficiently managed by Databricks, eliminating management overhead and providing instant compute that boosts user productivity.&lt;/SPAN&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;UL&gt;
&lt;LI style="font-weight: 400;" aria-level="1"&gt;&lt;STRONG&gt;Efficiency:&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;Serverless ensures near-instant start-up/scaling time while preventing underutilization. You benefit by only paying for the used compute and eliminating unnecessary idle time.&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI style="font-weight: 400;" aria-level="1"&gt;&lt;STRONG&gt;Reliability:&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;Serverless is fully managed with capacity, security, patching and upgrades managed automatically, which eliminates concerns about security policies and reliability issues such as capacity shortages or quota limitations.&lt;/SPAN&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;P class="lia-indent-padding-left-30px"&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="1.png" style="width: 519px;"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/6453i3B831A906BDD30A2/image-dimensions/519x271?v=v2" width="519" height="271" role="button" title="1.png" alt="1.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P class="lia-indent-padding-left-30px"&gt;&lt;SPAN&gt;To learn more, please visit our &lt;/SPAN&gt;&lt;A href="https://docs.databricks.com/en/serverless-compute/index.html" target="_blank" rel="noopener"&gt;&lt;SPAN&gt;documentation&lt;/SPAN&gt;&lt;/A&gt;&lt;SPAN&gt; for more details on Databricks serverless compute.&lt;/SPAN&gt;&lt;/P&gt;
&lt;H2 id="h_798906690531709158650554"&gt;&lt;U&gt;Security on Serverless Architecture&lt;/U&gt;&lt;/H2&gt;
&lt;P&gt;&lt;SPAN&gt;To safeguard customer data, serverless workloads run within multiple isolation layers. These security layers form the foundation of Databricks’ commitment to providing a secure and reliable environment for even the most sensitive workloads. They include but are not limited to:&lt;/SPAN&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;SPAN&gt;Dedicated compute resources&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI style="font-weight: 400;" aria-level="1"&gt;&lt;SPAN&gt;Network segmentation&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI style="font-weight: 400;" aria-level="1"&gt;&lt;SPAN&gt;Encryption at rest and in transit&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI style="font-weight: 400;" aria-level="1"&gt;&lt;SPAN&gt;Principle of least privilege&lt;/SPAN&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;P class="lia-indent-padding-left-30px"&gt;&lt;SPAN&gt;To learn more about security with serverless compute, visit our &lt;A href="https://www.databricks.com/trust/security-features/serverless-security" target="_blank" rel="noopener"&gt;website.&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;H2 id="h_961191342171709158632744"&gt;&lt;U&gt;&lt;STRONG&gt;Why use Databricks SQL Serverless?&lt;/STRONG&gt;&lt;/U&gt;&lt;/H2&gt;
&lt;P&gt;&lt;SPAN&gt;Databricks SQL is best with Serverless. Here are three main benefits of Serverless over Pro and Classic warehouses:&lt;/SPAN&gt;&lt;/P&gt;
&lt;OL&gt;
&lt;LI style="font-weight: 400;" aria-level="1"&gt;&lt;STRONG&gt;Instant and elastic compute: &lt;/STRONG&gt;&lt;SPAN&gt;Serverless removes the need to wait for infrastructure resources to run queries or over provision resources to handle spikes in usage. Serverless warehouses dynamically handle scaling using intelligent workload management.&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI style="font-weight: 400;" aria-level="1"&gt;&lt;STRONG&gt;Zero Management: &lt;/STRONG&gt;&lt;SPAN&gt;Serverless warehouses are fully managed by Databricks, eliminating the burden of capacity management, patching, upgrading and performance optimization. This leads to a simple and predictable pricing model compared to Pro or Classic.&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI style="font-weight: 400;" aria-level="1"&gt;&lt;STRONG style="color: #1b3139; font-family: inherit;"&gt;Lower TCO:&lt;/STRONG&gt;&lt;SPAN&gt; Serverless warehouses automatically provision and scale resources right when you need them. This avoids over-provisioning and reduces idle time, which can help reduce your TCO (Total Cost of Ownership).&lt;/SPAN&gt;&lt;/LI&gt;
&lt;/OL&gt;
&lt;P class="lia-indent-padding-left-30px"&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2.png" style="width: 530px;"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/6454iE6A1648E4FB5CAC3/image-dimensions/530x269?v=v2" width="530" height="269" role="button" title="2.png" alt="2.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P class="lia-indent-padding-left-30px"&gt;&lt;SPAN&gt;To learn more about Serverless advantages or specific projected cost-savings scenarios from migrating Classic/Pro warehouses to Serverless, visit our &lt;A href="https://www.databricks.com/product/pricing/databricks-sql" target="_blank" rel="noopener"&gt;pricing page&lt;/A&gt;. For more help, contact &lt;/SPAN&gt;&lt;A href="mailto:onboarding-help@databricks.com" target="_blank" rel="noopener"&gt;&lt;SPAN&gt;onboarding-help@databricks.com&lt;/SPAN&gt;&lt;/A&gt;&lt;SPAN&gt; or your Databricks account team directly.&lt;/SPAN&gt;&lt;/P&gt;
&lt;H2 id="h_457429607651709158667876"&gt;&lt;U&gt;&lt;STRONG&gt;SQL Serverless Setup Steps [5 minute guide]:&lt;/STRONG&gt;&lt;/U&gt;&lt;/H2&gt;
&lt;H3&gt;&lt;SPAN&gt;Step 0: Check the required prerequisites&lt;/SPAN&gt;&lt;/H3&gt;
&lt;P&gt;&lt;SPAN&gt;This section of the guide assumes you have the following:&lt;/SPAN&gt;&lt;/P&gt;
&lt;OL&gt;
&lt;LI style="font-weight: 400;" aria-level="1"&gt;&lt;SPAN&gt;Workspace admin permissions on your Databricks account and intended workspace.&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI style="font-weight: 400;" aria-level="1"&gt;&lt;SPAN&gt;Permissions access to your AWS account.&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI style="font-weight: 400;" aria-level="1"&gt;&lt;SPAN&gt;Non-free trial Databricks account. If you are interested in SQLServerless on a free trial, contact &lt;/SPAN&gt;&lt;A href="mailto:onboarding-help@databricks.com" target="_blank" rel="noopener"&gt;&lt;SPAN&gt;onboarding-help@databricks.com&lt;/SPAN&gt;&lt;/A&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI style="font-weight: 400;" aria-level="1"&gt;Premium or enterprise account subscription. This can be verified in your &lt;A style="font-family: inherit; background-color: #ffffff;" href="https://accounts.cloud.databricks.com/settings/subscription-billing/subscription-plan-select" target="_blank" rel="noopener"&gt;Databricks account console&lt;/A&gt;&lt;SPAN&gt;. Below is an example Databricks account on the correct premium plan.&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;If you are on standard, upgrade to premium or contact &lt;/SPAN&gt;&lt;A href="mailto:onboarding-help@databricks.com" target="_blank" rel="noopener"&gt;&lt;SPAN&gt;onboarding-help@databricks.com&lt;/SPAN&gt;&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;for help.&lt;/SPAN&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="3.premiumaccount.gif" style="width: 498px;"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/6455i5345E5B1F8DD8390/image-dimensions/498x307?v=v2" width="498" height="307" role="button" title="3.premiumaccount.gif" alt="3.premiumaccount.gif" /&gt;&lt;/span&gt;&lt;/LI&gt;
&lt;LI style="font-weight: 400;" aria-level="1"&gt;Intended workspace is in a &lt;A style="font-family: inherit; background-color: #ffffff;" href="https://docs.databricks.com/en/resources/supported-regions.html#regions-aws" target="_blank" rel="noopener"&gt;supported region&lt;/A&gt;&lt;SPAN&gt; for Serverless warehouses.&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI style="font-weight: 400;" aria-level="1"&gt;Intended workspace does not use an &lt;A style="font-family: inherit; background-color: #ffffff;" href="https://docs.databricks.com/en/archive/external-metastores/external-hive-metastore.html" target="_blank" rel="noopener"&gt;external Apache Hive metastore&lt;/A&gt;&lt;SPAN&gt;. SQL&amp;nbsp;Serverless does not support this today, and we require upgrading to &lt;/SPAN&gt;&lt;A style="font-family: inherit; background-color: #ffffff;" href="https://docs.databricks.com/en/data-governance/unity-catalog/index.html" target="_blank" rel="noopener"&gt;Unity Catalog&lt;/A&gt;&lt;SPAN&gt;. For help, contact your Databricks account team or &lt;/SPAN&gt;&lt;A style="font-family: inherit; background-color: #ffffff;" href="mailto:onboarding-help@databricks.com" target="_blank" rel="noopener"&gt;onboarding-help@databricks.com.&lt;/A&gt;&lt;/LI&gt;
&lt;/OL&gt;
&lt;H3&gt;&lt;SPAN&gt;Step 1: Activate Serverless&lt;/SPAN&gt;&lt;/H3&gt;
&lt;P&gt;&lt;SPAN&gt;Serverless is automatically enabled by default in Databricks SQL if your account was created recently. If your account was created prior to 6/24/2022, check the troubleshooting steps in the Appendix for the manual activation steps to enable serverless.&amp;nbsp;This includes manually accepting your ToS and configuring your AWS instance profile.&lt;/SPAN&gt;&lt;/P&gt;
&lt;H3&gt;&lt;SPAN&gt;Step 2: Create a serverless warehouse and grant permissions&lt;/SPAN&gt;&lt;/H3&gt;
&lt;P&gt;&lt;SPAN&gt;Log into your &lt;/SPAN&gt;&lt;A href="http://cloud.databricks.com" target="_blank" rel="noopener"&gt;&lt;SPAN&gt;workspace&lt;/SPAN&gt;&lt;/A&gt;&lt;SPAN&gt; and click on &lt;/SPAN&gt;&lt;STRONG&gt;SQL Warehouses&lt;/STRONG&gt;&lt;SPAN&gt; on the left sidebar. &lt;/SPAN&gt;&lt;SPAN&gt;Use this &lt;/SPAN&gt;&lt;A href="https://app.getreprise.com/launch/3yAojBn/" target="_blank" rel="noopener"&gt;&lt;SPAN&gt;guided tour&lt;/SPAN&gt;&lt;/A&gt;&lt;SPAN&gt; for a step by step walkthrough in a demo workspace. &lt;/SPAN&gt;&lt;SPAN&gt;Alternatively,&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;visit our &lt;/SPAN&gt;&lt;A href="https://docs.databricks.com/en/compute/sql-warehouse/create-sql-warehouse.html#create-a-sql-warehouse" target="_blank" rel="noopener"&gt;&lt;SPAN&gt;documentation&lt;/SPAN&gt;&lt;/A&gt;&lt;SPAN&gt; for setup instructions.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="lia-indent-padding-left-30px"&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="DatabricksGuide_0-1709152829941.gif" style="width: 496px;"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/6458i1303E12F9CE759F5/image-dimensions/496x309?v=v2" width="496" height="309" role="button" title="DatabricksGuide_0-1709152829941.gif" alt="DatabricksGuide_0-1709152829941.gif" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;H3&gt;&lt;SPAN&gt;Step 3: Convert all existing Pro and Classic Warehouses to Serverless&lt;/SPAN&gt;&lt;/H3&gt;
&lt;P&gt;&lt;SPAN&gt;Log into your &lt;A href="http://cloud.databricks.com" target="_blank" rel="noopener"&gt;workspace&lt;/A&gt; and click on &lt;STRONG&gt;SQL Warehouses&lt;/STRONG&gt; on the left sidebar. Follow two step instructions&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;in our &lt;/SPAN&gt;&lt;A href="https://docs.databricks.com/en/compute/sql-warehouse/create-sql-warehouse.html#upgrade-a-pro-or-classic-sql-warehouse-to-serverless" target="_blank" rel="noopener"&gt;&lt;SPAN&gt;documentation.&lt;/SPAN&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P class="lia-indent-padding-left-30px"&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="5.convertserverlesswh.gif" style="width: 522px;"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/6464i447ED6DCB52CE86E/image-dimensions/522x309?v=v2" width="522" height="309" role="button" title="5.convertserverlesswh.gif" alt="5.convertserverlesswh.gif" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;H3&gt;&lt;SPAN&gt;Step 4: Enable your users on serverless&lt;/SPAN&gt;&lt;/H3&gt;
&lt;P&gt;&lt;SPAN&gt;Your serverless setup on AWS is now complete! Enable your users to start using serverless for their SQL workloads.&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;Ensure your serverless warehouse(s) are properly configured with user permissions. Visit our &lt;A href="https://docs.databricks.com/en/security/auth-authz/access-control/sql-endpoint-acl.html" target="_blank" rel="noopener"&gt;documentation&lt;/A&gt;&amp;nbsp;for more details. Workspace users are able to use warehouses in multiple ways including:&lt;/SPAN&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;UL&gt;
&lt;LI style="font-weight: 400;" aria-level="2"&gt;&lt;SPAN&gt;SQL Editor&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI style="font-weight: 400;" aria-level="2"&gt;&lt;A href="https://www.youtube.com/watch?v=EWzxw-8YJas" target="_blank" rel="noopener"&gt;&lt;SPAN&gt;Notebooks&lt;/SPAN&gt;&lt;/A&gt;&lt;/LI&gt;
&lt;LI style="font-weight: 400;" aria-level="2"&gt;&lt;A href="https://docs.databricks.com/en/dashboards/lakeview.html" target="_blank" rel="noopener"&gt;&lt;SPAN&gt;Lakeview dashboards&lt;/SPAN&gt;&lt;/A&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;/UL&gt;
&lt;H2 id="h_773238636811709158686604"&gt;&lt;U&gt;&lt;STRONG&gt;Additional Resources&lt;/STRONG&gt;&lt;/U&gt;&lt;/H2&gt;
&lt;H3&gt;&lt;SPAN&gt;Troubleshooting Steps&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/H3&gt;
&lt;TABLE border="1" width="100%"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="2.1150592216582105%"&gt;&lt;STRONG&gt;#&lt;/STRONG&gt;&lt;/TD&gt;
&lt;TD width="24.196277495769873%"&gt;&lt;STRONG&gt;Scenario&lt;/STRONG&gt;&lt;/TD&gt;
&lt;TD width="73.68866328257192%"&gt;&lt;STRONG&gt;Action Required&lt;/STRONG&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="2.1150592216582105%"&gt;
&lt;P&gt;1&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="24.196277495769873%"&gt;
&lt;P&gt;&lt;SPAN&gt;If your Databricks account was created &lt;/SPAN&gt;&lt;STRONG&gt;&lt;I&gt;before&lt;/I&gt;&lt;/STRONG&gt; &lt;SPAN&gt;3/28/2022&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="73.68866328257192%"&gt;
&lt;P&gt;&lt;SPAN&gt;Verify that you have manually accepted the updated terms of use for serverless compute.&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;Visit our &lt;/SPAN&gt;&lt;A href="https://docs.databricks.com/en/compute/sql-warehouse/serverless.html#enable-serverless-compute-in-your-account" target="_blank" rel="noopener"&gt;&lt;SPAN&gt;documentation&lt;/SPAN&gt;&lt;/A&gt;&lt;SPAN&gt; for setup steps. Below is an example of a account that is correctly enabled for Serverless compute.&lt;/SPAN&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="6.png" style="width: 566px;"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/6461iDF1FCAC243301F32/image-dimensions/566x229?v=v2" width="566" height="229" role="button" title="6.png" alt="6.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="2.1150592216582105%"&gt;
&lt;P&gt;2&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="24.196277495769873%"&gt;
&lt;P&gt;&lt;SPAN&gt;If your Databricks account was created &lt;/SPAN&gt;&lt;STRONG&gt;&lt;I&gt;before&lt;/I&gt;&lt;/STRONG&gt; &lt;SPAN&gt;6/24/2022&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="73.68866328257192%"&gt;
&lt;P&gt;&lt;SPAN&gt;Validate &lt;/SPAN&gt;&lt;SPAN&gt;that your AWS instance profile supports Serverless SQL warehouses. This is required because Databricks is an external IAM role.&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;If your AWS instance profile was created after this date, it most likely has the trust relationship statement created already using AWS quickstart or manually.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;1. Follow our &lt;/SPAN&gt;&lt;A href="https://docs.databricks.com/en/compute/sql-warehouse/data-access-configuration.html#confirm-or-set-up-an-aws-instance-profile-to-use-with-your-serverless-sql-warehouses" target="_blank" rel="noopener"&gt;&lt;SPAN&gt;documentation&lt;/SPAN&gt;&lt;/A&gt;&lt;SPAN&gt; for the setup steps to update the trust relationship statement to support serverless SQL warehouses. &lt;/SPAN&gt;&lt;SPAN&gt;Below is an example of a correctly &lt;/SPAN&gt;&lt;A href="https://console.aws.amazon.com/iam/home#/roles" target="_blank" rel="noopener"&gt;&lt;SPAN&gt;updated IAM role in the AWS console&lt;/SPAN&gt;&lt;/A&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="7.png" style="width: 513px;"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/6462iEE9B1C5339B3C664/image-dimensions/513x82?v=v2" width="513" height="82" role="button" title="7.png" alt="7.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;2. If your role ARN and Instance Profile ARNs do not match, first follow the required steps as listed in the documentation &lt;/SPAN&gt;&lt;A style="font-family: inherit; background-color: #ffffff;" href="https://docs.databricks.com/en/compute/sql-warehouse/data-access-configuration.html#aws-instance-profile-setup" target="_blank" rel="noopener"&gt;here&lt;/A&gt;&lt;SPAN&gt; to update your role ARN.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;H3&gt;&lt;SPAN&gt;Customer FAQs&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/H3&gt;
&lt;TABLE border="1" width="100%"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="5.0761421319796955%" height="30px"&gt;&lt;SPAN&gt;#&lt;/SPAN&gt;&lt;/TD&gt;
&lt;TD width="27.538071065989858%" height="30px"&gt;&lt;STRONG&gt;Question&lt;/STRONG&gt;&lt;/TD&gt;
&lt;TD width="67.25888324873097%" height="30px"&gt;&lt;STRONG&gt;Answer&lt;/STRONG&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="5.0761421319796955%" height="214px"&gt;
&lt;P&gt;&lt;SPAN&gt;1&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="27.538071065989858%" height="214px"&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;SPAN&gt;Does SQL&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN&gt;Serverless require Unity Catalog to work?&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="67.25888324873097%" height="214px"&gt;
&lt;P&gt;&lt;SPAN&gt;No, you can start using Serverless SQL today and get started on your current Hive Metastore setup. You can transition to Unity Catalog while actively using Serverless SQL.&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;To upgrade your workspace to Unity Catalog, follow our tutorial &lt;/SPAN&gt;&lt;A href="https://docs.databricks.com/en/data-governance/unity-catalog/get-started.html#step-5-create-new-catalogs-and-schemas" target="_blank" rel="noopener"&gt;&lt;SPAN&gt;documentation&lt;/SPAN&gt;&lt;/A&gt;&lt;SPAN&gt; or contact your Databricks account team.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="5.0761421319796955%" height="112px"&gt;2&lt;/TD&gt;
&lt;TD width="27.538071065989858%" height="112px"&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;SPAN&gt;Does SQL&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN&gt;Serverless support AWS Glue?&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="67.25888324873097%" height="112px"&gt;&lt;SPAN&gt;Yes, AWS Glue can be used as the workspace legacy metastore if you already have Glue set up for your SQL workloads. No additional configuration is needed.&lt;/SPAN&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="5.0761421319796955%" height="132px"&gt;
&lt;P&gt;&lt;BR /&gt;3&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="27.538071065989858%" height="132px"&gt;
&lt;P&gt;&lt;SPAN&gt;Does SQL&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;Serverless support HIPAA?&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="67.25888324873097%" height="132px"&gt;
&lt;P&gt;&lt;SPAN&gt;Yes, we support the regions listed &lt;/SPAN&gt;&lt;A href="https://docs.databricks.com/en/resources/supported-regions.html#regions-aws" target="_blank" rel="noopener"&gt;&lt;SPAN&gt;here&lt;/SPAN&gt;&lt;/A&gt;&lt;SPAN&gt;. To prioritize a specific region for HIPPA support, contact &lt;/SPAN&gt;&lt;A href="mailto:onboarding-help@databricks.com" target="_blank" rel="noopener"&gt;&lt;SPAN&gt;onboarding-help@databricks.com&lt;/SPAN&gt;&lt;/A&gt;&lt;SPAN&gt; or your Databricks account team directly.&lt;/SPAN&gt;&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="5.0761421319796955%" height="132px"&gt;
&lt;P&gt;4&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="27.538071065989858%" height="132px"&gt;&lt;SPAN&gt;Do SQL warehouses support compliance security profiles?&lt;BR /&gt;&lt;/SPAN&gt;&lt;/TD&gt;
&lt;TD width="67.25888324873097%" height="132px"&gt;
&lt;P&gt;&lt;SPAN&gt;Yes, but it varies by region. See the regions with support for compliance security profiles &lt;/SPAN&gt;&lt;A href="https://docs.databricks.com/en/resources/supported-regions.html#regions-aws" target="_blank" rel="noopener"&gt;&lt;SPAN&gt;here&lt;/SPAN&gt;&lt;/A&gt;&lt;SPAN&gt;. To prioritize your account’s enrollment, contact &lt;/SPAN&gt;&lt;A href="mailto:onboarding-help@databricks.com" target="_blank" rel="noopener"&gt;&lt;SPAN&gt;onboarding-help@databricks.com&lt;/SPAN&gt;&lt;/A&gt;&lt;SPAN&gt; or your Databricks account team directly.&lt;/SPAN&gt;&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="5.0761421319796955%" height="132px"&gt;
&lt;P&gt;5&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="27.538071065989858%" height="132px"&gt;&lt;SPAN&gt;&lt;SPAN&gt;Will using&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN&gt;SQL warehouses affect my runtime clusters?&lt;BR /&gt;&lt;/SPAN&gt;&lt;/TD&gt;
&lt;TD width="67.25888324873097%" height="132px"&gt;
&lt;P&gt;&lt;SPAN&gt;No, using serverless warehouses affects only the workloads using Databricks SQL. Databricks Runtime clusters continue to work with notebooks and jobs. Databricks Runtime clusters always run in the classic compute plane in your AWS account.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="5.0761421319796955%" height="145px"&gt;
&lt;P&gt;6&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="27.538071065989858%" height="145px"&gt;&lt;SPAN&gt;How can I migrate to SQL warehouses if I provision my warehouses using IaC tools like Terraform?&lt;BR /&gt;&lt;/SPAN&gt;&lt;/TD&gt;
&lt;TD width="67.25888324873097%" height="145px"&gt;
&lt;P&gt;&lt;SPAN&gt;Upgrading to SQL Serverless is a simple code change in your IaC scripts. Contact your account team if you need additional support.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="5.0761421319796955%" height="180px"&gt;
&lt;P&gt;7&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="27.538071065989858%" height="180px"&gt;&lt;SPAN&gt;&lt;SPAN&gt;How do I find the cost of running a SQL Query against SQL&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN&gt;Serverless? I want to see the DBU usage from a specific SQL query.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/TD&gt;
&lt;TD width="67.25888324873097%" height="180px"&gt;
&lt;P&gt;&lt;SPAN&gt;This can be done using &lt;A href="https://docs.databricks.com/en/administration-guide/system-tables/index.html" target="_blank" rel="noopener"&gt;system tables&lt;/A&gt; on Databricks SQL. Note, this requires a Unity Catalog enabled workspace.&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;If you need to&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;upgrade your workspace to Unity Catalog, follow our&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://docs.databricks.com/en/data-governance/unity-catalog/get-started.html#step-5-create-new-catalogs-and-schemas" target="_blank" rel="noopener"&gt;&lt;SPAN&gt;documentation&lt;/SPAN&gt;&lt;/A&gt;&lt;SPAN&gt; or contact your Databricks account team.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;H3&gt;&lt;SPAN&gt;Learn More&lt;/SPAN&gt;&lt;/H3&gt;
&lt;UL&gt;
&lt;LI style="font-weight: 400;" aria-level="2"&gt;&lt;SPAN&gt;Register for our weekly&amp;nbsp;&lt;A href="https://events.databricks.com/EV-AEB-Hands-on-Workshop-SQLandDelta" target="_blank" rel="noopener"&gt;Hands-on Workshop: Databricks SQL and Serverless&lt;/A&gt;&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI style="font-weight: 400;" aria-level="2"&gt;&lt;SPAN&gt;Register for&lt;/SPAN&gt;&lt;A href="https://files.training.databricks.com/static/ilt-sessions/onboarding/index.html" target="_blank" rel="noopener"&gt;&lt;SPAN&gt; free live onboarding training&lt;/SPAN&gt;&lt;/A&gt;&lt;SPAN&gt; for Databricks SQL&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;SPAN&gt;Watch the &lt;/SPAN&gt;&lt;A href="https://www.youtube.com/watch?v=I3c8PtR9OsA" target="_blank" rel="noopener"&gt;&lt;SPAN&gt;Data + AI Summit talk&lt;/SPAN&gt;&lt;/A&gt;&lt;SPAN&gt; on how SQL Serverless uses Machine Learning to drive best price to performance.&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI style="font-weight: 400;" aria-level="2"&gt;&lt;SPAN&gt;If you encounter any errors or need additional help, email us at &lt;/SPAN&gt;&lt;A style="font-family: inherit; background-color: #ffffff;" href="mailto:onboarding-help@databricks.com" target="_blank" rel="noopener"&gt;onboarding-help@databricks.com&lt;/A&gt;&lt;SPAN&gt; for assistance. For specific questions and serverless POCs, contact your Databricks account team.&lt;/SPAN&gt;&lt;/LI&gt;
&lt;/UL&gt;</description>
      <pubDate>Sat, 09 Mar 2024 16:53:09 GMT</pubDate>
      <guid>https://community.databricks.com/t5/get-started-guides/getting-started-with-databricks-sql-serverless-on-aws/ta-p/62276</guid>
      <dc:creator>DatabricksGuide</dc:creator>
      <dc:date>2024-03-09T16:53:09Z</dc:date>
    </item>
  </channel>
</rss>

