From 9dc299e3d78643c021d5b6b8733c1a1c27cfe97f Mon Sep 17 00:00:00 2001 From: Jack Sandom Date: Mon, 11 May 2026 08:36:23 +0100 Subject: [PATCH] fix(skill/databricks-genie): use jq for cross-workspace catalog remap MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sed -i '' is BSD/macOS-only — the empty-string argument is required by BSD sed but rejected by GNU sed on Linux. Replace with jq, which is portable, already used throughout the skill, and operates on JSON values directly. L3 audit (stf audit) on this branch vs origin/experimental: both score 0.85 / 1.0 with all 10 dimensions PASS — no regression. Co-authored-by: Isaac --- databricks-skills/databricks-genie/SKILL.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/databricks-skills/databricks-genie/SKILL.md b/databricks-skills/databricks-genie/SKILL.md index 381d7c11..42df31b0 100644 --- a/databricks-skills/databricks-genie/SKILL.md +++ b/databricks-skills/databricks-genie/SKILL.md @@ -169,10 +169,12 @@ Top-level keys are `version`, `config`, `data_sources`, `instructions`. Every it ## Cross-Workspace Migration -When migrating between workspaces, catalog names often differ. Export the space, remap with `sed`, then import: +When migrating between workspaces, catalog names often differ. Export the space, remap, then import. Use `jq` to rewrite identifiers — it's portable across macOS/Linux (unlike `sed -i`, whose in-place flag differs between BSD and GNU) and operates on JSON values directly: ```bash -sed -i '' 's/source_catalog/target_catalog/g' genie_space.json +jq --arg src source_catalog --arg dst target_catalog \ + '(.. | strings) |= gsub($src; $dst)' genie_space.json \ + > genie_space.tmp && mv genie_space.tmp genie_space.json ``` Use `DATABRICKS_CONFIG_PROFILE=profile_name` to target different workspaces.