Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ETL-616] Implement Great Expectations to run on parquet data #139

Merged
merged 26 commits into from
Sep 13, 2024
Merged
Show file tree
Hide file tree
Changes from 16 commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
ac378fd
initial commit for testing
rxu17 Sep 4, 2024
35c8422
update sample expectations
rxu17 Sep 5, 2024
f42717e
add two data types
rxu17 Sep 5, 2024
5483162
correct to fitbitdailydata
rxu17 Sep 5, 2024
4610016
fix expectation
rxu17 Sep 5, 2024
c4b85f4
add complete script
rxu17 Sep 5, 2024
9d1a0d5
initial cf config and template
rxu17 Sep 5, 2024
6ae0e24
correct formatting, refactor triggers
rxu17 Sep 5, 2024
26e31e9
fix job name
rxu17 Sep 6, 2024
8e45790
refactor gx code, add tests, adjust gx version
rxu17 Sep 6, 2024
2ad2f61
refactor gx code, add tests, adjust gx version
rxu17 Sep 6, 2024
3cd0422
make consistent naming
rxu17 Sep 6, 2024
2dae40e
remove hardcoded args
rxu17 Sep 6, 2024
6a07092
add integration tests, remove null rows code, add dep for urllib3<2
rxu17 Sep 6, 2024
84f5985
change to lowercase data type
rxu17 Sep 6, 2024
ee6a812
add prod cf configs, add perm for glue role for shareable artifacts b…
rxu17 Sep 6, 2024
15d7992
rename, include prod ver
rxu17 Sep 6, 2024
7720c8e
add test to catch exception
rxu17 Sep 6, 2024
db2fa8f
add conditional creation of triggers due to what is available in expe…
rxu17 Sep 9, 2024
19f0a8b
update README for tests, add in testing for our scripts
rxu17 Sep 10, 2024
19d1df5
chain cmd together
rxu17 Sep 10, 2024
a21c0d6
update prod
rxu17 Sep 10, 2024
6fbff2b
gather tests, correct key_prefix to key, add missing params to prod g…
rxu17 Sep 11, 2024
198ae92
remove slash
rxu17 Sep 11, 2024
0ec67b1
add gx glue version as var in config
rxu17 Sep 12, 2024
4a2c9f9
merge conflicts
rxu17 Sep 12, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/upload-and-deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ jobs:
run: echo "NAMESPACE=$GITHUB_REF_NAME" >> $GITHUB_ENV

- name: "Deploy sceptre stacks to dev"
run: pipenv run sceptre --var "namespace=${{ env.NAMESPACE }}" launch develop --yes
run: pipenv run sceptre --debug --var "namespace=${{ env.NAMESPACE }}" launch develop --yes

- name: Delete preexisting S3 event notification for this namespace
uses: gagoar/invoke-aws-lambda@v3
Expand Down
1 change: 1 addition & 0 deletions config/develop/glue-job-role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,6 @@ parameters:
S3IntermediateBucketName: {{ stack_group_config.intermediate_bucket_name }}
S3ParquetBucketName: {{ stack_group_config.processed_data_bucket_name }}
S3ArtifactBucketName: {{ stack_group_config.template_bucket_name }}
S3ShareableArtifactBucketName: {{ stack_group_config.shareable_artifacts_vpn_bucket_name }}
rxu17 marked this conversation as resolved.
Show resolved Hide resolved
stack_tags:
{{ stack_group_config.default_stack_tags }}
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
template:
path: glue-job-run-great-expectations.j2
dependencies:
- develop/glue-job-role.yaml
stack_name: "{{ stack_group_config.namespace }}-glue-job-RunGreatExpectationsParquet"
parameters:
Namespace: {{ stack_group_config.namespace }}
JobDescription: Runs great expectations on a set of data
JobRole: !stack_output_external glue-job-role::RoleArn
TempS3Bucket: {{ stack_group_config.processed_data_bucket_name }}
S3ScriptBucket: {{ stack_group_config.template_bucket_name }}
S3ScriptKey: '{{ stack_group_config.namespace }}/src/glue/jobs/run_great_expectations_on_parquet.py'
GlueVersion: "{{ stack_group_config.json_to_parquet_glue_version }}"
rxu17 marked this conversation as resolved.
Show resolved Hide resolved
AdditionalPythonModules: "great_expectations~=0.18,urllib3<2"
stack_tags:
{{ stack_group_config.default_stack_tags }}
sceptre_user_data:
dataset_schemas: !file src/glue/resources/table_columns.yaml
3 changes: 3 additions & 0 deletions config/develop/namespaced/glue-workflow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ dependencies:
- develop/namespaced/glue-job-S3ToJsonS3.yaml
- develop/namespaced/glue-job-JSONToParquet.yaml
- develop/namespaced/glue-job-compare-parquet.yaml
- develop/namespaced/glue-job-run-great-expectations-on-parquet.yaml
- develop/glue-job-role.yaml
- develop/s3-cloudformation-bucket.yaml
parameters:
Expand All @@ -19,6 +20,8 @@ parameters:
CompareParquetMainNamespace: "main"
S3SourceBucketName: {{ stack_group_config.input_bucket_name }}
CloudformationBucketName: {{ stack_group_config.template_bucket_name }}
ShareableArtifactsBucketName: {{ stack_group_config.shareable_artifacts_vpn_bucket_name }}
ExpectationSuiteKeyPrefix: "{{ stack_group_config.namespace }}/src/glue/resources/data_values_expectations.json"
rxu17 marked this conversation as resolved.
Show resolved Hide resolved
stack_tags:
{{ stack_group_config.default_stack_tags }}
sceptre_user_data:
Expand Down
3 changes: 3 additions & 0 deletions config/prod/namespaced/glue-workflow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ dependencies:
- prod/namespaced/glue-job-S3ToJsonS3.yaml
- prod/namespaced/glue-job-JSONToParquet.yaml
- prod/namespaced/glue-job-compare-parquet.yaml
- prod/namespaced/glue-job-run-great-expectations-on-parquet.yaml
- prod/glue-job-role.yaml
- prod/s3-cloudformation-bucket.yaml
parameters:
Expand All @@ -19,6 +20,8 @@ parameters:
CompareParquetMainNamespace: "main"
S3SourceBucketName: {{ stack_group_config.input_bucket_name }}
CloudformationBucketName: {{ stack_group_config.template_bucket_name }}
ShareableArtifactsBucketName: {{ stack_group_config.shareable_artifacts_vpn_bucket_name }}
ExpectationSuiteKeyPrefix: "{{ stack_group_config.namespace }}/src/glue/resources/data_values_expectations.json"
stack_tags:
{{ stack_group_config.default_stack_tags }}
sceptre_user_data:
Expand Down
Loading
Loading