This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Databricks notebook source | |
| # MAGIC %md | |
| # MAGIC # From two messages to long-term memory | |
| # MAGIC Run with Python 3.10+ and `databricks-agentbricks==0.5.0` installed. | |
| # MAGIC Uses paid Lakebase storage, one serverless pipeline run, and model calls. | |
| # MAGIC Creates dedicated stores and removes them after the run reaches a terminal state. | |
| # COMMAND ---------- | |
| import json | |
| import os |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| SELECT | |
| current_timestamp() AS tested_at, | |
| current_version().dbr_version AS dbr_version, | |
| current_version().dbsql_version AS dbsql_version; | |
| -- COMMAND ---------- | |
| -- Remove the :response.answers.team.choice::STRING suffix to inspect | |
| -- the full result, including error_message, if a label is NULL. | |
| SELECT |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| -- Databricks notebook source | |
| CREATE SCHEMA IF NOT EXISTS demo.metric_views; | |
| USE demo.metric_views; | |
| -- Regions | |
| CREATE OR REPLACE TABLE regions (region_id INT, region_name STRING); | |
| INSERT INTO regions | |
| VALUES (1, 'EMEA'), (2, 'AMER'), (3, 'APAC'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # pylint: disable=missing-module-docstring, missing-function-docstring | |
| import argparse | |
| import json | |
| import os | |
| import shutil | |
| TEMP_DIR = "temp" | |
| def _reset_temp_dir(): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # pylint: disable=missing-module-docstring, missing-function-docstring | |
| import argparse | |
| import json | |
| import re | |
| # Function to generate Mermaid diagram from Azure pipeline JSON | |
| def san_id(name): | |
| return re.sub(r'\W+', '_', name) |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python3 | |
| import argparse | |
| import time | |
| from datetime import timedelta | |
| import cluedin | |
| def main(context_file: str, query_string: str) -> None: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "protocol": "http", | |
| "domain": "cluedin.local:8888", | |
| "org_name": "foobar", | |
| "user_email": "admin@foobar.com", | |
| "user_password": "Password23!" | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Install Microsoft Fabric extension | |
| az extension add --name microsoft-fabric --allow-preview true | |
| # List Fabric capacities | |
| az fabric capacity list --output table | |
| # Example output: | |
| # Location Name ProvisioningState ResourceGroup State | |
| # ----------- ---------------- ------------------- --------------- ------- | |
| # West Europe capacity81e0bf39 Succeeded fabric Active |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # pylint: disable=missing-module-docstring missing-function-docstring fixme | |
| import datetime | |
| import json | |
| import cluedin | |
| from hierarchy_utils import (convert_tree_to_values, create_hierarchy, | |
| save_hierarchy) | |
NewerOlder