Query Databricks Bundle Quick Reference

Jobs, parameters, tables and grants on one page

📘

TL;DR

Everything the integration ships, in the shortest useful form. For how and why, follow the links.

Jobs

JobDoesWrites
setupCreates result tables, checks the detections contract—
run_fsql_queryRuns one FSQL statement across the meshquery_mesh_events, fsql_run_audit
run_query_workerLaunches Query Worker investigationsworker_investigations
fetch_worker_reportCollects finished reportsworker_investigations
refresh_connectorsSnapshots what is connectedquery_mesh_connectors
ask_mcp_agentAsks the mesh a plain-English questionmcp_agent_answers
load_sample_detectionsSynthetic detections, evaluation onlya table you name

Only fetch_worker_report carries a schedule, and it ships paused.

Common Commands

databricks bundle deploy --profile <profile> --var catalog=my_catalog --var schema=my_schema
databricks bundle run setup --profile <profile>
databricks bundle run run_fsql_query --profile <profile> --params fsql="QUERY detection_finding.** AFTER 1days LIMIT 25"
databricks bundle run run_query_worker --profile <profile> --params max_investigations=0
databricks bundle run fetch_worker_report --profile <profile>
databricks bundle run refresh_connectors --profile <profile>
databricks bundle run ask_mcp_agent --profile <profile> --params question="Which platforms are connected?"
./dashboard/deploy.sh <profile> <dashboard-id>
./agent/deploy_connection.sh <profile>

Key Parameters

JobParameterDefault
run_fsql_queryfsql—
run_query_workerdetection_filterseverity = 'Critical' AND status NOT IN ('Resolved', 'Suppressed')
run_query_workerworker_questionthe full brief, readable in the parameter itself
run_query_workermax_investigationsset 0 to plan without launching
ask_mcp_agentquestion—
ask_mcp_agentmodela Databricks foundation model endpoint
ask_mcp_agentfsql_timeout300

Tables

TableOne row per
query_mesh_eventsOCSF event returned by a federated search
fsql_run_auditFSQL run — statement, row count, which connectors answered
worker_investigationsQuery Worker investigation, gaining its report when collected
mcp_agent_answersQuestion asked of the mesh, with the tools the model called
query_mesh_connectorsConnector in the latest snapshot

Detections Contract

Columns
Requiredid, name, severity, status
Recommendeddescription, product_name, event_time, actor_user_name, device_hostname, src_ip
Optionalmitre_tactic, mitre_technique_uid, mitre_technique, severity_id

FSQL Patterns That Run

QUERY authentication.** AFTER 7days LIMIT 5
QUERY detection_finding.** WITH %hostname = 'somehost' AFTER 7days LIMIT 20
QUERY network_activity.** WITH %hostname = 'somehost' AFTER 6hours LIMIT 20
QUERY osint_inventory_info.** WITH %hash = '...' LIMIT 10

Entity selectors: %username %hostname %ip %hash %email %filename %processname

Always name an event class and a LIMIT. See the FSQL Cheat Sheet.

Grants

GRANT USE CATALOG ON CATALOG my_catalog TO `security-readers`;
GRANT USE SCHEMA  ON SCHEMA  my_catalog.my_schema TO `security-readers`;
GRANT SELECT      ON SCHEMA  my_catalog.my_schema TO `security-readers`;
ToAlso needs
Read the dashboardCAN READ on the dashboard; CAN USE on the warehouse
Read a full reportnotebook access; serverless compute
Ask the meshUSE_CONNECTION; EXECUTE on the MCP service; own sign-in
Ask GenieCAN RUN on the Genie space
See or run jobsCAN VIEW / CAN MANAGE RUN

Grant to an account-level group. admins is workspace-local and not a Unity Catalog principal.

Usage Notes

  • A deployed bundle shares nothing. Jobs are visible only to whoever deployed them until shared.
  • A job run costs the same on Databricks end whether a search returns 20 rows or 20,000 — batch searches rather than running one job per detection.
  • Zero rows from a federated search is the weakest result there is. Check fsql_run_audit for which connectors answered before reading it as an absence.
  • MCP authorization expires after 24 hours, or 12 hours idle — see Connecting an MCP Client. run_fsql_query has no such limit.
  • The report notebook needs serverless compute, not a SQL warehouse.

Did this page help you?