Every FDE project runs on the customer's data, and that data is never what the schema diagram promised. Columns are half empty, IDs do not match between systems, dates come in three formats, and the one table you need belongs to a team that has never heard of you. This lesson covers getting the right access the right way, profiling unfamiliar data quickly with SQL and pandas, the data-quality problems you will meet in almost every engagement, handling personal and sensitive data responsibly, and building the customer's trust in the numbers your software produces.
- Request least-privilege data access with a clear purpose and scope
- Profile an unfamiliar table for volume, completeness, uniqueness and freshness
- Recognise and handle the common data-quality problems in enterprise data
- Minimise, mask and protect personal data throughout a project
- Reconcile your results with the customer's own numbers to build trust
Getting access the right way
Data access is often the longest dependency in a pilot, so request it in week one, precisely. Data owners and security teams approve narrow, well-explained requests far faster than "we need access to the database".
- Purpose: what the data is for, in one sentence tied to the pilot's success criteria.
- Scope: specific tables or views and columns, date range, and whether personal data is needed (often it is not).
- Access type: read-only, ideally against a replica, a reporting view or an export, never the live transactional database for heavy queries.
- Identity: a named service account for the application and personal accounts for people, not shared credentials.
- Location and retention: where the data will be stored or processed, for how long, and how it will be deleted.
Ask the data owner to create a view with only the columns you need. It is safer for them, faster to approve, and documents the contract between their system and yours.
Profiling unfamiliar data quickly
Before building anything on a table, spend an hour profiling it. You are looking for volume, completeness, uniqueness, value ranges, freshness and surprises.
SELECT
COUNT(*) AS rows_total,
COUNT(DISTINCT claim_id) AS distinct_claims,
COUNT(*) - COUNT(policy_number) AS missing_policy,
MIN(created_at) AS first_created,
MAX(created_at) AS last_created,
MAX(updated_at) AS last_updated,
SUM(CASE WHEN amount < 0 THEN 1 ELSE 0 END) AS negative_amounts
FROM claims_view;
SELECT status, COUNT(*) AS n
FROM claims_view
GROUP BY status
ORDER BY n DESC;import pandas as pd
df = pd.read_csv("claims_sample.csv", dtype=str)
print(df.shape)
print(df.isna().mean().sort_values(ascending=False).head(10)) # share missing per column
print(df["claim_id"].duplicated().sum(), "duplicate claim ids")
print(df["status"].value_counts(dropna=False).head(10))
print(pd.to_datetime(df["created_at"], errors="coerce").isna().sum(), "unparseable dates")Reading everything as strings first (dtype=str) is deliberate: it lets you see the messy values before pandas silently converts or drops them. Write down every surprise with an example row and ask the data owner about it; their answer is often business knowledge you could not have guessed.
Data-quality problems you will meet
| Problem | Example | Typical handling |
|---|---|---|
| Missing values | 40% of claims have no policy number | Find out why; exclude, infer from another source, or flag |
| Inconsistent formats | Dates as 03/04/2026, 2026-04-03 and 4 Mar 26 | Parse explicitly with known formats; quarantine failures |
| Duplicates | Same claim exported twice after a retry | Deduplicate on a business key, keep the latest version |
| Mismatched IDs | CRM uses 'C-00123', billing uses '123' | Build and test a normalisation and mapping table |
| Stale data | Nightly export silently stopped last month | Check freshness on every run; alert when old |
| Encoding | Names garbled as mojibake | Detect and decode correctly (UTF-8 vs legacy code pages) |
Do not silently fix data. Make every rule explicit in code with a test, count the rows each rule affects, and report those counts. A pipeline that quietly drops 12% of records produces confident wrong answers; one that says "1,203 records quarantined: unparseable date" lets the customer fix the source.
Personal and sensitive data
Customer data often includes personal data (names, contact details, identifiers, health or financial information) governed by laws such as GDPR and by the customer's own policies. Treat it as radioactive: use as little as possible, for as short a time as possible, in as few places as possible.
- Minimise: if the task does not need names or account numbers, exclude the columns at the source view.
- Pseudonymise: replace identifiers with stable tokens (a keyed hash) so records can still be joined without exposing the real value.
- Mask in logs and prompts: never log raw personal data; redact before sending text to any external model unless the customer has approved it.
- Keep data where it is allowed to be: respect data-residency requirements; do not copy extracts to your laptop or personal cloud storage.
- Delete on schedule and confirm deletion in writing at the end of the engagement.
import hashlib
import hmac
import os
KEY = os.environ["PSEUDONYM_KEY"].encode() # held by the customer, rotated per project
def pseudonym(value: str) -> str:
return hmac.new(KEY, value.strip().lower().encode(), hashlib.sha256).hexdigest()[:16]
print(pseudonym("jane.doe@example.com")) # same input -> same token, not reversible without KEYTrust in the numbers
The fastest way to lose a customer is a demo where your total disagrees with the report their CFO sees every Monday. Before showing any number, reconcile it with an existing trusted figure: row counts against the source system, totals against a finance report, a sample of records checked by hand with a domain expert. When numbers differ, find out why before the meeting, not during it.
Document the lineage of every figure you show: which source, which filters, which date range, which rules. A short data contract with the owning team (expected columns, types, freshness, volumes) turns future upstream changes from silent breakages into detected failures.