generated from ministryofjustice/template-repository
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create and assign CaDeT domains (#138)
* Added a new source which creates domains from the CaDeT manifest * Added a transformer which builds upon the dbt ingestion and assigns those domains to CaDet models * The transformer has been adapted from the existing PatternAddDatasetDomain transformer written by DataHub. * A urn is formed for every dataset from the manifest which maps to a domain. * Domains in CaDeT are not assigned to sources, only models, so out of 505 datasets currently ingested, only ~310 have domains (the rest are sources). * Changed dependency management to poetry for alignment with our other projects * Adjusted dbt ingestion workflows to use new source and transformer * The cadet ingestion source (dbt) can't create domains, so the creation of domains happens before dbt ingestion
- Loading branch information
Showing
21 changed files
with
3,016 additions
and
72 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -60,3 +60,4 @@ env/ | |
*.code-workspace | ||
*.sha256 | ||
terraform.tfstate | ||
__pycache__ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
archive/data_product_examples/2023-05-example_prison_data_product/package_data_product.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 6 additions & 3 deletions
9
archive/data_product_examples/2023-05-example_prison_data_product/tests/unit_tests/t.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,8 @@ | ||
from pathlib import Path | ||
import os | ||
from pathlib import Path | ||
|
||
print(os.path.join(Path(__file__).parent.absolute(), | ||
"test_metadata", "02-data-dictionary.yaml")) | ||
print( | ||
os.path.join( | ||
Path(__file__).parent.absolute(), "test_metadata", "02-data-dictionary.yaml" | ||
) | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
source: | ||
type: "ingestion.create_derived_table_domains_source.source.CreateDerivedTableDomains" | ||
config: | ||
manifest_s3_uri: "s3://mojap-derived-tables/prod/run_artefacts/latest/target/manifest.json" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
from datahub.configuration.common import ConfigModel | ||
from pydantic import Field | ||
|
||
|
||
class CreateDerivedTableDomainsConfig(ConfigModel): | ||
manifest_s3_uri: str = Field( | ||
description="s3 path to dbt manifest json", default=None | ||
) |
Oops, something went wrong.