Skip to content

Commit

Permalink
Merge pull request #845 from eiffel777/get-users-from-modw-instead-of…
Browse files Browse the repository at this point in the history
…-mod-shredder

Changing where staging action gets user id from for cloud data
  • Loading branch information
Greg Dean authored Mar 11, 2019
2 parents dcb2242 + a676d56 commit aaf96fd
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 13 deletions.
4 changes: 2 additions & 2 deletions configuration/etl/etl.d/jobs_cloud_generic.json
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion configuration/etl/etl.d/jobs_cloud_openstack.json
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@
"type": "mysql",
"name": "Cloud DB",
"config": "datawarehouse",
"schema": "mod_shredder"
"schema": "modw"
}
}
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)",
Expand Down Expand Up @@ -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",
Expand All @@ -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"
]
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)",
Expand Down Expand Up @@ -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"
}
],

Expand All @@ -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"
]
}
Expand Down

0 comments on commit aaf96fd

Please sign in to comment.