How I fix it · Step 01 of 4
Ready the data
Genie writes its queries from your table names, column names and descriptions. If those are thin, it guesses. Before any agent is built, the tables it will use need to be described, tested, owned and readable by the people who will ask.
What I do
- Descriptions in code. Every table and column gets a description that lives next to the code that builds it, so it changes with the logic and is reviewed in the same merge request.
- Business rules as columns. Flags like
is_active_customerorhas_left_companyare computed once in the table, so Genie never has to reinvent the rule. - Daily tests. One row per key, no gaps, counts that match the source. A table that fails its tests is not one Genie should trust.
- Domains and certified tables. Tables are filed by business domain, and the ones that meet the bar are marked certified, so Genie and people use them first.
- Access that matches who asks. Genie runs every query as the person asking, so each team’s group gets read access to exactly the tables its agent uses, defined in Terraform.
What “certified” means
A table is certified only when all four hold:
- it is in a domain and its business owner agreed
- the table and every column have a description
- its daily tests pass
- its numbers were checked against the source or the dashboard they feed
Access as code
Permissions in the Databricks UI drift. I define access in code instead: a group, the tables it may read, and a review on every change. Schema and catalog access follow automatically, and a grant made by hand is removed at the next deploy, by design.
The result is an access model you can read in one file, and a clear answer to “why can this team see that table?”.
Lesson learned
A grant made by hand is a grant you will lose
Permissions set by hand in a user interface either disappear at the next infrastructure change, breaking whatever relied on them, or linger long after anyone remembers why they exist. Defining access in code is the only way to know who can see what, and why. If it is not in code, it does not exist.
You get: the tables for one team described, tested and certified where they qualify, domains set up, and access for that team defined in code.