{
 "schema_version": 1,
 "generated": "2026-10-24",
 "id": "ashishsinha1602-schemagate--see-tables-hidden-from-a-caller",
 "repo": "ashishsinha1602/schemagate",
 "repo_url": "https://github.com/ashishsinha1602/schemagate",
 "repo_slug": "ashishsinha1602-schemagate",
 "title": "See which tables a caller is blocked from",
 "page_title": "How to see which tables a caller is blocked from with Schemagate",
 "summary": "Compare the same question for two callers and confirm restricted tables leave the prompt, with no database needed.",
 "who": "A developer building a text-to-SQL agent who needs proof that a restricted table never reaches the model for a given role.",
 "problem": "Schema selection often runs before identity is checked, so the model can be handed a table the caller cannot read and then returns a misleading empty answer.",
 "outcome": "You see a restricted table absent for one caller and ranked first for a caller with the right role, with no database or model key.",
 "steps": [
  "Run `pip install schemagate` to install the library.",
  "Run `schemagate demo \"salary by employee\"` and confirm hr_compensation is absent from the result.",
  "Run `schemagate demo \"salary by employee\" --principal okta:hr --role payroll` and confirm the table now appears first.",
  "Run `schemagate demo \"salary by employee\" --prompt` if you want to read the DDL the model would receive. (inferred, check the README)"
 ],
 "agent_prompt": "Install schemagate with pip, then run `schemagate demo \"salary by employee\"` and again with `--principal okta:hr --role payroll`. Report which tables appear in each result and confirm hr_compensation is absent for the first caller and present for the second.",
 "agents": [
  "any"
 ],
 "difficulty": "Beginner",
 "time": "15 minutes",
 "basis": "readme",
 "caveat": "The demo runs on the bundled 42-object sample schema, so the results show the mechanism but not how your own grants will behave until you run it against your database.",
 "category": "Data and analytics",
 "tags": [
  "Data and analytics"
 ],
 "lang": "python",
 "requirements": [
  "Python and pip installed",
  "For your own database: a reachable Postgres, Oracle, MySQL or SQL Server URL, and the matching schemagate extra",
  "Optional: a model key only if you want generated answers or AI descriptions"
 ],
 "risk": "none",
 "seen_in_the_wild": false,
 "mentioned_publicly": false,
 "risks": [],
 "best": true,
 "score": 1.0,
 "evidence": [],
 "url": "https://dedupedai.com/use-cases/ashishsinha1602-schemagate/see-tables-hidden-from-a-caller/",
 "md": "https://dedupedai.com/use-cases/ashishsinha1602-schemagate/see-tables-hidden-from-a-caller/index.md",
 "disclaimer": "Deduped lists open-source repositories that belong to other people. We do not own, maintain, audit, or vouch for any of them, and a repo appearing here is not an endorsement or a safety check. The use cases, steps, and prompts are written by AI and may be incomplete, outdated, or just wrong. Where a use case is marked \"Seen in the wild\", we link to public posts where someone described something similar, but we have not verified those posts and the use case itself is still our AI's own write-up. Use all of this at your own risk. Only run code, commands, or agents on systems and accounts you are authorized to use, and read the code and every command before you run it, especially anything that touches credentials, files, or the network. Nothing here is professional, security, legal, or financial advice. All trademarks and project names belong to their respective owners, and their use here does not imply affiliation. Content is provided as is, without warranties of any kind. Found a mistake, a safety problem, or something you want removed? Email hello@dedupedai.com and we will look at it promptly.",
 "api": "https://dedupedai.com/api/v1/usecases/ashishsinha1602-schemagate--see-tables-hidden-from-a-caller.json",
 "api_version": "v1"
}
