# Buildkite schema ERD

Table and field reference for the Fivetran Buildkite connector.

## Table & Field Reference

### annotation

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| build_id | String | PK, FK |
| body_html | String |  |
| context | String |  |
| created_at | Instant |  |
| style | String |  |
| updated_at | Instant |  |

### users

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| organization_id | String | FK |
| avatar_url | String |  |
| created_at | Instant |  |
| email | String |  |
| graph_id | String |  |
| is_bot | Boolean |  |
| name | String |  |
| role | String |  |
| sso_mode | String |  |

### artifact

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| build_id | String | PK, FK |
| build_job_id | String | FK |
| dirname | String |  |
| download_url | String |  |
| file_size | Long |  |
| filename | String |  |
| mime_type | String |  |
| path | String |  |
| sha_1_sum | String |  |
| state | String |  |
| url | String |  |

### pipeline_tag

| Column | Type | Keys |
| --- | --- | --- |
| name | String | PK |
| pipeline_id | String | PK, FK |

### pipeline_step_agent_query_rule

| Column | Type | Keys |
| --- | --- | --- |
| pipeline_step_index | Long | PK |
| rule | String | PK |
| pipeline_id | String | PK, FK |

### pipeline_step

| Column | Type | Keys |
| --- | --- | --- |
| pipeline_id | String | PK, FK |
| artifact_paths | String |  |
| branch_configuration | String |  |
| command | String |  |
| concurrency | String |  |
| env | Json |  |
| index | Long |  |
| name | String |  |
| parallelism | String |  |
| timeout_in_minutes | String |  |
| type | String |  |

### pipeline

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| created_by_id | String | FK |
| organization_id | String | FK |
| allow_rebuilds | Boolean |  |
| archived_at | String |  |
| branch_configuration | String |  |
| builds_url | String |  |
| cancel_running_branch_builds | Boolean |  |
| cancel_running_branch_builds_filter | String |  |
| created_at | Instant |  |
| default_branch | String |  |
| env | Json |  |
| name | String |  |
| provider | Json |  |
| qraphql_id | String |  |
| repository | String |  |
| running_builds_count | Int |  |
| running_jobs_count | Int |  |
| scheduled_builds_count | Int |  |
| scheduled_jobs_count | Int |  |
| skip_queued_branch_builds | Boolean |  |
| skip_queued_branch_builds_filter | String |  |
| slug | String |  |
| url | String |  |
| visibility | String |  |
| waiting_jobs_count | Int |  |
| web_url | String |  |

### agent_metadata

| Column | Type | Keys |
| --- | --- | --- |
| name | String | PK |
| agent_id | String | PK, FK |

### agent

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| creator_id | String | FK |
| organization_id | String | FK |
| connection_state | String |  |
| created_at | Instant |  |
| hostname | String |  |
| ip_address | String |  |
| last_job_finished_at | Instant |  |
| name | String |  |
| priority | String |  |
| url | String |  |
| user_agent | String |  |
| version | String |  |
| web_url | String |  |

### build_job_agent_query_rule

| Column | Type | Keys |
| --- | --- | --- |
| rule | String | PK |
| build_job_id | String | PK, FK |

### build_job

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| build_id | String | PK, FK |
| agent_id | String | FK |
| organization_id | String | FK |
| retried_in_job_id | Unknown | FK |
| unblocked_by_id | String | FK |
| artifact_paths | String |  |
| artifacts_url | String |  |
| build_url | String |  |
| command | String |  |
| created_at | Instant |  |
| exit_status | Long |  |
| expired_at | Instant |  |
| finished_at | Instant |  |
| graphql_id | String |  |
| log_url | String |  |
| matrix | String |  |
| name | String |  |
| parallel_group_index | Int |  |
| parallel_group_total | Int |  |
| priority | Int |  |
| raw_log_url | String |  |
| retried | Boolean |  |
| retried_by | String |  |
| retries_count | Int |  |
| retry_source_job_id | String |  |
| retry_source_type | String |  |
| retry_type | String |  |
| runnable_at | Instant |  |
| scheduled_at | Instant |  |
| soft_failed | Boolean |  |
| started_at | Instant |  |
| state | String |  |
| step_id | String |  |
| step_key | String |  |
| step_signature_algorithm | String |  |
| step_signature_signed_fields | Json |  |
| step_signature_value | String |  |
| type | String |  |
| unblock_url | String |  |
| unblockable | Boolean |  |
| unblocked_at | Instant |  |
| web_url | String |  |

### build

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| creator_id | String | FK |
| organization_id | String | FK |
| pipeline_id | String | FK |
| rebuilt_from_id | String | FK |
| blocked | Boolean |  |
| blocked_state | String |  |
| branch | String |  |
| commit | String |  |
| created_at | Instant |  |
| env | Json |  |
| finished_at | Instant |  |
| github_author_email | String |  |
| github_author_name | String |  |
| github_author_username | String |  |
| graphql_id | String |  |
| message | String |  |
| meta_data | Json |  |
| number | Long |  |
| pipeline_slug | String |  |
| pr_number | String |  |
| pr_repo | String |  |
| scheduled_at | Instant |  |
| source | String |  |
| started_at | Instant |  |
| state | String |  |
| tag | String |  |
| url | String |  |
| web_url | String |  |

### organization

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| agents_url | String |  |
| created_at | Instant |  |
| emojis_url | String |  |
| graph_id | String |  |
| name | String |  |
| pipelines_url | String |  |
| slug | String |  |
| url | String |  |
| web_url | String |  |

## Relationships

- annotation(build_id) → build(id)
- users(organization_id) → organization(id)
- artifact(build_job_id) → build_job(id)
- artifact(build_id) → build(id)
- pipeline_tag(pipeline_id) → pipeline(id)
- pipeline_step_agent_query_rule(pipeline_id) → pipeline(id)
- pipeline_step(pipeline_id) → pipeline(id)
- pipeline(created_by_id) → users(id)
- pipeline(organization_id) → organization(id)
- agent_metadata(agent_id) → agent(id)
- agent(creator_id) → users(id)
- agent(organization_id) → organization(id)
- build_job_agent_query_rule(build_job_id) → build_job(id)
- build_job(unblocked_by_id) → users(id)
- build_job(retried_in_job_id) → build(id)
- build_job(agent_id) → agent(id)
- build_job(build_id) → build(id)
- build_job(organization_id) → organization(id)
- build(pipeline_id) → pipeline(id)
- build(rebuilt_from_id) → build(id)
- build(creator_id) → users(id)
- build(organization_id) → organization(id)
