-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
NTD: Modify API sync for column name handling, ingest safety and secu…
…rity tables, create external tables (#3579) * NTD: Modify API sync for column name handling, ingest safety and security tables, create external tables * update ymls and add correct endpoints for safety and security table ingest
- Loading branch information
1 parent
eb16c3c
commit ce8e861
Showing
7 changed files
with
61 additions
and
3 deletions.
There are no files selected for viewing
13 changes: 13 additions & 0 deletions
13
...xternal_tables/ntd_data_products/historical__fra_regulated_mode_major_security_events.yml
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,13 @@ | ||
operator: operators.ExternalTable | ||
bucket: gs://calitp-ntd-api-products | ||
source_objects: | ||
- "fra_regulated_mode_major_security_events/historical/*.jsonl.gz" | ||
source_format: NEWLINE_DELIMITED_JSON | ||
use_bq_client: true | ||
hive_options: | ||
mode: CUSTOM | ||
require_partition_filter: false | ||
source_uri_prefix: "fra_regulated_mode_major_security_events/historical/{dt:DATE}/{execution_ts:TIMESTAMP}" | ||
destination_project_dataset_table: "external_ntd__safety_and_security.historical__fra_regulated_mode_major_security_events" | ||
prefix_bucket: false | ||
post_hook: SELECT * FROM `{{ get_project_id() }}`.external_ntd__safety_and_security.historical__fra_regulated_mode_major_security_events LIMIT 1; |
13 changes: 13 additions & 0 deletions
13
airflow/dags/create_external_tables/ntd_data_products/historical__major_safety_events.yml
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,13 @@ | ||
operator: operators.ExternalTable | ||
bucket: gs://calitp-ntd-api-products | ||
source_objects: | ||
- "major_safety_events/historical/*.jsonl.gz" | ||
source_format: NEWLINE_DELIMITED_JSON | ||
use_bq_client: true | ||
hive_options: | ||
mode: CUSTOM | ||
require_partition_filter: false | ||
source_uri_prefix: "major_safety_events/historical/{dt:DATE}/{execution_ts:TIMESTAMP}" | ||
destination_project_dataset_table: "external_ntd__safety_and_security.historical__major_safety_events" | ||
prefix_bucket: false | ||
post_hook: SELECT * FROM `{{ get_project_id() }}`.external_ntd__safety_and_security.historical__major_safety_events LIMIT 1; |
13 changes: 13 additions & 0 deletions
13
...nal_tables/ntd_data_products/historical__monthly_modal_time_series_safety_and_service.yml
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,13 @@ | ||
operator: operators.ExternalTable | ||
bucket: gs://calitp-ntd-api-products | ||
source_objects: | ||
- "monthly_modal_time_series_safety_and_service/historical/*.jsonl.gz" | ||
source_format: NEWLINE_DELIMITED_JSON | ||
use_bq_client: true | ||
hive_options: | ||
mode: CUSTOM | ||
require_partition_filter: false | ||
source_uri_prefix: "monthly_modal_time_series_safety_and_service/historical/{dt:DATE}/{execution_ts:TIMESTAMP}" | ||
destination_project_dataset_table: "external_ntd__safety_and_security.historical__monthly_modal_time_series_safety_and_service" | ||
prefix_bucket: false | ||
post_hook: SELECT * FROM `{{ get_project_id() }}`.external_ntd__safety_and_security.historical__monthly_modal_time_series_safety_and_service LIMIT 1; |
13 changes: 13 additions & 0 deletions
13
...ate_external_tables/ntd_data_products/historical__nonmajor_safety_and_security_events.yml
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,13 @@ | ||
operator: operators.ExternalTable | ||
bucket: gs://calitp-ntd-api-products | ||
source_objects: | ||
- "nonmajor_safety_and_security_events/historical/*.jsonl.gz" | ||
source_format: NEWLINE_DELIMITED_JSON | ||
use_bq_client: true | ||
hive_options: | ||
mode: CUSTOM | ||
require_partition_filter: false | ||
source_uri_prefix: "nonmajor_safety_and_security_events/historical/{dt:DATE}/{execution_ts:TIMESTAMP}" | ||
destination_project_dataset_table: "external_ntd__safety_and_security.historical__nonmajor_safety_and_security_events" | ||
prefix_bucket: false | ||
post_hook: SELECT * FROM `{{ get_project_id() }}`.external_ntd__safety_and_security.historical__nonmajor_safety_and_security_events LIMIT 1; |
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