df_write_relationship
Create, replace, or update star-schema relationships in DataForge. Define foreign key (fact table) and primary key (dimension group) to link data across compatible connections.
Instructions
WRITES TO DATAFORGE. Create, replace or update a star-schema relationship. foreign_key (fact table side) and primary_key (dimension group side) must name the same connection - a join cannot span two databases.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | create = POST a new entity; replace = PUT, which resets every optional field not supplied; update = PATCH, which changes only supplied fields. | create |
| project_id | Yes | DataForge project id | |
| version_id | Yes | Project version id | |
| foreign_key | No | Physical location of the data. Supplying `connection` switches the API to strict validation of db/schema/table/column against that connection's cached schema. | |
| primary_key | No | Physical location of the data. Supplying `connection` switches the API to strict validation of db/schema/table/column against that connection's cached schema. | |
| idempotency_key | No | Optional UUID v4. Reusing a key within 24 hours replays the original response instead of applying the change twice. One is generated automatically when omitted. | |
| relationship_id | No | ||
| relationship_type | No | ||
| source_fact_table_id | No | ||
| target_dimension_group_id | No |