Safe AI access to a data warehouse
An AI assistant that knows the structure and numbers of the data warehouse – but can't change anything, overload production or see personal data.
On this page
The problem
To help with reports, an AI assistant needs to know where data comes from and whether the numbers add up. That used to mean sending it exports and screenshots. Direct access to a production data warehouse, however, is a risk: writes, server load, customers’ personal data.
Principles
Defence in depth
No single safeguard is enough, so there are several in a row:
- Least privilege on the server side – read-only.
- A daily permission self-check. If the account ever gained more rights than it should, the tool refuses to run.
- Every query is checked before it is sent – only reads, a single statement, no procedures or writes.
- Everything is rolled back. Each query runs in a transaction that ends by returning to the original state.
- Respect for production – limits on rows, time and lock waits so queries never slow down the nightly data loads.
The model never sees personal data
Masking happens before data leaves the tool:
- by column name,
- by column origin – even when hidden behind a view or an alias,
- by content – e-mails, phone numbers, national IDs or account numbers inside any text.
Values are replaced by stable pseudonyms, so you can still count and join – just without seeing who is who.
Auditability
Every query is logged – who, when, what and how long. The data itself is not. Passwords never pass through the AI conversation.
Outcome
The AI assistant can find the data source for a report, read a view definition or check numbers against the warehouse – without exports, without risk to production and in line with GDPR.