# CircleCI schema ERD

Table and field reference for the Fivetran CircleCI connector.

## Table & Field Reference

### project

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| user_slug | String | FK |
| name | String |  |
| organization_id | String |  |
| organization_name | String |  |
| organization_slug | String |  |
| slug | String |  |
| vcs_info_default_branch | String |  |
| vcs_info_provider | String |  |
| vcs_info_vcs_url | String |  |

### project_branch

| Column | Type | Keys |
| --- | --- | --- |
| branch_name | String | PK |
| project_id | String | PK, FK |

### workflow_recent_run

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| project_id | String | FK |
| workflow_id | String | FK |
| branch | String |  |
| created_at | Instant |  |
| credits_used | Double |  |
| duration | Double |  |
| status | String |  |
| stopped_at | Instant |  |

### user_collaboration

| Column | Type | Keys |
| --- | --- | --- |
| slug | String | PK |
| avatar_url | String |  |
| id | String |  |
| name | String |  |
| vcs_type | String |  |

### workflow_job_dependency

| Column | Type | Keys |
| --- | --- | --- |
| dependency | String | PK |
| job_id | String | PK, FK |

### workflow_job

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| project_id | String | FK |
| workflow_id | String | FK |
| approval_request_id | String |  |
| approved_by | String |  |
| canceled_by | String |  |
| job_number | String |  |
| name | String |  |
| project_slug | String |  |
| started_at | Instant |  |
| status | String |  |
| stopped_at | Instant |  |
| type | String |  |

### context

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| user_slug | String | FK |
| created_at | Instant |  |
| name | String |  |

### flaky_test

| Column | Type | Keys |
| --- | --- | --- |
| _fivetran_id | String | PK |
| project_id | String | FK |
| workflow_id | Unknown | FK |
| classname | String |  |
| file | String |  |
| job_name | String |  |
| job_number | Double |  |
| pipeline_number | Double |  |
| source | String |  |
| test_name | String |  |
| time_wasted | Int |  |
| times_flaked | Int |  |
| workflow_created_at | Instant |  |
| workflow_name | String |  |

### pipeline_error

| Column | Type | Keys |
| --- | --- | --- |
| _fivetran_id | String | PK |
| pipeline_id | String | FK |
| message | String |  |
| type | String |  |

### pipeline

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| project_id | String | FK |
| created_at | Instant |  |
| number | Double |  |
| project_slug | String |  |
| state | String |  |
| trigger_actor_avatar_url | String |  |
| trigger_actor_login | String |  |
| trigger_received_at | Instant |  |
| trigger_type | String |  |
| updated_at | Instant |  |
| vcs_branch | String |  |
| vcs_commit_body | String |  |
| vcs_commit_subject | String |  |
| vcs_origin_repository_url | String |  |
| vcs_provider_name | String |  |
| vcs_review_id | String |  |
| vcs_review_url | String |  |
| vcs_revision | String |  |
| vcs_tags | String |  |
| vcs_target_repository_url | String |  |
| trigger_parameters_** |  |  |

### schedule_day_of_month

| Column | Type | Keys |
| --- | --- | --- |
| date | Int | PK |
| schedule_id | String | PK, FK |

### schedule_month

| Column | Type | Keys |
| --- | --- | --- |
| month | String | PK |
| schedule_id | String | PK, FK |

### schedule_hour_of_day

| Column | Type | Keys |
| --- | --- | --- |
| hour | Int | PK |
| schedule_id | String | PK, FK |

### schedule_day_of_week

| Column | Type | Keys |
| --- | --- | --- |
| day | String | PK |
| schedule_id | String | PK, FK |

### schedule

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| project_id | String | FK |
| actor_id | String |  |
| actor_login | String |  |
| actor_name | String |  |
| created_at | Instant |  |
| description | String |  |
| name | String |  |
| parameters_branch | String |  |
| parameters_deploy_prod | Boolean |  |
| project_slug | String |  |
| timetable_per_hour | Int |  |
| updated_at | Instant |  |

### job_parallel_run

| Column | Type | Keys |
| --- | --- | --- |
| _fivetran_id | String | PK |
| job_number | String | FK |
| project_id | String | FK |
| index | Double |  |
| status | String |  |

### job_message

| Column | Type | Keys |
| --- | --- | --- |
| _fivetran_id | String | PK |
| job_number | String | FK |
| project_id | String | FK |
| message | String |  |
| reason | String |  |
| type | String |  |

### job_context

| Column | Type | Keys |
| --- | --- | --- |
| name | String | PK |
| job_number | String | FK |
| project_id | String | FK |

### job

| Column | Type | Keys |
| --- | --- | --- |
| number | String | PK |
| project_id | String | PK, FK |
| latest_workflow_name | String | FK |
| pipeline_id | String | FK |
| created_at | Instant |  |
| duration | Double |  |
| executor_resource_class | String |  |
| executor_type | String |  |
| name | String |  |
| organization_name | String |  |
| parallelism | String |  |
| queued_at | Instant |  |
| started_at | Instant |  |
| status | String |  |
| stopped_at | Instant |  |
| web_url | String |  |

### job_artifact

| Column | Type | Keys |
| --- | --- | --- |
| _fivetran_id | String | PK |
| job_number | String | FK |
| project_id | String | FK |
| node_index | Double |  |
| path | String |  |
| url | String |  |

### workflow

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| pipeline_id | String | FK |
| project_id | String | FK |
| canceled_by | String |  |
| created_at | Instant |  |
| errored_by | String |  |
| name | String |  |
| project_slug | String |  |
| started_by | String |  |
| status | String |  |
| stopped_at | Instant |  |
| tags | String |  |

## Relationships

- project(user_slug) → user_collaboration(slug)
- project_branch(project_id) → project(id)
- workflow_recent_run(project_id) → project(id)
- workflow_recent_run(workflow_id) → workflow(id)
- workflow_job_dependency(job_id) → workflow_job(id)
- workflow_job(workflow_id) → workflow(id)
- workflow_job(project_id) → project(id)
- context(user_slug) → user_collaboration(slug)
- flaky_test(project_id) → project(id)
- flaky_test(workflow_id) → workflow(id)
- pipeline_error(pipeline_id) → pipeline(id)
- pipeline(project_id) → project(id)
- schedule_day_of_month(schedule_id) → schedule(id)
- schedule_month(schedule_id) → schedule(id)
- schedule_hour_of_day(schedule_id) → schedule(id)
- schedule_day_of_week(schedule_id) → schedule(id)
- schedule(project_id) → project(id)
- job_parallel_run(job_number) → job(number)
- job_parallel_run(project_id) → project(id)
- job_message(job_number) → job(number)
- job_message(project_id) → project(id)
- job_context(job_number) → job(number)
- job_context(project_id) → project(id)
- job(pipeline_id) → pipeline(id)
- job(latest_workflow_name) → workflow(id)
- job(project_id) → project(id)
- job_artifact(job_number) → job(number)
- job_artifact(project_id) → project(id)
- workflow(pipeline_id) → pipeline(id)
- workflow(project_id) → project(id)
