Skip to content

Commit

Permalink
fixup! Generate Avro schema from AnVIL schema (#6109)
Browse files Browse the repository at this point in the history
  • Loading branch information
nadove-ucsc committed May 25, 2024
1 parent 5eceeb4 commit 4f25fac
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/azul/service/avro_pfb.py
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,14 @@ def pfb_schema_from_replicas(replicas: Iterable[JSON]

def pfb_schema_from_anvil_schema(anvil_schema: JSON
) -> tuple[Sequence[str], JSON]:
"""
Create a PFB schema for replicas of entities described by the AnVIL schema.
:param anvil_schema: A JSON document describing the tables and columns of
the AnVIL metadata as stored in underlying repository.
:return: A tuple of
1. The set of entity types defined by the PFB schema
2. The PFB schema itself
"""
entity_schemas = []
entity_types = []
for table_schema in sorted(anvil_schema['tables'], key=itemgetter('name')):
Expand Down

0 comments on commit 4f25fac

Please sign in to comment.