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

Adding columns for resource, PI, and person organization ID for cloud realm #1936

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
Expand Up @@ -24,7 +24,7 @@ public function execute()

if ($mysql_helper->tableExists('modw_cloud.event')) {
Utilities::runEtlPipeline(
['cloud-migration-10-5-0_11-0-0'],
['cloud-migration-10-5-0_11-0-0','cloud-state-pipeline'],
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be changed to an 11.0.0 -> 11.0.1 migration? We can't be modifying the 10.5 to 11.0 migration anymore since the 11.0.0 is released

$this->logger,
['last-modified-start-date' => '2017-01-01 00:00:00']
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,10 @@
"year": "${:YEAR_VALUE}",
"${AGGREGATION_UNIT}": "${:PERIOD_VALUE}",
"host_resource_id": "sr.resource_id",
"resource_organization_id": "sr.resource_organization_id",
"account_id": "sr.account_id",
"person_id": "sr.person_id",
"person_organization_id": "sr.person_organization_id",
"systemaccount_id": "sr.systemaccount_id",
"processorbucket_id": "sr.processorbucket_id",
"memorybucket_id": "sr.memorybucket_id",
Expand All @@ -47,6 +49,7 @@
"domain_id": "sr.domain_id",
"service_provider": "sr.service_provider",
"principalinvestigator_person_id": "sr.principalinvestigator_person_id",
"piperson_organization_id": "sr.piperson_organization_id",
"fos_id": "sr.fos_id",
"instance_state_id": "sr.instance_state_id"
},
Expand All @@ -55,6 +58,7 @@
"year",
"${AGGREGATION_UNIT}",
"host_resource_id",
"resource_organization_id",
"service_provider",
"processorbucket_id",
"memorybucket_id",
Expand All @@ -65,8 +69,10 @@
"domain_id",
"service_provider",
"principalinvestigator_person_id",
"piperson_organization_id",
"fos_id",
"person_id",
"person_organization_id",
"instance_state_id"
],
"joins":[
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,10 @@
"year": "${:YEAR_VALUE}",
"${AGGREGATION_UNIT}": "${:PERIOD_VALUE}",
"host_resource_id": "sr.resource_id",
"resource_organization_id": "sr.resource_organization_id",
"account_id": "sr.account_id",
"person_id": "sr.person_id",
"person_organization_id": "sr.person_organization_id",
"systemaccount_id": "sr.systemaccount_id",
"processorbucket_id": "sr.processorbucket_id",
"memorybucket_id": "sr.memorybucket_id",
Expand All @@ -47,6 +49,7 @@
"domain_id": "sr.domain_id",
"service_provider": "sr.service_provider",
"principalinvestigator_person_id": "sr.principalinvestigator_person_id",
"piperson_organization_id": "sr.piperson_organization_id",
"fos_id": "sr.fos_id",
"instance_state_id": "sr.instance_state_id",
"session_id_list": "GROUP_CONCAT(sr.session_id)"
Expand All @@ -56,6 +59,7 @@
"year",
"${AGGREGATION_UNIT}",
"host_resource_id",
"resource_organization_id",
"service_provider",
"processorbucket_id",
"memorybucket_id",
Expand All @@ -66,8 +70,10 @@
"domain_id",
"service_provider",
"principalinvestigator_person_id",
"piperson_organization_id",
"fos_id",
"person_id",
"person_organization_id",
"instance_state_id"
],
"joins":[
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"end_time": "FROM_UNIXTIME(e.end_time_ts)",
"end_event_type_id": "e.end_event_id",
"resource_id": "it.resource_id",
"resource_organization_id": "r.organization_id",
"instance_type": "itt.instance_type",
"instance_type_id": "itt.instance_type_id",
"num_cores": "itt.num_cores",
Expand All @@ -23,12 +24,14 @@
"end_day_id": "YEAR(FROM_UNIXTIME(e.end_time_ts)) * 100000 + DAYOFYEAR(FROM_UNIXTIME(e.end_time_ts))",
"wallduration": "FLOOR(e.end_time_ts) - FLOOR(e.start_time_ts)",
"person_id": "ev.person_id",
"person_organization_id": "p.organization_id",
"systemaccount_id": "ev.systemaccount_id",
"submission_venue_id": "ev.submission_venue_id",
"domain_id": "ev.domain_id",
"service_provider": "ev.service_provider",
"account_id": "a.account_id",
"principalinvestigator_person_id": "a.principalinvestigator_person_id",
"piperson_organization_id": "pi.organization_id",
"fos_id": "a.fos_id",
"host_id": "ev.host_id",
"instance_state_id": "etype.instance_state_id"
Expand Down Expand Up @@ -75,6 +78,27 @@
"schema": "${SOURCE_SCHEMA}",
"alias": "etype",
"on": "e.start_event_id = etype.event_type_id"
},
{
"name": "resourcefact",
"schema": "${UTILITY_SCHEMA}",
"alias": "r",
"type": "LEFT",
"on": "e.resource_id = r.id"
},
{
"name": "person",
"schema": "${UTILITY_SCHEMA}",
"alias": "p",
"type": "LEFT",
"on": "ev.person_id = p.id"
},
{
"name": "person",
"schema": "${UTILITY_SCHEMA}",
"alias": "pi",
"type": "LEFT",
"on": "a.principalinvestigator_person_id = pi.id"
}
],
"orderby": [
Expand Down
15 changes: 15 additions & 0 deletions configuration/etl/etl_tables.d/cloud_common/cloudfact_by_.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@
"type": "int(11)",
"nullable": false,
"comment": "DIMENSION: The resource id of the host of a VM where sessions ran."
},{
"name": "resource_organization_id",
"type": "int(11)",
"nullable": false,
"comment": "DIMENSION: The organization of the resource that the jobs ran on."
},{
"name": "account_id",
"type": "smallint(5) unsigned",
Expand All @@ -35,6 +40,11 @@
"type": "int(11)",
"nullable": false,
"comment": "DIMENSION: The person id associated with a VM instance."
},{
"name": "person_organization_id",
"type": "int(11)",
"nullable": false,
"comment": "DIMENSION: The organization of the person that ran the jobs."
},{
"name": "systemaccount_id",
"type": "int(11)",
Expand Down Expand Up @@ -127,6 +137,11 @@
"nullable": false,
"default": -1,
"comment": "DIMENSION: The PI that owns the allocations that these VM's ran under. References principalinvestigator.person_id"
},{
"name": "piperson_organization_id",
"type": "int(11)",
"nullable": false,
"comment": "DIMENSION: The organization of the PI that owns the project that funds these jobs. References piperson.organization_id"
},{
"name": "fos_id",
"type": "int(11)",
Expand Down
15 changes: 15 additions & 0 deletions configuration/etl/etl_tables.d/cloud_common/cloudfact_by_day.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,11 @@
"type": "int(11)",
"nullable": false,
"comment": "DIMENSION: The resource id of the host of a VM where sessions ran."
},{
"name": "resource_organization_id",
"type": "int(11)",
"nullable": false,
"comment": "DIMENSION: The organization of the resource that the jobs ran on."
},{
"name": "account_id",
"type": "smallint(5) unsigned",
Expand All @@ -40,6 +45,11 @@
"type": "int(11)",
"nullable": false,
"comment": "DIMENSION: The person id associated with a VM instance."
},{
"name": "person_organization_id",
"type": "int(11)",
"nullable": false,
"comment": "DIMENSION: The organization of the person that ran the jobs."
},{
"name": "systemaccount_id",
"type": "int(11)",
Expand Down Expand Up @@ -132,6 +142,11 @@
"nullable": false,
"default": -1,
"comment": "DIMENSION: The PI that owns the allocations that these VM's ran under. References principalinvestigator.person_id"
},{
"name": "piperson_organization_id",
"type": "int(11)",
"nullable": false,
"comment": "DIMENSION: The organization of the PI that owns the project that funds these jobs. References piperson.organization_id"
},{
"name": "fos_id",
"type": "int(11)",
Expand Down
16 changes: 16 additions & 0 deletions configuration/etl/etl_tables.d/cloud_common/session_records.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@
"type": "int(11)",
"nullable": false
},
{
"name": "resource_organization_id",
"type": "int(11)",
"nullable": false
},
{
"name": "start_time",
"type": "datetime",
Expand Down Expand Up @@ -107,6 +112,11 @@
"type": "int(11)",
"nullable": true
},
{
"name": "person_organization_id",
"type": "int(11)",
"nullable": false
},
{
"name": "systemaccount_id",
"type": "int(11)",
Expand Down Expand Up @@ -146,6 +156,12 @@
"default": -1,
"comment": "DIMENSION: The PI that owns the allocations that these VM's ran under. References principalinvestigator.person_id"
},
{
"name": "piperson_organization_id",
"type": "int(11)",
"nullable": false,
"default": -1
},
{
"name": "fos_id",
"type": "int(11)",
Expand Down