-
Notifications
You must be signed in to change notification settings - Fork 123
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 Advisor and Resource Graph recommendations exports to Hubs #1130
base: features/recs
Are you sure you want to change the base?
Adding Advisor and Resource Graph recommendations exports to Hubs #1130
Conversation
Co-authored-by: Michael Flanakin <flanakin@users.noreply.github.com>
β¦b.com/helderpinto/finops-toolkit into helderpinto/dev/recommendationsexport
Co-authored-by: Michael Flanakin <flanakin@users.noreply.github.com>
β¦b.com/helderpinto/finops-toolkit into helderpinto/dev/recommendationsexport
@flanakin, the ADF pipeline was refactored to become query type-agnostic. It is now prepared to deal with other query types in the future. There are still some unresolved conversations. Feel free to ping me offline or let's set up a meeting to discuss this further. |
@@ -799,6 +863,24 @@ resource dataset_ftkReleaseFile 'Microsoft.DataFactory/factories/datasets@2018-0 | |||
} | |||
} | |||
|
|||
resource dataset_resourcegraph 'Microsoft.DataFactory/factories/datasets@2018-06-01' = { | |||
name: 'resourcegraph' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: Do we want to standardize on camelcasing? I think we have some inconsistent casing right now and some of that can't be fixed but do we have a strong preference on which way we go?
name: 'resourcegraph' | |
name: 'resourceGraph' |
frequency: 'Hour' | ||
interval: 24 | ||
startTime: '2023-01-01T01:01:00' | ||
frequency: 'Day' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would keep this as hourly so customers can easily change it to be every 12 hours or whatever frequency they prefer.
{ | ||
// Get Config |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Undo all of these. We want them to be on the same line as the {
so they are visible when collapsed.
type: 'DatasetReference' | ||
parameters: { | ||
fileName: 'settings.json' | ||
folderPath: '${configContainerName}/queries' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thinking out loud: We will need configuration for CM exports as well. Should we follow this same pattern? And if so, is "queries" the right folder name? Should we use something more generic, like "datasets" or maybe something else? I'm not too picky. Just asking to be forward-looking.
typeProperties: { | ||
variableName: 'blobExportTimestamp' | ||
value: { | ||
value: '@concat(utcNow(\'yyyy\'),\'/\',utcNow(\'MM\'),\'/\',utcNow(\'dd\'),\'/\')' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need to account for data that we don't want to duplicate by day? Do we anticipate hourly, monthly, or even no historical scenarios? Happy to handle that later. I just want to make sure we have a plan for how we'll handle it that doesn't require moving data around. That tends to be painful.
@@ -1519,18 +1635,41 @@ Recommendations_transform_v1_0() | |||
|
|||
// Recommendations_final_v1_0 table | |||
.create-merge table Recommendations_final_v1_0 ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This table shouldn't change
'reservationdetails_2023-03-01': loadTextContent('../schemas/reservationdetails_2023-03-01.json') | ||
'reservationrecommendations_2023-05-01_ea': loadTextContent('../schemas/reservationrecommendations_2023-05-01_ea.json') | ||
'reservationrecommendations_2023-05-01_mca': loadTextContent('../schemas/reservationrecommendations_2023-05-01_mca.json') | ||
'reservationtransactions_2023-05-01_ea': loadTextContent('../schemas/reservationtransactions_2023-05-01_ea.json') | ||
'reservationtransactions_2023-05-01_mca': loadTextContent('../schemas/reservationtransactions_2023-05-01_mca.json') | ||
} | ||
var queryFiles = { | ||
'HubsRecommendations-AdvisorCost': loadTextContent('./scripts/HubsRecommendations-AdvisorCost.json') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't these be in the queries folder?
'HubsRecommendations-AdvisorCost': loadTextContent('./scripts/HubsRecommendations-AdvisorCost.json') | |
'HubsRecommendations-AdvisorCost': loadTextContent('./queries/HubsRecommendations-AdvisorCost.json') |
"mappings": [ | ||
{ | ||
"source": { | ||
"path": "[['ResourceId']" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this path correct? It doesn't look right with the extra [
. Same for the others.
}, | ||
{ | ||
"source": { | ||
"path": "[['x_RecommendationImpact']" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the impact actually useful for customers? Can we stand by the impact assessment for any of these recommendations? I've never trusted it, but I also haven't had a conversation with customers about it.
}, | ||
{ | ||
"source": { | ||
"path": "[['x_RecommendationMaturityLevel']" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What values does this have? Who assesses maturity? Is it standardized?
@helderpinto: you have some new feedback! Please review and resolve all comments and I'll let reviewers know by removing the |
π οΈ Description
This is the first PR in a series of PRs that will add Advisor and Resource Graph recommendations exports to Hubs. This PR includes the initial Advisor/ARG recommendations export and the schema for recommendations. It is compatible with Data Explorer ingestion. For this PR, we also fixed Western Europe timezones.
The upcoming PRs will address documentation, reporting, and granting permissions to the ADF identity at a higher scope, for the recommendations exports to succeed. Currently, Reader permissions have to be granted manually at the subscription or management group level.
π Checklist
π¬ How did you test this change?
πββοΈ Do any of the following that apply?
π Did you update
docs/changelog.md
?π Did you update documentation?