Skip to content

Instantly share code, notes, and snippets.

@pauldougan
Created February 6, 2018 22:21
Show Gist options
  • Save pauldougan/bdb378ce73ec89f46d3142a34ef4f28c to your computer and use it in GitHub Desktop.
Save pauldougan/bdb378ce73ec89f46d3142a34ef4f28c to your computer and use it in GitHub Desktop.
makefake.py
#!/usr/bin/python
from faker import Faker
RECORD_COUNT=1000000
fields = ["id", "job_id", "job_row_number", "service_id", "services", "template_id", "templates_history", "template_version", "templates_history", "api_key_id", "api_keys", "key_type", "key_types", "notification_type", "created_at", "sent_at", "sent_by", "updated_at", "reference", "billable_units", "client_reference", "international", "phone_prefix", "rate_multiplier", "notification_status", "notification_status_types", "created_by_id", "users"]
fake = Faker()
print fields
for _ in range(RECORD_COUNT):
print [fake.uuid4(), fake.uuid4(), 001, fake.uuid4(), fake.uuid4(), 001, fake.uuid4(), 'ABCDEFG', 'enum', fake.iso8601(tzinfo=None, end_datetime=None), fake.iso8601(tzinfo=None, end_datetime=None), 'SENDER', fake.iso8601(tzinfo=None, end_datetime=None), 'REF', 001, 'CLIENTINFO', False, "+44", 3, 'STATUS', fake.uuid4()]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment