Date post: | 21-Jul-2015 |
Category: |
Software |
Upload: | dell-world |
View: | 59 times |
Download: | 1 times |
Dell World User Forum
UFIL516: Reporting 201
John Verbosky, Learning Development
Jeffrey J Hoover, Senior Trainer
Dell WorldUser Forum
Dell World User Forum
Agenda
• Determining Criteria
• Leveraging Existing Resources
• Scavenging Code
• Accessing the K1000 Database
• Developing a Report Query
• Formatting Output with Functions
• Building a K1000 SQL Report
Dell World User Forum
Asking the Right Questions
What
– Devices, Software, Assets, Patching, Service Desk tickets, etc.
– All or a subset?
Who
– Device users, Service Desk owners/submitters, etc.
– All, a subset or none?
When
– Current, historical or a fixed period?
How
– Should output be sorted or grouped?
– Detailed or summary results?
– Single or multiple reports?
Dell World User Forum
Report Wizard – Yes or No?
Report Wizard
Creation is
straightforward
Filter values need
determined
Does a pre-existing
report exist? YAY!
Need to scavenge or
tweak a related query
No Report Wizard
Browse the K1000
database
Dell World User Forum
Scavenging Code
K1000 Wizard Reports
Build baseline reports
Use Edit SQL for code
ITNinja
Search on “topic + report”
K1000 Canned Reports
Ordered by Category
Your Own Code
By module
By filter
By presentation
Dell World User Forum
Accessing the K1000 Database
Use a Query Test Environment
– Badly written queries can be stopped or killed
K1000 Security Settings
– The Enable database access option needs to be enabled
– This change requires a reboot of the K1000
– Recommend changing the default password
Several Options Available
– Toad for MySQL
– MySQL Workbench
– FlySpeed SQL Query
Dell World User Forum
Developing a Report Query
SELECT what information?
• Adjust column names and add more columns from selected tables.
FROM which tables?
• Include additional tables using JOIN statements.
• (INNER) and LEFT joins include different information.
WHERE should information be limited?
• Adjust and add filter criteria to limit returned results.
GROUP BY and ORDER BY which information?
Dell World User Forum
Format Output with FunctionsFormatting Output
Single Functions Considerations Aggregate Functions
• Operate on a single value
• Can be nested
• Some functions and operators only
work with certain data types
• Common K1000 simple functions
Date/Time: DATE_FORMAT,
TIME_TO_SEC, SEC_TO_TIME,
DATE_ADD
String Manipulation: CONCAT,
SUBSTRING, TRIM
• When nesting > inside to outside
• Data types
• GROUP BY requires aggregate
functions
• Operate on sets of values
• Can be nested with single functions
• Common K1000 aggregate functions:
COUNT
SUM
GROUP_CONCAT
Dell World User Forum
Building a K1000 SQL Report
Leave as the last step
If a report fails to run, check the related logs
– K1000 > Settings > Logs > Reporting Log
– K1000 > Settings > Logs > Reporting Errors
If a K1000 SQL Report is taking a long time to appear…
– Wait
– Try another browser
– Reboot the K1000 via the UI
Dell World User Forum
Closing Tips
1
Duplicate/Missing Data?
Review tables and JOIN
criteria
Use DISTINCT as needed
2
Stuck? Research.
MySQL + what you are
trying to do
ITNinja
3
Document. Everything.
Keep earlier revisions
Keep notes or comment
code on success and
failure
4
Start simple
Avoid subqueries unless
absolutely necessary
5
Filter early
Test with a single
expected record
6
Use LIMIT
Test viability of large
reports
Dell World User Forum
KACE Support Portal Migrating to Dell Software Support Portal
• Starting in November, all KACE Support Portal material will be migrated to the Dell Software Support Portal
• All service requests will be submitted online or by phone
• Same great content
– Knowledge base articles
– Video tutorials
– Product documentation
– JumpStart training
• Check out the Support Portal Getting Started videos