Warehouse Tables (old)

❗️

Page Deprecated

Please navigate to the new page at new page at: https://docs.benchling.com/docs/warehouse-tables-v2

Objects from the main Benchling database are periodically synced to the warehouse to make them available for queries. It may take time (usually a few seconds, sometimes a few minutes) for data to appear in the warehouse.

Tables exposed in the warehouse are shown in the image below. Because of its size, it's best to download it and open it separately, where you can zoom in and see the part you'd like. In some cases, we have a table per user-defined schema in Benchling. In these cases, an (Example) is added to the table's name. The tables you see in your Benchling warehouse would be named after the schemas you have configured.

All of the tables in the below image are Postgres views, backed by a table of the same name followed by $raw. Generally speaking, the views are "cleaned up" versions of the raw data (archived items are hidden, etc). We recommend trying to stick with the cleaned up views when possible, but you can query the $raw tables if needed.

7448

The following standard Benchling tables are synced:

authorA table with all entry authors
batchA table with all batches
boxA table with all boxes
containerA table with all containers
container_contentA table with all associations between containers and entities/batches, along with the concentration of each sample in each container
container_transferA table with all container transfers
entryA table with all entries
entry_auditorA table with all entry review auditors
fieldA table with all fields for schematized objects
folderA table with all folders
locationA table with all locations
plateA table with all plates
projectA table with all projects
registry_entityA table with all entities that are in the registry. This includes sequences, proteins, and custom entities. The metadata (fields) of entities are stored in the separate field table
request_sampleA table with all samples in requests
request_fulfillmentA table with all executions of requests/tasks into entries/workflows
request_assigneeA table with all request assignees
stage_runA table with all stage runs of workflows
userA table with all users
teamA table with all teams
team_memberA table with all associations between users and teams
workflowA table with all workflows
workflow_templateA table with all workflow templates
workflow_template_versionA table with all versions of each workflow template
schemaA table with all schemas
field_definitionA table with all field definitions
assay_result_schemaA table with all result schemas
assay_run_schemaA table with all run schemas
batch_schemaA table with all batch schemas
box_schemaA table with all box schemas
container_schemaA table with all container schemas
entity_schemaA table with all entity schemas
location_schemaA table with all location schemas
plate_schemaA table with all plate schemas
request_schemaA table with all request schemas

Requests, request tasks, runs, and results are synced to their own tables. The name of the table is derived from the schema name. For example, a run schema called Flow Cytometry Run will have a table called flow_cytometry_run. The table columns are based on the fields of the schema.

Fields

You can query for fields on entities by joining the registry_entity and field tables. For example, to show all resistance field values, you might query:

SELECT
registry_entity.id, registry_entity.name, field.field_name AS field_name, field.value
FROM registry_entity
JOIN field ON registry_entity.id = field.registry_entity_id
JOIN schema_field ON field.schema_field_id = schema_field.id
WHERE field.field_name = 'Resistance';

      id      |   name    | field_name | value
--------------+-----------+------------+--------
 seq_diETgMr3 | backBN001 | Resistance | AmpR
 seq_vFYFPvDQ | backBn002 | Resistance | Kan
 seq_6RUIueD4 | backBN003 | Resistance | AmpR
(3 rows)

You can also query for all fields attached to a single entity:

SELECT
registry_entity.id, registry_entity.name, schema_field.name AS field_name, field.value
FROM registry_entity
JOIN field ON registry_entity.id = field.registry_entity_id
JOIN schema_field ON field.schema_field_id = schema_field.id
WHERE registry_entity.id = 'bfi_YdzRyDA6';


      id      |   name   |  field_name   |    value
--------------+----------+---------------+-------------
 bfi_YdzRyDA6 | AMAT1132 | Transgene     | bfi_q11Mnlbg
 bfi_YdzRyDA6 | AMAT1132 | Analytes      | Acetic acid
 (2 rows)

Each row in the field table represents the value of one schematized object's field, for example the value of the "Resistance" field of seq_diETgMr3 in the table above is a single row in this table.

The field table has the following columns:

ColumnTypeDescription
schema_idstringThe ID of the schema that this object belongs to
field_definition_idstringThe ID of the field that this value is for
field_namestringThe name of the field that this value is for
batch_idstringThe ID of the batch this field-value belongs to
box_idstringThe ID of the box this field-value belongs to
container_idstringThe ID of the container this field-value belongs to
entry_idstringThe ID of the entry this field-value belongs to
location_idstringThe ID of the location this field-value belongs to
plate_idstringThe ID of the plate this field-value belongs to
registry_entity_idstringThe ID of the registry entity this field-value belongs to
request_idstringThe ID of the request this field-value belongs to
request_task_idstringThe ID of the request task this field-value belongs to
result_idstringThe ID of the result this field-value belongs to
run_idstringThe ID of the run this field-value belongs to
display_valuestringThe text representation of this field-value.
blob_valuejsonIf the field type is blob-link, the blob value as JSON {id, name}
bool_valueboolIf the field type is boolean, the boolean value
float_valuefloatIf the field type is float, the float value
date_valuestringIf the field type is date, the value of the field in YYYY-MM-DD format.
datetime_valuestringIf the field type is datetime, the value of the field in ISO 8601 format.
integer_valueintegerIf the field type is integer, the integer value
json_valuejsonIf the field type is JSON, the JSON value
linked_batch_idstringIf the field type is batch-link, the ID of the batch this value links to
linked_box_idstringIf the field type is box-link, the ID of the box this value links to
linked_container_idstringIf the field type is container-link, the ID of the container this value links to
linked_entry_idstringIf the field type is entry-link, the ID of the registry entry this value links to
linked_location_idstringIf the field type is location-link, the ID of the location this value links to
linked_plate_idstringIf the field type is plate-link, the ID of the plate this value links to
linked_registry_entity_idstringIf the field type is entity-link, the ID of the registry entity this value links to
linked_result_idstringIf the field type is result-link, the ID of the result this value links to
linked_run_idstringIf the field type is run-link, the ID of the run this value links to
value_indexintegerIf the field is multi-link, the value is the index within that list of items (this table has one row per item in that list). If the field is not multi-link, the value is 0.

Registered Entities

Currently, only registered entities are synced. This may change in the future.