Skip to content

Commit

Permalink
Add extra column to record the 'real' application name for proprietar…
Browse files Browse the repository at this point in the history
…y applications
  • Loading branch information
jpwhite4 committed Jan 13, 2023
1 parent 5a8d340 commit 32c5dba
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 0 deletions.
15 changes: 15 additions & 0 deletions etl/js/config/supremm/dataset_maps/pcp.js
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,21 @@ module.exports = function(config) {
};
}
},
real_application: {
formula: function (job) {
var app = getProcInfo(job);
if (app) {
return {
value: app.realname,
error: 0
};
}
return {
value: null,
error: this.metricErrors.codes.metricMissingUnknownReason.value
};
}
},
"exit_status": {
formula: function(job) {
var exit = this.ref(job, "acct.exit_status");
Expand Down
10 changes: 10 additions & 0 deletions etl/js/config/supremm/etl.schema.js
Original file line number Diff line number Diff line change
Expand Up @@ -343,6 +343,16 @@ module.exports = {
comments: "The name of the application that ran",
per: "job",
},
real_application: {
unit: null,
type: 'string',
dtype: 'accounting',
group: 'Executable',
nullable: false,
def: 'NA',
comments: 'The actual name of the application that ran.',
per: 'job'
},
exit_status: {
unit: null,
type: "string",
Expand Down
1 change: 1 addition & 0 deletions tests/integration_tests/scripts/validate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ checkForColumn netdir_util_write
checkForColumn gpus
checkForColumn gpu_time
checkForColumn gpu_usage
checkForColumn real_application

# Check that the catastrophe buckets table has the extra column
if [ -z "$(echo "show columns from modw_supremm.catastrophe_buckets LIKE 'h_description'" | mysql -N modw_supremm)" ];
Expand Down

0 comments on commit 32c5dba

Please sign in to comment.