> For the complete documentation index, see [llms.txt](https://docs.datapancake.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.datapancake.com/guides/how-to-guides-ui/pipeline-designer/how-to-configure-foreign-keys.md).

# How to Configure Foreign Keys

### Scroll to the Array Foreign Keys section in the Pipeline Designer

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-11-27/c5da86cc-5813-4554-8296-056466ae9275/ascreenshot.jpeg?tl_px=0,207\&br_px=1447,1016\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=483,277)

### Select an attribute to create foreign key(s)

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-11-27/b2bbddc3-df27-40b1-9c96-290ee0999c95/ascreenshot.jpeg?tl_px=0,0\&br_px=1447,809\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=494,258)

### Enter a parent attribute name

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-11-27/3cfb20e5-3ae7-42dd-904a-df2176a4cddb/ascreenshot.jpeg?tl_px=0,238\&br_px=1447,1048\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=470,321)

### (Optional) Enter a foreign key column alias

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-11-27/bf27746a-c3cc-4c04-82f0-543a4c0e4fad/ascreenshot.jpeg?tl_px=0,86\&br_px=1447,895\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=585,277)

### (Optional) Add the foreign key to the row access policy

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-11-27/b1744086-cc2e-4654-88e2-e2cb8a770698/ascreenshot.jpeg?tl_px=0,95\&br_px=1447,904\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=881,277)

### Save the foreign key(s)

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-11-27/4d275e45-64d7-4979-90c2-daa448ef846c/ascreenshot.jpeg?tl_px=0,238\&br_px=1447,1048\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=374,426)

### Extra Steps for the JSON Tutorial

If you are following the JSON Tutorial, create the following foreign keys. It may help to use the [bulk update feature for foreign keys](/guides/how-to-guides-bulk-upsert-via-csv/usage/array-foreign-key-bulk-update.md).

<table><thead><tr><th width="391.5999755859375">ARRAY_NAME</th><th width="454">PARENT_ATTRIBUTE_NAME</th></tr></thead><tbody><tr><td>batch_labels_array_primitive</td><td>plant_code_work_order_id_pk</td></tr><tr><td>batch_tags_pipe_array_primitive</td><td>plant_code_work_order_id_pk</td></tr><tr><td>measurement_metric_value_array_primitive</td><td>plant_code_work_order_id_pk</td></tr><tr><td>operation_logs_array_object</td><td>plant_code_work_order_id_pk</td></tr><tr><td>process_steps_array_object</td><td>plant_code_work_order_id_pk</td></tr><tr><td>product_specifications_array_primitive</td><td>plant_code_work_order_id_pk</td></tr><tr><td>quality_notes_array_primitive</td><td>plant_code_work_order_id_pk</td></tr><tr><td>shipments_array_object</td><td>plant_code_work_order_id_pk</td></tr><tr><td>special_tags_pipe_array_primitive</td><td>plant_code_work_order_id_pk</td></tr><tr><td>suppliers_array_object</td><td>plant_code_work_order_id_pk</td></tr><tr><td>flags_array_primitive</td><td>plant_code_work_order_id_pk</td></tr><tr><td>nested_array_primitive</td><td>plant_code_work_order_id_pk</td></tr><tr><td>text_array_primitive</td><td>plant_code_work_order_id_pk</td></tr><tr><td>equipment_array_object</td><td>process_step_id_str</td></tr><tr><td>items_array_primitive</td><td>shipment_id_str</td></tr><tr><td>batch_labels_array_primitive</td><td>plant_code_work_order_id_pk</td></tr><tr><td>measurement_metric_value_array_primitive</td><td>plant_code_work_order_id_pk</td></tr><tr><td>product_specifications_array_primitive</td><td>plant_code_work_order_id_pk</td></tr><tr><td>quality_notes_array_primitive</td><td>plant_code_work_order_id_pk</td></tr><tr><td>flags_array_primitive</td><td>plant_code_work_order_id_pk</td></tr><tr><td>text_array_primitive</td><td>plant_code_work_order_id_pk</td></tr><tr><td>instruments_array_object</td><td>equipment_id_str</td></tr><tr><td>configuration_notes_array_primitive</td><td>equipment_id_str</td></tr><tr><td>calibration_config_array_primitive</td><td>instrument_id_str</td></tr><tr><td>measurements_array_object</td><td>instrument_id_str</td></tr><tr><td>qc_results_array_object</td><td>measurement_id_str</td></tr><tr><td>defect_codes_array_primitive</td><td>qc_id_str</td></tr><tr><td>details_array_primitive</td><td>qc_id_str</td></tr></tbody></table>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.datapancake.com/guides/how-to-guides-ui/pipeline-designer/how-to-configure-foreign-keys.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
