Skip to content

Commit

Permalink
Updating notebook: cost-extend-utilities
Browse files Browse the repository at this point in the history
  • Loading branch information
tobiasny committed Jun 26, 2024
1 parent 68c8e89 commit a44d7e8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions notebook/cost-extend-utilities.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"spark.dynamicAllocation.enabled": "true",
"spark.dynamicAllocation.minExecutors": "1",
"spark.dynamicAllocation.maxExecutors": "5",
"spark.autotune.trackingId": "7ad6782f-02ff-4f98-9fbc-6a3be313f437"
"spark.autotune.trackingId": "fcc67cf2-2520-41e9-9c2a-0ca332a0cdb6"
}
},
"metadata": {
Expand Down Expand Up @@ -807,8 +807,8 @@
" cost_df = cost_df.join(wbs_df, cost_df.ActiveWBS == wbs_df.WBS, 'left').drop('WBS')\r\n",
"\r\n",
" # If active WBS is closed, it should be re-assigned to the subscriptn WBS\r\n",
" is_closed_wbs = (F.col('IsActive') == False) & (F.col('CostAllocationType') != 'SubscriptionWBS')\r\n",
" cost_df = cost_df.withColumn('ActiveWBS', F.when(is_closed_wbs & (F.col('SubscriptionWBS').IsNotNull()), F.col('SubscriptionWBS')).otherwise(F.col('ActiveWBS')))\r\n",
" is_closed_wbs = (F.col('IsActive') == F.lit(False)) & (F.col('CostAllocationType') != F.lit('SubscriptionWBS'))\r\n",
" cost_df = cost_df.withColumn('ActiveWBS', F.when((is_closed_wbs) & (F.col('SubscriptionWBS').IsNotNull()), F.col('SubscriptionWBS')).otherwise(F.col('ActiveWBS')))\r\n",
" cost_df = cost_df.withColumn('ActiveWBSReason', F.when(is_closed_wbs, F.lit('Assigned WBS is closed.')).otherwise(F.col('ActiveWBSReason')))\r\n",
" cost_df = cost_df.withColumn('CostAllocationType', F.when(is_closed_wbs, F.lit('SubscriptionWBS')).otherwise(F.col('CostAllocationType')))\r\n",
"\r\n",
Expand Down

0 comments on commit a44d7e8

Please sign in to comment.