From a676d5666c78f895c99408a1dcf93a97c68ac43f Mon Sep 17 00:00:00 2001 From: Greg Dean Date: Fri, 8 Mar 2019 15:12:45 -0500 Subject: [PATCH] Changing where staging action gets user id from. Instead of using mod_shredder which does not exist in the xsede version use modw.systemaccount instead and add resource_id to join clause --- configuration/etl/etl.d/jobs_cloud_generic.json | 4 ++-- configuration/etl/etl.d/jobs_cloud_openstack.json | 2 +- .../etl_action_defs.d/cloud_generic/staging_event.json | 10 +++++----- .../cloud_openstack/staging_event.json | 10 +++++----- 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/configuration/etl/etl.d/jobs_cloud_generic.json b/configuration/etl/etl.d/jobs_cloud_generic.json index c78739b55d..13fc956728 100644 --- a/configuration/etl/etl.d/jobs_cloud_generic.json +++ b/configuration/etl/etl.d/jobs_cloud_generic.json @@ -264,7 +264,7 @@ "description": "Generic cloud instance type data", "class": "DatabaseIngestor", "definition_file": "cloud_generic/instance_type.json", - "#": "Because the generic format allows for a Z at the end of the timestamp", + "#": "Because the generic format allows for a Z at the end of the timestamp", "#": "the Z gets truncated off and throws this warning", "hide_sql_warning_codes": [ 1292 @@ -309,7 +309,7 @@ "type": "mysql", "name": "Cloud DB", "config": "datawarehouse", - "schema": "mod_shredder" + "schema": "modw" } }, "#": "Because the generic format allows for a Z at the end of the timestamp", diff --git a/configuration/etl/etl.d/jobs_cloud_openstack.json b/configuration/etl/etl.d/jobs_cloud_openstack.json index 6baea386ec..56d4e6e93f 100644 --- a/configuration/etl/etl.d/jobs_cloud_openstack.json +++ b/configuration/etl/etl.d/jobs_cloud_openstack.json @@ -262,7 +262,7 @@ "type": "mysql", "name": "Cloud DB", "config": "datawarehouse", - "schema": "mod_shredder" + "schema": "modw" } } }, diff --git a/configuration/etl/etl_action_defs.d/cloud_generic/staging_event.json b/configuration/etl/etl_action_defs.d/cloud_generic/staging_event.json index fad4aff6d7..8ca3063cee 100644 --- a/configuration/etl/etl_action_defs.d/cloud_generic/staging_event.json +++ b/configuration/etl/etl_action_defs.d/cloud_generic/staging_event.json @@ -22,7 +22,7 @@ "event_type_id": "COALESCE(etype.event_type_id, -1)", "record_type_id": "COALESCE(rtype.record_type_id, -1)", "user_name": "rv.provider_user", - "person_id": "su.union_user_pi_id", + "person_id": "sa.person_id", "account_id": "COALESCE(acct.account_id, -1)", "host_id": "COALESCE(h.host_id, -1)", "instance_id": "COALESCE(i.instance_id, -1)", @@ -92,10 +92,10 @@ "on": "raw.provider_instance_identifier = rv.provider_instance_identifier" }, { - "name": "staging_union_user_pi", + "name": "systemaccount", "schema": "${UTILITY_SCHEMA}", - "alias": "su", - "on": "rv.provider_user = su.union_user_pi_name" + "alias": "sa", + "on": "rv.provider_user = sa.username AND rv.resource_id = sa.resource_id" }, { "name": "asset_type", @@ -113,7 +113,7 @@ "etype.event_type_id", "rtype.record_type_id", "acct.account_id", - "su.union_user_pi_id", + "sa.person_id", "h.host_id" ] } diff --git a/configuration/etl/etl_action_defs.d/cloud_openstack/staging_event.json b/configuration/etl/etl_action_defs.d/cloud_openstack/staging_event.json index 4712a38433..54e78529be 100644 --- a/configuration/etl/etl_action_defs.d/cloud_openstack/staging_event.json +++ b/configuration/etl/etl_action_defs.d/cloud_openstack/staging_event.json @@ -17,7 +17,7 @@ "event_type_id": "COALESCE(etype.event_type_id, -1)", "record_type_id": "COALESCE(rtype.record_type_id, -1)", "user_name": "raw.user_name", - "person_id": "su.union_user_pi_id", + "person_id": "sa.person_id", "account_id": "COALESCE(acct.account_id, -1)", "host_id": "COALESCE(h.host_id, -1)", "instance_id": "COALESCE(i.instance_id, -1)", @@ -81,10 +81,10 @@ "type": "LEFT OUTER" }, { - "name": "staging_union_user_pi", + "name": "systemaccount", "schema": "${UTILITY_SCHEMA}", - "alias": "su", - "on": "raw.user_name = su.union_user_pi_name" + "alias": "sa", + "on": "raw.user_name = sa.username AND raw.resource_id = sa.resource_id" } ], @@ -99,7 +99,7 @@ "etype.event_type_id", "rtype.record_type_id", "acct.account_id", - "su.union_user_pi_id", + "sa.person_id", "h.host_id" ] }