Update the table list and tenancy settings of an existing datamart. This endpoint allows you to modify which tables and columns are accessible through the datamart, as well as update multi-tenant configurations.
Destructive Operation: Updating a datamart will delete all existing table and column configurations before applying the new ones. Ensure your new configuration includes all tables and columns you need.
The datamart name identifies which datamart to update and cannot be changed through this endpoint. To rename a datamart, you’ll need to delete the old one and create a new one with the desired name.
This endpoint requires a service token in the Authorization header. Service tokens differ from data app API keys and provide organization-level permissions.To access your service token:
Go to your Databrain dashboard and open Settings.
Navigate to Settings.
Find the Service Tokens section.
Click the “Generate Token” button to generate a new service token if you don’t have one already.
Use this token as the Bearer value in your Authorization header.
Optional column name in this table that identifies the client/tenant. This column is used for multi-tenant data isolation at the table level. Must exist in the table schema.
Show Client column usage
Used for table-level tenancy when tenancyLevel is TABLE
The column should contain client/tenant identifiers
Optional label for the table to provide a human-readable display name. When provided, this label can be used in the UI instead of the technical table name for better readability.
Show Label usage
Provides a user-friendly display name for the table
Useful when table names are cryptic or technical
Does not affect the actual table reference in queries
SQL expression that defines the calculated value for a custom column. Required whenisCustomColumn is true. The expression can reference other columns from the same table.
Optional flag to indicate if this column should be treated as an aggregate column. When true, the column is marked as AGGREGATE drop type for metric calculations.
Show Aggregate column usage
Aggregate columns are used for pre-aggregated metrics
Affects how the column behaves in metric calculations and drag-drop operations
Common for SUM, COUNT, AVG type pre-calculated values
Optional array of table relationships to define how tables in the datamart are connected. Relationships enable joins between tables for more complex queries.
Replaces all existing relationships: When provided, the relationships array completely replaces all existing relationships. Include all relationships you want to keep. If omitted entirely, existing relationships remain unchanged.
Show Relationship configuration
Define how tables relate to each other (e.g., orders.customer_id → customers.id)
Supports different join types and cardinalities
Useful for creating metrics that span multiple tables
Optional - omit this field to keep existing relationships unchanged
The cardinality of the relationship. Must be one of: ManyToMany, ManyToOne, OneToMany, OneToOne.Optional: Can be omitted or set to null if not specified.