-
-
Notifications
You must be signed in to change notification settings - Fork 143
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
New commands to output results to file and database and New Power Bi File #727
Conversation
This reverts commit 9ad8ba0.
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.
Hey @SQLDBAWithABeard as mentioned before I have done something like this (non-dbachecks native), and hence my comments/questions.
Let me know if I can help further
Note: Just to share, in my PoC implementation I save Summary
and Details
(checks results) two different tables where there is an FK with SummaryID (FK to Summary table). To be honest the main point is that some PowerBI dashboards will leverage on the already aggregated data (total tests, successed / failed, etc..).
cc/ @spaghettidba
else { | ||
$Database = $null | ||
} | ||
$Date = Get-Date # -Format "yyyy-MM-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.
Should this be the datetime of the import or related with the run?
Should we have both?
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 dont think so, I only think that the time of the check is important
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 agree but the get-date will be the date of the object conversion and then becomes the import date.
Tbh i don't remember to see a date time of the run for each test as result of the pester test. Am I right?
GRRRRRRRR So I was looking at handling the couldn't connects to be a little nicer and now I realise that the name of every single test where we cant connect is "Couldn't connect to" which is correct but now I need to work out how to filter those out of the results in the PowerBi so I am walking away for a while |
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.
Rob!
This looks amazing.
It's been a little while since I've played with dbachecks and the reporting looks fantastic! Put a couple of notes, nothing major.
Was able to pretty easily run some checks, get the data into a database and then get the PowerBI report looking at that database.
Some great changes here, I'm excited!
OK This is a big change, so I would like some feedback on this before it gets merged.
There are some bug fixes to checks that I found along the way but the important stuff is
New Commands
I have added
This will take the out put of
Invoke-DbcCheck
WITH THE-PassThru
parameter :-) and convert the output to a PowerShell object that looks like thisThe label is a way of defining a group of checks (like the environmenttag for Update-DbcPowerBiDataSource)
You can try it with
This command will take an object from
Convert-DbcResult
and either save to a file or add to a file of type CSV, JSON or XMLYou can try it with
or by setting the output of the checks to a variable and piping that
This command will take the output of
Convert-DbcResult
and write it to a database table - It will also take the output ofGet-DbcCheck
and place that in a table called dbachecksChecks (This is required for the new pbixYou can try it with
I have also added a new PowerBi to the repo under \bin which I would really like some clever people to make more beautiful!
Here is what I have so far - The data comes from the database created by
Write-DbcTable
https://app.powerbi.com/reportEmbed?reportId=48d7902f-f3d6-4d46-9308-bce4aeda14eb&autoAuth=true&ctid=b122247e-1ebf-4b52-b309-c2aa7436fc6b&config=eyJjbHVzdGVyVXJsIjoiaHR0cHM6Ly93YWJpLW5vcnRoLWV1cm9wZS1yZWRpcmVjdC5hbmFseXNpcy53aW5kb3dzLm5ldC8ifQ%3D%3D
The first page shows the information for the latest date in the data
The second page
shows the info by date
The third page by database
The fourth page is the drill through page showing the information for the checks enabling you to see the failure messages
This is similar to another report that I build so that DBAs could quickly get information about the checks and the reasons for failures and identify what to work on, DBA team leaders could identify risk areas and see how the team were doing and Management could see pretty pictures which changed when they clicked on them.
I am interested in making these reports as gorgeous as possible with the info that people expect to see, so please feel free to comment or to take the Power Bi file new-dbachecks.pbix in the bin folder and make it more beautiful
Some items are not finished yet, the Pester Tests wont succeed as there is no help for the new commands either but if you wish to try this out.Tests now pass.
If you want to try this out
Clone the repo or update your own clone with
Then navigate to the root of your repo and run
to load the new code