---
title: Wellbore PCP
slug: wellbore-pcp
docTags: 
createdAt: 2023-03-22T19:17:25.000Z
---

The Wellbore PCP table describes progressive cavity pumps installed in the well. A PCP belongs to a tubing string — **sourceTubingId** must match an existing [Wellbore Tubing](docId\:T6SGY9Y9XNVaBpQNNqotq) record. The pump **name** must match a pump in the compute catalog to enable modeling.

The unique constraint on PCP entries is **sourceTubingId + sourceId**.

:::hint{type="warning"}
The tubing string referenced by **sourceTubingId** must be loaded before adding a PCP to it.
:::

| **Variable**         | **Data Type**   | **Unit of Measure** | **Is Nullable?** | **Default Value** | **Description**                                                                                                                                    |
| -------------------- | --------------- | ------------------- | ---------------- | ----------------- | -------------------------------------------------------------------------------------------------------------------------------------------------- |
| sourceId             | String          | -                   | No               | -                 | Unique identifier of the PCP, to enable upserts                                                                                                    |
| sourceWellId         | String          | -                   | No               | -                 | Source ID for the well. Must match the sourceId of a record in the [Well](docId\:P-xHbe4jqKJQemay7aOL5) table.                                     |
| sourceWellboreId     | String          | -                   | No               | -                 | Source ID for the wellbore. Must match the sourceId of a record in the [Wellbore](docId\:XPqwCAS8aWDaWyssmVjY6) table.                             |
| sourceTubingId       | String          | -                   | No               | -                 | Source ID of the tubing string in which the PCP is installed. Must match the sourceId of a [Wellbore Tubing](docId\:T6SGY9Y9XNVaBpQNNqotq) record. |
| name                 | String          | -                   | No               | -                 | Pump name. Must match a pump in the compute catalog.                                                                                               |
| viscosityCorrection  | Boolean         | -                   | Yes              | -                 | Whether a viscosity correction should be applied through the PCP                                                                                   |
| separationEfficiency | Double          | %                   | Yes              | -                 | Percent separation efficiency                                                                                                                      |
| runDate              | Datetime Offset | -                   | No               | -                 | Date the pump was installed. Datetime offset (with timezone) in ISO 8601 format. Example: 2022-09-27T16:28:37+0000                                 |
| pullDate             | Datetime Offset | -                   | Yes              | -                 | Date the pump was pulled. Datetime offset (with timezone) in ISO 8601 format.                                                                      |
| slipFactor           | Double          | -                   | Yes              | -                 | Slip factor override from bench test                                                                                                               |
| flowFactor           | Double          | -                   | Yes              | 1.0               | Flow factor adjustment from bench test                                                                                                             |
| headFactor           | Double          | -                   | Yes              | 1.0               | Head factor adjustment from bench test                                                                                                             |
| powerFactor          | Double          | -                   | Yes              | 1.0               | Power factor adjustment from bench test                                                                                                            |

***

# Data Integrity Checks

| **Condition**                                                                      | **Response**    |
| ---------------------------------------------------------------------------------- | --------------- |
| Any non-nullable field is NULL or empty                                            | Record Rejected |
| (sourceWellId, sourceWellboreId, sourceTubingId) does not match an existing tubing | Row Skipped     |

:::hint{type="info"}
**Partial success on bulk ingest**

Rows referencing an unknown tubing string are skipped while the remaining rows are written. The error response names each skipped row. An error response therefore does not mean nothing was written.
:::

***

# Common Error Messages

| **API**          | **Scenario**   | **Error Response**                                                                                                                    |
| ---------------- | -------------- | ------------------------------------------------------------------------------------------------------------------------------------- |
| Add / Upsert PCP | Unknown tubing | PCP with sourceId 'xxx' was skipped: tubing with sourceWellId 'xxx' and sourceWellboreId 'xxx' and sourceTubingId 'xxx' was not found |
