This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| version: '2.1' | |
| networks: | |
| monitor-net: | |
| driver: bridge | |
| volumes: | |
| prometheus_data: {} | |
| grafana_data: {} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| +-----------------------------------------+-------------+-----+ | |
| |Supplier |total |count| | |
| +-----------------------------------------+-------------+-----+ | |
| |EUROPEAN SPACE AGENCY |56,098,583.99|3 | | |
| |SCIENCE AND TECHNOLOGY FACILITIES COUNCIL|4,511,225.33 |4 | | |
| |ECOMETRICA LTD |1,044,096.22 |2 | | |
| +-----------------------------------------+-------------+-----+ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ... | |
| val supplierSpends = data.groupBy("Supplier") | |
| .agg( | |
| sum("Amount").as("total"), | |
| count("Supplier").as("count") | |
| ) | |
| .orderBy(desc("total")) | |
| .limit(3) | |
| .withColumn("total", format_number($"total", 2)) | |
| supplierSpends.show(false) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| +-----------------------------------------+-------------+ | |
| |Supplier |total | | |
| +-----------------------------------------+-------------+ | |
| |EUROPEAN SPACE AGENCY |56,098,583.99| | |
| |SCIENCE AND TECHNOLOGY FACILITIES COUNCIL|4,511,225.33 | | |
| |ECOMETRICA LTD |1,044,096.22 | | |
| +-----------------------------------------+-------------+ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ... | |
| val supplierSpends = data | |
| .groupBy("Supplier") | |
| .agg(sum("Amount").as("total")) | |
| .orderBy(desc("total")) | |
| .limit(3) | |
| .withColumn("total", format_number($"total", 2)) | |
| supplierSpends.show(false) | |
| ... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ... | |
| val expenses = data | |
| .groupBy("Expense Type") | |
| .agg(sum("Amount").as("total")) | |
| .withColumn("total", format_number($"total", 2)) | |
| expenses.show(false) | |
| ... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| +-------------+ | |
| | total| | |
| +-------------+ | |
| |67,366,632.28| | |
| +-------------+ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ... | |
| val totalSpend = data.agg(sum("Amount").as("total")) | |
| .withColumn("total", format_number($"total", 2)) | |
| totalSpend.show(false) | |
| ... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| +-------------------+ | |
| | total| | |
| +-------------------+ | |
| |6.736663227999993E7| | |
| +-------------------+ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ... | |
| val totalSpend = data.agg(sum("Amount").as("total")) | |
| totalSpend.show(false) | |
| ... |
NewerOlder