Skip to content

Commit

Permalink
tag transformer for justice data (#205)
Browse files Browse the repository at this point in the history
* tag transformer for justice data

* rename of transformer script

* up duration for assuming role
  • Loading branch information
LavMatt authored Jul 18, 2024
1 parent c21870b commit 3f11eb6
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
1 change: 1 addition & 0 deletions .github/workflows/ingest-cadet-metadata.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ jobs:
- uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: ${{ secrets.CADET_METADATA_ROLE_TO_ASSUME }}
role-duration-seconds: 14400
aws-region: ${{ inputs.ECR_REGION }}

- name: cache poetry install
Expand Down
5 changes: 5 additions & 0 deletions ingestion/justice_data_ingest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,8 @@ source:
type: ingestion.justice_data_source.source.JusticeDataAPISource
config:
base_url: "https://data.justice.gov.uk/api"

transformers:
- type: "add_dataset_tags"
config:
get_tags_to_add: "ingestion.taggers.display_in_catalogue_tagger.add_display_in_catalogue_tag"
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,10 @@


def add_display_in_catalogue_tag(entity_urn: str) -> List[TagAssociationClass]:
"""Compute the tags to associate to a given dataset."""
"""
Transformer to add dc_display_in_catalogue tag to all ingested entities
other than the athena entities created via a dbt cadet ingestion
"""
if "athena_cadet" not in entity_urn:
tag_urn = builder.make_tag_urn(tag="dc_display_in_catalogue")
tags = [TagAssociationClass(tag=tag_urn)]
Expand Down

0 comments on commit 3f11eb6

Please sign in to comment.