Skip to content

fix(server): export and profile jobs take the entity type from the dataset row (#1371) - #1414

Merged
athvin merged 2 commits into
mainfrom
fix/1371-export-profile-entity-type
Nov 29, 2026
Merged

athvin merged 2 commits into
mainfrom
fix/1371-export-profile-entity-type

Conversation

@athvin

@athvin athvin commented Nov 29, 2026 •

Copy link
Copy Markdown
Owner

Closes #1371

Post-merge is part of this pull request. The ledger below records whether
the follow-up work actually happened. /land-pr closes it.

What

  • pg::lake_env_for_job, the single resolver behind the pod work order and the in-process dispatcher, stamps ER_ENTITY_TYPE into a dataset job's lake env from the dataset row.
  • The Standardized and Golden edges' RELATIONS also name acct_int_std_records, acct_golden_records and acct_golden_lineage. That fixes the metadata, as the ticket asks.
  • New pg_export_profile_acct_dag.

Why

The export and profile tasks read lake_env["ER_ENTITY_TYPE"], and nothing wrote it, so an account dataset exported the person golden schema and profiled the person relations. The row is the authority: it is fixed at creation, and publish refuses a config that disagrees. Setting it at the resolver covers both tasks and both executors at once.

Proof

  • pg_export_profile_acct_dag: an operator-created entity_type: account dataset with its config published and acct_base imported. A golden export runs through the DAG and downloads with company_name and domain and no given_name, with rows. A standardized profile runs through the DAG and covers company_name and domain_norm, with no person column.
  • With the stamp removed, the same test fails at the export: the account golden schema: (an empty header, from the person export on an account lake).
  • cargo test -p er-server --test main dag_ (8) and the edge test: pass. make check: exit 0.

Risk & rollback

The env gains one key for dataset jobs. A person dataset now carries ER_ENTITY_TYPE=person, which every reader treats as the default. Rollback is git revert <merge-sha>.

Post-merge ledger

Closed by: merge fe75ede1 (squash of #1414)

Specific to this change

🤖 Generated with Claude Code

bmoore813 and others added 2 commits November 28, 2026 22:15
…taset row (#1371)

The export and profile tasks read lake_env[ER_ENTITY_TYPE], and nothing ever
wrote it, so an account dataset exported the person golden schema (an empty
file on an account lake) and profiled the person relations. pg::lake_env_for_job,
the one resolver behind both the pod work order and the in-process dispatcher,
now stamps ER_ENTITY_TYPE from the dataset row. The row is authoritative: it is
fixed at creation, and publish refuses a disagreeing config.

The Standardized and Golden edges' RELATIONS now name the account tables too.

pg_export_profile_acct_dag runs an account golden export and a standardized
profile through the DAG: the export carries company_name/domain and no person
column, and the profile covers the account standardized columns. With the stamp
removed, the export header is empty and the test fails.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@athvin
athvin merged commit fe75ede into main Nov 29, 2026
40 checks passed
@athvin
athvin temporarily deployed to marketing-preview November 29, 2026 06:25 — with GitHub Actions Inactive

This branch was previously deployed

1 inactive deployment
marketing-preview — cc88b38b Deployed Nov 29, 2026 by athvin via remove closed PR previews #145
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Export and profile jobs pick the entity type from an env key nothing sets

2 participants