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

Elm 2794 modularize glue jobs #8154

Closed
wants to merge 24 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
6cb5d37
Merge branch 'main' of https://github.com/ministryofjustice/modernisa…
madhu-k-sr2 Oct 10, 2024
7032a7b
PyLib Zipflie associated to Glue-Job-v2
madhu-k-sr2 Oct 10, 2024
6a77a30
PyLib Zipflie associated to Glue-Job-v3
madhu-k-sr2 Oct 10, 2024
15912e9
PyLib Zipflie associated to Glue-Job-v4
madhu-k-sr2 Oct 10, 2024
8bd6449
Merge branch 'main' of https://github.com/ministryofjustice/modernisa…
madhu-k-sr2 Oct 10, 2024
7b6b82f
PyLib Zipflie associated to Glue-Job-v5
madhu-k-sr2 Oct 10, 2024
e213a46
Merge branch 'main' of https://github.com/ministryofjustice/modernisa…
madhu-k-sr2 Oct 11, 2024
f18c0ec
PyLib Zipflie associated to Glue-Job-v6
madhu-k-sr2 Oct 11, 2024
8973f88
Merge branch 'main' of https://github.com/ministryofjustice/modernisa…
madhu-k-sr2 Oct 14, 2024
fb839ed
--extra-py-files included in v2-job
madhu-k-sr2 Oct 14, 2024
bef81fc
pylib corrected 1410-1
madhu-k-sr2 Oct 14, 2024
639cdb5
pylib corrected 1410-2
madhu-k-sr2 Oct 14, 2024
b7830f1
Merge branch 'main' of https://github.com/ministryofjustice/modernisa…
madhu-k-sr2 Oct 16, 2024
7517dd4
Merge branch 'main' of https://github.com/ministryofjustice/modernisa…
madhu-k-sr2 Oct 16, 2024
7542fa5
Failure Corrections - 1610-1
madhu-k-sr2 Oct 16, 2024
125a7c2
Failure Corrections - 1610-2
madhu-k-sr2 Oct 16, 2024
0df5caa
Merge branch 'main' of https://github.com/ministryofjustice/modernisa…
madhu-k-sr2 Oct 16, 2024
b3594cf
Failure Corrections - 1610-3
madhu-k-sr2 Oct 16, 2024
64fdd10
Merge branch 'main' of https://github.com/ministryofjustice/modernisa…
madhu-k-sr2 Oct 17, 2024
6dc84b0
Merge branch 'main' of https://github.com/ministryofjustice/modernisa…
madhu-k-sr2 Oct 17, 2024
295dc25
Merge branch 'main' of https://github.com/ministryofjustice/modernisa…
madhu-k-sr2 Oct 17, 2024
213b23a
Merge branch 'main' of https://github.com/ministryofjustice/modernisa…
madhu-k-sr2 Oct 17, 2024
86da001
glue-dev-athena-db-correction
madhu-k-sr2 Oct 17, 2024
4396782
Merge branch 'main' of https://github.com/ministryofjustice/modernisa…
madhu-k-sr2 Oct 21, 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
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
resource "aws_s3_object" "aws_s3_object_pyzipfile_to_s3folder" {
bucket = module.s3-glue-job-script-bucket.bucket.id
key = "${var.s3_pylib_dir_path}/glue_data_validation_lib.zip"
source = data.archive_file.archive_file_zip_py_files.output_path
acl = "private"
}

resource "aws_s3_object" "dms_dv_rds_and_s3_parquet_write_v2" {
bucket = module.s3-glue-job-script-bucket.bucket.id
key = "dms_dv_rds_and_s3_parquet_write_v2.py"
Expand Down Expand Up @@ -44,13 +51,13 @@ resource "aws_s3_object" "create_or_replace_dv_table" {

resource "aws_glue_catalog_database" "dms_dv_glue_catalog_db" {
name = "dms_data_validation"
# create_table_default_permission {
# permissions = ["SELECT"]
create_table_default_permission {
permissions = ["SELECT"]

# principal {
# data_lake_principal_identifier = "IAM_ALLOWED_PRINCIPALS"
# }
# }
principal {
data_lake_principal_identifier = "IAM_ALLOWED_PRINCIPALS"
}
}
}

# -------------------------------------------------------------------
Expand Down Expand Up @@ -99,6 +106,7 @@ resource "aws_glue_job" "dms_dv_glue_job_v2" {
"--read_partition_size_mb" = 128
"--max_table_size_mb" = 4000
"--parquet_tbl_folder_if_different" = ""
"--extra-py-files" = "s3://${module.s3-glue-job-script-bucket.bucket.id}/${aws_s3_object.aws_s3_object_pyzipfile_to_s3folder.id}"
"--parquet_src_bucket_name" = module.s3-dms-target-store-bucket.bucket.id
"--parquet_output_bucket_name" = module.s3-dms-data-validation-bucket.bucket.id
"--glue_catalog_db_name" = aws_glue_catalog_database.dms_dv_glue_catalog_db.name
Expand Down Expand Up @@ -285,6 +293,8 @@ resource "aws_glue_job" "rds_to_s3_parquet_migration_monthly" {
"--rename_migrated_prq_tbl_folder" = ""
"--year_partition_bool" = "false"
"--month_partition_bool" = "false"
"--extra-py-files" = "s3://${module.s3-glue-job-script-bucket.bucket.id}/${aws_s3_object.aws_s3_object_pyzipfile_to_s3folder.id}"
# "--extra-py-files" = "s3://emds-dev-glue-job-store-20240917144028249000000003/reusable-pylib/glue_data_validation_lib.zip"
"--rds_to_parquet_output_s3_bucket" = module.s3-dms-target-store-bucket.bucket.id
"--continuous-log-logGroup" = "/aws-glue/jobs/${aws_cloudwatch_log_group.rds_to_s3_parquet_migration.name}"
"--enable-continuous-cloudwatch-log" = "true"
Expand All @@ -303,6 +313,7 @@ EOF
command {
python_version = "3"
script_location = "s3://${module.s3-glue-job-script-bucket.bucket.id}/rds_to_s3_parquet_migration_monthly.py"

}

tags = merge(
Expand Down
Loading
Loading