-
Notifications
You must be signed in to change notification settings - Fork 4
Realistic Value Generation
Great Generator supports two modes:
generate_domain("banking", realism="placeholder")
generate_domain("banking", realism="realistic")placeholder mode keeps simple deterministic values for debugging. realistic mode produces demo-ready values.
- realistic names
- emails derived from names
- phone numbers
- street addresses
- cities, states, and postal codes
- company names
- merchant names
- product names
- provider and facility names
- account types
- transaction types
- order statuses
- claim statuses
- domain-specific reference values
Great Generator keeps related descriptive fields consistent:
customer_name: Emily Carter
email: emily.carter247@example.com
It avoids mismatches such as:
customer_name: Emily Carter
email: john.smith@example.com
generate_from_schema(...) is semantic-field based, not just Faker-based. It normalizes names, expands abbreviations, checks data types, and then chooses a generator.
from great_generator import generate_from_schema
schema = {
"customer_id": "string",
"cust_nm": "string",
"emp_age": "int",
"txn_amt": "double",
"created_ts": "timestamp",
"updated_at": "timestamp",
}
df = generate_from_schema(schema, rows=100, realism="realistic")Examples of semantic aliases:
| User field | Interpreted as |
|---|---|
cust_nm |
customer name |
emp_name |
employee name |
mbr_id |
member identifier |
txn_amt |
transaction amount |
created_ts |
created timestamp |
dob |
date of birth |
Realistic mode now aims to produce clean data by default:
- ages stay in realistic ranges
-
date_of_birthaligns with age when both fields exist - created, updated, order, payment, and transaction dates are not future dates by default
-
updated_atfollowscreated_at -
end_datefollowsstart_date -
delivery_datefollowsorder_datewhen delivery exists - IDs are unique and are not treated like normal integers
- totals use quantity, unit price, discount, and tax when those fields exist
- status fields influence dates, such as no
payment_datefor pending payments
If users accidentally pass realism="realsitic", Great Generator treats it as realism="realistic" and emits a warning.
from great_generator import validate_generated_data
result = validate_generated_data(df, schema)
print(result["passed"])
print(result["summary"])You can also ask generation to return a validation report:
df, report = generate_from_schema(
schema,
rows=100,
validate=True,
return_report=True,
)from great_generator import explain_generation_plan
plan = explain_generation_plan(schema)
print(plan["semantic_coverage"])
print(plan["fields"])The plan explains each field's semantic type, confidence, reason, and generator.
Faker is used internally where helpful, especially in pandas mode. Great Generator is not just a Faker wrapper: it adds domain packs, relationships, CDC, anomalies, scale profiles, pandas/Spark engines, and export behavior.
data1 = generate_domain("banking", realism="realistic", seed=42)
data2 = generate_domain("banking", realism="realistic", seed=42)
assert data1["customers"].equals(data2["customers"])