---
title: Wellbore Microstring
slug: wellbore-microstring
docTags: 
createdAt: 2023-03-22T19:17:16.000Z
---

Microstrings are smaller strings run inside the tubing, used for chemical or foam injection.

The unique constraint on microstring entries is **sourceWellboreId + sourceId**.

| **Variable**     | **Data Type**   | **Unit of Measure** | **Is Nullable?** | **Default Value** | **Description**                                                                                                        |
| ---------------- | --------------- | ------------------- | ---------------- | ----------------- | ---------------------------------------------------------------------------------------------------------------------- |
| sourceId         | String          | -                   | No               | -                 | Unique identifier of the microstring, 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. |
| topMd            | Double          | ft                  | Yes              | 0.0               | Top measured depth of the microstring                                                                                  |
| bottomMd         | Double          | ft                  | No               | -                 | Bottom measured depth of the microstring                                                                               |
| id               | Double          | in                  | No               | -                 | Inner diameter of the microstring                                                                                      |
| od               | Double          | in                  | No               | -                 | Outer diameter of the microstring                                                                                      |
| roughness        | Double          | in                  | Yes              | 0.0006            | Absolute roughness coefficient of the microstring material                                                             |
| runDate          | Datetime Offset | -                   | Yes              | -                 | Date the microstring was run. Datetime offset (with timezone) in ISO 8601 format. Example: 2022-09-27T16:28:37+0000    |
| pullDate         | Datetime Offset | -                   | Yes              | -                 | Date the microstring was pulled. Datetime offset (with timezone) in ISO 8601 format.                                   |

:::hint{type="info"}
**Wellbore Microstring Notes**

Microstring data is optional. Currently it is used for effective diameter in tubing pressure traverses.
:::

:::hint{type="info"}
**Top Measured Depth Notes**

If topMd is NULL, the system assumes 0 ft.
:::

:::hint{type="info"}
**Roughness Notes**

If roughness is NULL, the compute engine applies 0.0006 in its place.
:::

***

# Data Integrity Checks

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

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

Rows referencing an unknown wellbore 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 microstring | Unknown wellbore | MicroString with sourceId 'xxx' was skipped: wellbore with sourceWellId 'xxx' and sourceWellboreId 'xxx' was not found |
