Skip to content
This repository was archived by the owner on Sep 18, 2025. It is now read-only.
This repository was archived by the owner on Sep 18, 2025. It is now read-only.

Feature: Add support for generating relational data #1

@bobbyiliev

Description

@bobbyiliev

An experimental JSON relational option has been added. We need to add the same for SQL and AVRO schemas.

This adds some very basic relational functionality for JSON schemas. You can specify the PK and the FK in the schema eg:

[
    {
        "_meta": {
            "topic": "mz_datagen_users",
            "key": "id"
        },
        "id": "datatype.uuid",
        "name": "internet.userName",
        "email": "internet.exampleEmail",
        "phone": "phone.imei",
        "website": "internet.domainName",
        "city": "address.city",
        "company": "company.name"
    },
    {
        "_meta": {
            "topic": "mz_datagen_posts",
            "foreignKey": "user_id",
            "key": "id"
        },
        "id": "datatype.uuid",
        "user_id": "datatype.uuid",
        "title": "lorem.sentence",
        "body": "lorem.paragraph"
    },
]

A unique ID will be generated and used for the users.id and posts.user_id

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions