cancel
Showing results for 
Search instead for 
Did you mean: 
Genie Hub
Explore technical articles, practical guides, best practices, and real-world use cases to help you get the most out of Databricks Genie. Learn from the Databricks team, MVPs, and community experts.
cancel
Showing results for 
Search instead for 
Did you mean: 

Local Python Data Analysis, Lakeflow Pipeline Debugging & CI/CD Rules in Genie Code CLI (v0.5.1 GA)

Saurabh2310
Databricks Employee
Databricks Employee

Local Python Data Analysis, Lakeflow Pipeline Debugging & CI/CD Rules in Genie Code CLI (v0.5.1 GA)

Updated November 29, 2026, for Databricks Genie Code CLI (GA, v0.5.1).

Complete terminal guide: Moving My Data Engineering Workflow to the Terminal with Genie Code CLI (GA)

How do I use Genie Code CLI for local data analysis without opening the Databricks UI?

Short answer: Launch genie inside a trusted local folder with your OAuth Databricks CLI profile active and ask natural-language questions about Unity Catalog tables or local files. It invokes databricks genie, built-in Databricks skills, and managed MCP servers under your Unity Catalog permissions—if DATABRICKS_MCP_TOKEN expires with HTTP 401, exit genie, refresh the variable, and restart.

export DATABRICKS_MCP_TOKEN="$(databricks auth token --profile DEFAULT | jq -r .access_token)"
genie

How do I use Genie Code CLI for local Python data analysis without opening the UI?

Short answer: Sign in with databricks auth login, run genie in your project directory, and ask it to profile Unity Catalog datasets or local Parquet/CSV exports using pandas, Polars, or DuckDB. Each invocation starts a fresh conversation, and for repeatable headless checks in shell scripts, redirect stdin from /dev/null.

genie "Profile ./data/orders.parquet for null customer_id and negative totals" < /dev/null

How do I use Genie Code to debug a failing pipeline and propose fixes?

Short answer: Run genie inside your local Lakeflow pipeline or Declarative Automation Bundles (DABs) repository, where bundled Databricks pipeline skills inspect run logs, schema mismatches, and expectation failures. Prompt Genie Code CLI to diagnose the failing task, patch the code, and validate locally via databricks bundle validate before redeploying.

databricks bundle validate -t dev

Can I run Genie Code CLI in CI with a service principal?

Short answer: No. Genie Code CLI (v0.5.1 GA) supports only interactive OAuth user-to-machine (U2M) authentication via databricks auth login and does not support OAuth machine-to-machine (M2M), PATs, or SSH tunnels. For automated CI/CD pipelines, run Declarative Automation Bundles (databricks bundle validate and deploy) authenticated with a service principal.

databricks bundle validate -t prod
databricks bundle deploy -t prod

How do I build automated data pipelines with Genie Code?

Short answer: Launch genie inside a local Declarative Automation Bundles (DABs) repository to scaffold Lakeflow Declarative Pipelines and workflows using bundled Databricks pipeline skills (~/.genie/skills/.system/), then validate and deploy via databricks bundle validate and databricks bundle deploy.

databricks bundle validate -t dev
databricks bundle deploy -t dev

GitHub Copilot suggests repository-wide context. How does Genie Code understand my Databricks workspace for better suggestions?

Short answer: Genie Code CLI pairs local Git repository context (AGENTS.md and .agents/skills/) with live Unity Catalog table/column metadata, your active OAuth U2M Databricks CLI profile, bundled Databricks skills (~/.genie/skills/.system/), and managed Databricks MCP servers (including Genie) governed by your Unity Catalog permissions.

databricks auth env
genie doctor --summary

 

0 REPLIES 0