Skip to content

Commit 206ac0c

Browse files
authored
Merge branch 'main' into di-447-amend-dq-tests-for-housing
2 parents d838f9f + b9b6527 commit 206ac0c

File tree

12 files changed

+53
-32
lines changed

12 files changed

+53
-32
lines changed

docker/sql-to-parquet/entrypoint.sh

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,23 +19,18 @@ echo "Snapshot Id - $SNAPSHOT_ID"
1919
FILENAME="liberator_dump_${DATE}"
2020
DBNAME="liberator"
2121

22-
MYSQL_CONN_PARAMS="--user=${MYSQL_USER} --password=${MYSQL_PASS} --host=${MYSQL_HOST}"
22+
echo "Retrieving pem file..."
23+
wget -O /tmp/rds-combined-ca-bundle.pem https://truststore.pki.rds.amazonaws.com/eu-west-2/eu-west-2-bundle.pem
2324

24-
SSL_MODE=${MYSQL_SSL_MODE:-""}
25-
OTHER_FLAGS=${MYSQL_OTHER_FLAGS:-""}
25+
MYSQL_CONN_PARAMS="--user=${MYSQL_USER} --password=${MYSQL_PASS} --host=${MYSQL_HOST} --ssl-ca=/tmp/rds-combined-ca-bundle.pem"
2626

27-
if [ -n "$SSL_MODE" ]; then
28-
MYSQL_CONN_PARAMS="$MYSQL_CONN_PARAMS --ssl-mode=$SSL_MODE"
29-
echo "SSL Mode set to $SSL_MODE"
30-
fi
27+
OTHER_FLAGS=${MYSQL_OTHER_FLAGS:-""}
3128

3229
if [ -n "$OTHER_FLAGS" ]; then
3330
MYSQL_CONN_PARAMS="$MYSQL_CONN_PARAMS $OTHER_FLAGS"
3431
echo "Additional MySQL flags: $OTHER_FLAGS"
3532
fi
3633

37-
echo "MYSQL connection params: $MYSQL_CONN_PARAMS"
38-
3934
echo "Deleting old snapshots in database..."
4035
python3 delete_db_snapshots_in_db.py
4136

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
notifications-python-client==10.0.0
1+
notifications-python-client==10.0.1
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
numpy==2.1.3
1+
numpy==2.2.1
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
gspread==6.1.4
22
oauth2client==4.1.3
3-
google-api-python-client==2.154.0
3+
google-api-python-client==2.156.0
44
yagmail==0.15.293
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
urllib3==2.2.3
1+
urllib3==2.3.0
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
s3fs==2024.10.0
1+
s3fs==2024.12.0

lambdas/vonage_api_ingestion/Pipfile.lock

Lines changed: 4 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

scripts/jobs/parking/parking_cedar_payments.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,10 @@ def sparkSqlQuery(glueContext, query, mapping, transformation_ctx) -> DynamicFra
6262
SELECT
6363
cc, subj,analysis, trandate,
6464
CASE
65-
When trandate like '%/%'Then CAST(substr(trandate, 7, 4)||'-'||substr(trandate, 4,2)||'-'||'01' as date)
65+
When trandate like '%/%' Then
66+
CAST(substr(trandate, 7, 4)||'-'||substr(trandate, 4,2)||'-'||'01' as date)
67+
When substr(trandate, 1, 4) like '%-%' Then
68+
CAST(substr(trandate, 7, 4)||'-'||substr(trandate, 4,2)||'-'||'01' as date)
6669
ELSE cast(concat(substr(Cast(trandate as varchar(10)),1, 7), '-01') as date)
6770
END as PayMonthYear,
6871
description, o_description, cast(financialvalue as decimal(10,2)) as financialvalue

scripts/requirements.test.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@ freezegun
33
pytest-mock
44
pydeequ
55
# Explicitly set urllib3 version compatible with botocore to pass CI tests
6-
urllib3>=1.25.4,<1.27 # glue 4 is using urllib3==1.25.11 so don't need add to requirements.build.txt
6+
urllib3>=1.25.4,<2.4 # glue 4 is using urllib3==1.25.11 so don't need add to requirements.build.txt
77
redshift-connector==2.1.4 # used to connect with redshift

terraform/etl/08-google-sheets-imports.tf

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -970,3 +970,25 @@ module "diplomatic_country_vrm_prefix_data_load" {
970970
google_sheet_import_schedule = "cron(0 4 ? * MON *)"
971971
spark_ui_output_storage_id = module.spark_ui_output_storage_data_source.bucket_id
972972
}
973+
974+
module "parking_cycle_hangar_unsubscribed_emails" {
975+
count = local.is_live_environment ? 1 : 0
976+
source = "../modules/google-sheets-glue-job"
977+
is_production_environment = local.is_production_environment
978+
identifier_prefix = local.short_identifier_prefix
979+
is_live_environment = local.is_live_environment
980+
glue_scripts_bucket_id = module.glue_scripts_data_source.bucket_id
981+
helper_module_key = data.aws_s3_object.helpers.key
982+
pydeequ_zip_key = data.aws_s3_object.pydeequ.key
983+
glue_catalog_database_name = module.department_parking_data_source.raw_zone_catalog_database_name
984+
glue_temp_storage_bucket_url = module.glue_temp_storage_data_source.bucket_url
985+
glue_crawler_excluded_blobs = local.glue_crawler_excluded_blobs
986+
google_sheets_import_script_key = aws_s3_object.google_sheets_import_script.key
987+
bucket_id = module.raw_zone_data_source.bucket_id
988+
google_sheets_document_id = "1I9OPrlWIpidOM1pnwcc8G6Xq86IJz_UcIia1u7zX6_A"
989+
google_sheets_worksheet_name = "Unsubscribed emails"
990+
department = module.department_parking_data_source
991+
dataset_name = "parking_cycle_hangar_unsubscribed_emails"
992+
google_sheet_import_schedule = "cron(0 4 ? * * *)"
993+
spark_ui_output_storage_id = module.spark_ui_output_storage_data_source.bucket_id
994+
}

0 commit comments

Comments
 (0)