Actions run — conclusion, workflow; do not load log bulk.
One workflow run (id)
Load
team
Team
Org team — membership and repo permissions join.
One team (slug @ org)
Optional
Most important fields to load early — not a full schema dump.
Entity
Field
Role
Why
Repository
Repository.id
Key
Repo join (numeric id)
Repository
Repository.full_name
Dimension
owner/name — repo dim
Repository
Repository.private
Dimension
Visibility private/public
Repository
Repository.default_branch
Dimension
Default branch
Repository
Repository.pushed_at
Measure
Last push activity
User
User.id
Key
User join
User
User.login
Dimension
GitHub handle / author dim
User
User.email
PII
Email if exposed / PII
Organization
Organization.id
Key
Org join
Organization
Organization.login
Dimension
Org slug / org dim
PullRequest
PullRequest.id
Key
PR node/id
PullRequest
PullRequest.number
Key
PR number @ repo
PullRequest
PullRequest.state
Dimension
open / closed
PullRequest
PullRequest.merged_at
Measure
Merge timestamp
PullRequest
PullRequest.created_at
Measure
Opened timestamp
PullRequest
PullRequest.additions
Measure
LOC additions (meta)
PullRequest
PullRequest.deletions
Measure
LOC deletions (meta)
PullRequest
PullRequest.user.login
Dimension
Author
Issue
Issue.id
Key
Issue join
Issue
Issue.number
Key
Issue number @ repo
Issue
Issue.state
Dimension
open / closed
Issue
Issue.created_at
Measure
Opened timestamp
CommitMeta
CommitMeta.sha
Key
Commit SHA
CommitMeta
CommitMeta.author.email
PII
Commit author email / PII
CommitMeta
CommitMeta.author.login
Dimension
Author handle
CommitMeta
CommitMeta.stats.additions
Measure
Commit additions (meta)
WorkflowRun
WorkflowRun.id
Key
Run join
WorkflowRun
WorkflowRun.name
Dimension
Workflow name
WorkflowRun
WorkflowRun.conclusion
Dimension
success / failure / cancelled
WorkflowRun
WorkflowRun.status
Dimension
queued / in_progress / completed
WorkflowRun
WorkflowRun.created_at
Measure
Run start
Team
Team.id
Key
Team join
Team
Team.slug
Dimension
Team slug
Team
Team.organization.login
Dimension
Org back-join
System and noise objects/fields you typically should not sync into the warehouse by default.
Skip tables / objects
Table
Category
Why
Source blobs / file contents / patches
System
Never land code — volume, IP and secret risk.
Secret scanning secret values
System
Secret values — never store; alert status at most.
PR / issue / review comment bodies (bulk)
System
Free-text PII and potential secrets — metadata enough.
Actions logs / artifact binaries (bulk)
System
CI logs/artifacts — expensive; run metadata enough for KPIs.
Skip fields / content
Source code / patch / diff content
— Repo stays source of truth — no warehouse clone.
Secret scanning secret values
— Never store — alert counts/status only.
Author email cleartext in marts
— login/id is enough for contributor KPIs.
PR / issue body cleartext (bulk)
— PII/secrets — selectively or not at all.
Actions artifact binaries
— Cost without KPI value.
Warehouse-neutral examples for landing (RAW) and curated models — copy and adapt to your dialect. Not vendor SOQL/API DDL.
Landing (RAW)
RAW repository + PR landing
REST/GraphQL shape — no patches/source blobs; author as login/id.
-- Warehouse-neutral RAW from GitHub API extract (not API DDL clone)
CREATE TABLE raw_github_repository (
repo_id BIGINT,
node_id VARCHAR,
full_name VARCHAR,
owner_login VARCHAR,
visibility VARCHAR,
default_branch VARCHAR,
archived BOOLEAN,
created_at TIMESTAMP,
_loaded_at TIMESTAMP
);
CREATE TABLE raw_github_pull_request (
pr_id BIGINT,
repo_id BIGINT,
number INT,
state VARCHAR,
author_user_id BIGINT,
author_login VARCHAR,
created_at TIMESTAMP,
merged_at TIMESTAMP,
merge_commit_sha VARCHAR,
merged BOOLEAN,
_loaded_at TIMESTAMP
-- no body, no patch, no diff
);
RAW workflow run + user landing
Actions metadata only — no logs/artifacts; email = PII in RAW.
CREATE TABLE raw_github_workflow_run (
run_id BIGINT,
repo_id BIGINT,
workflow_name VARCHAR,
status VARCHAR,
conclusion VARCHAR,
run_started_at TIMESTAMP,
run_updated_at TIMESTAMP,
_loaded_at TIMESTAMP
-- no log/artifact binaries
);
CREATE TABLE raw_github_user (
user_id BIGINT,
login VARCHAR,
email VARCHAR, -- workforce / author PII
type VARCHAR,
_loaded_at TIMESTAMP
);
CREATE TABLE raw_github_secret_alert_meta (
alert_number INT,
repo_id BIGINT,
state VARCHAR,
secret_type VARCHAR,
created_at TIMESTAMP,
resolved_at TIMESTAMP,
_loaded_at TIMESTAMP
-- never store secret value
);
Curated
Curated fact github pull request
Delivery grain — repo required; no body/patch; cycle-time fields.
CREATE TABLE curated_fct_github_pull_request AS
SELECT
p.pr_id,
p.repo_id,
p.number,
p.state,
p.author_user_id,
p.author_login,
p.created_at,
p.merged_at,
p.merge_commit_sha,
p.merged,
CASE WHEN p.merged THEN TRUE ELSE FALSE END AS is_merged
FROM raw_github_pull_request p
WHERE p.repo_id IS NOT NULL;
Curated dim repo / workflow fact
Repo dim; workflow fact without logs; user without email.
CREATE TABLE curated_dim_github_repository AS
SELECT
repo_id,
full_name,
owner_login,
visibility,
default_branch,
archived,
created_at
FROM raw_github_repository;
CREATE TABLE curated_dim_github_user AS
SELECT
user_id,
login,
type
-- omit email from default analytics dims
FROM raw_github_user;
CREATE TABLE curated_fct_github_workflow_run AS
SELECT
r.run_id,
r.repo_id,
r.workflow_name,
r.status,
r.conclusion,
r.run_started_at,
r.run_updated_at,
CASE WHEN r.conclusion = 'success' THEN TRUE ELSE FALSE END AS is_success
FROM raw_github_workflow_run r
WHERE r.repo_id IS NOT NULL;
Curated measure SELECTs
Merged PRs, CI success rate, open secret alerts — adapt period filters.
-- Merged PRs in period
SELECT COUNT(*) AS merged_prs
FROM curated_fct_github_pull_request
WHERE is_merged = TRUE
AND merged_at BETWEEN :period_start AND :period_end;
-- CI success rate in period
SELECT
AVG(CASE WHEN is_success THEN 1.0 ELSE 0.0 END) AS ci_success_rate
FROM curated_fct_github_workflow_run
WHERE run_started_at BETWEEN :period_start AND :period_end;
-- Open secret scanning alerts (metadata only — no secret values)
SELECT COUNT(*) AS open_secret_alerts
FROM raw_github_secret_alert_meta
WHERE state = 'open'
AND repo_id IS NOT NULL;
Tools
Open related Binom-Tools workflows to adapt formulas, PII and measures for this source.