constant
LogicOutput the same fixed value for every record. Useful for setting a default status, source field, or any column that should have identical values across all rows.
Example Outputs
active1.0truedefaultParameters
| Parameter | Description |
|---|---|
| value | The constant value to output (any type) |
API Usage
Send a POST request to generate constant data:
curl -X POST https://mockhero.dev/api/v1/generate \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"tables": [
{
"name": "example",
"count": 5,
"fields": [
{
"name": "constant",
"type": "constant",
"params": {
"value": "active"
}
}
]
}
]
}'Common Use Cases
- Default status fields
- Fixed source columns
- Batch markers
- Static configuration values
Quick Info
- Field Type
- constant
- Category
- Logic
- Parameters
- 1 parameter
- Output Format
- JSON, CSV, SQL
Generate Constant + 155 more types via API
One API call. Multiple tables. Relational integrity. Free tier included.