tb mock¶
Generates sample data in /fixtures. The command accepts a data source name as an argument and can be used against Tinybird Local and Tinybird Cloud. For example: tb --cloud mock events
Use the --prompt flag to add more context to the data that is generated. For example: tb mock user_actions --prompt "Create mock data for 23 users from the US".
To use the fixture data in your project, use tb test. See tb test for more information.
Options¶
| Option | Description |
|---|---|
| --rows INTEGER | Number of rows to generate. |
| --prompt TEXT | Extra context to use for data generation. |
The tb mock command saves the SQL query used to generate the data inside the /fixtures directory. You can edit the SQL query file to generate different data.
Environment support¶
| Environment | Supported | Description |
|---|---|---|
--local | ✓ Yes (default) | Generates mock data from local data sources. |
--cloud | ✓ Yes | Generates mock data from Tinybird Cloud data sources. |
--branch=BRANCH_NAME | ✓ Yes | Generates mock data from branch data sources. |