Cloud Cruiser became HPE Consumption Analytics on Nov. 1st. You'll still see the old name in places while we update this site.

 

 

Consumption Analytics Documentation

Home > Cloud Cruiser 4 > Working with Insights > Creating your own My Insights reports > Creating a custom analytics data source

Creating a custom analytics data source

Table of contents

When the dimensions and measures available in the charges data source that is shipped with HPE Consumption Analytics Portal don't meet the needs of an Insights module you are developing, you can create your own custom data source to bring in other data from the HPE Consumption Analytics Portal database.

To create a custom data source

  1. In HPE Consumption Analytics Portal Desktop, create a new workbook file.
  2. In the Data pane on the left, click Connect to Data.
  3. Under On a server click the database type of your HPE Consumption Analytics Portal database.
  4. In the database-specific window, enter the server name and one of the following sets of credentials for your database server, then click Connect.
    • (recommended) To work with only relevant database objects, enter the Reporting User name and password you created in the Database Settings screen of the HPE Consumption Analytics Portal installer.​
    • To work with all database objects​, enter the Application User name and password you created in the Database Settings screen of the HPE Consumption Analytics Portal installer.
  5. In the Database list, select the ccdb database.
    If you entered a different name for your database in the HPE Consumption Analytics Portal installer, select it here.
  6. From the Tables list, drag the database tables and views that you want to visualize into the empty top pane.
    HPE recommends that you include the ReportCharge view, which holds the financial information about charges and credits to your customers, and ReportAccounts, which enables you to display the names of your account structure levels such as Business Unit or Department.
    If you want detailed usage information, include the view for the schema to which you published that usage data. For example, schema_Virtual_Machine for the Virtual Machine schema.
    The following reporting views are available:
    View Description
    ReportAccounts

    Each record represents an account ID for which at least one of the following is true:

    • A customer record exists. In this case the description for this customer appears in the <levelName>Desc column corresponding to the lowest populated level of the account structure.
    • It is associated with published usage data.

    Column names reflect the names of the levels of your account structure.

    ReportAccountSecurity Each record represents permission for a given user to view data from a given account. You can use this view to enforce user group permissions.
    ReportAccountsGeneric Holds the same data as ReportAccounts, but uses generic column names. The names of your account structure levels are provided as values in <levelNum>Label columns.
    ReportCharge Each record represents a charge to an account. It includes context about accounting dates and periods, service quantities, rates used, discounts and transactions, and more. It does not include any raw usage information.
    ReportChargeUsage Each record relates a charge record to a usage record. Use this view in a join with ReportCharge and ReportUsage to relate charges to usage times in a single report.
    ReportRateModel Each record represents a service in a rate model in a What-If scenario. It includes all information shown for that service in the table in the What-If window plus information about the model and scenario.
    ReportServices Each record represents an entry for a service in an effective date range of a rate plan. It includes information about the service and the rate plan, but not the rates themselves.
    ReportUsage Each record represents a usage record in a schema. It includes information about usage times and duration. For more usage detail, use the view created for the applicable schema.
    ReportUsageDimension Each record represents a dimension in a usage record. It includes the dimension's name and description from the schema definition and its value from the usage record.
    ReportUsageMeasure Each record represents a measure in a usage record. It includes the measure's name, description, and units from the schema definition and its value from the usage record.
  7. At the top of the window, select Extract as the Connection option.
    This means that HPE Consumption Analytics Portal Server will query the HPE Consumption Analytics Portal database at regular intervals for the data specified in the data source and store that data in its own database. When a user views an analytics report, HPE Consumption Analytics Portal Server queries that database.
    This speeds up the performance of your workbook, as the processing and network cost of a live connection to the HPE Consumption Analytics Portal database would likely cause poor response times in a production environment. When you publish the workbook you'll choose how often to refresh the extract. Because the most common scenario is publishing data to the HPE Consumption Analytics Portal database once a day, choosing a nightly refresh of the extract is unlikely to result in users seeing obsolete data when viewing an analytics report.
  8. (recommended) Enable the data source to enforce permissions to customer data.
    1. If you are not already logged in to your HPE Consumption Analytics Portal Server, do so by clicking Server > Sign In.
      For login credentials, enter the hostname and port of your HPE Consumption Analytics Portal Server computer and the administrator username and password you created when you installed HPE Consumption Analytics Portal Server. When prompted to select a site, select CloudCruiser.
    2. Drag the ReportAccountSecurity view to the top pane.
      This joins ReportAccountSecurity to the existing views in the data source, which allows you to create HPE Consumption Analytics Portal workbooks that enforce the same permissions to customer data as do standard reports.
    3. Click the join icon Join icon next to ReportAccountSecurity and make sure that this is an inner join on the Account UID and AccountUID columns as shown here:
      The Join dialog box showing join information
    4. Click Go to Worksheet in the middle of the window.
      If you are prompted to save the data extract, do so.
    5. Right-click the Dimensions list, choose Create Calculated Field and name the new field Authorized?.
      You can use a different name if you want.
    6. In the Formula field, enter [Username]=USERNAME() as shown below, then click OK.
      You can select the Username field and then the USERNAME() function from their respective lists rather than typing the entire formula.
      The Calculated Field dialog box showing the Authorized? field

      You've enabled the data source to enforce permissions to customer data. From now on, in every worksheet you create that uses this data source you must filter data to only authorized users. This is required not only to complete enforcing the permissions, but also to prevent duplicate rows from the ReportAccountSecurity join from causing inaccuracies in your reports.

      Steps
  9. Choose Data > <data_source_name> > Publish to Server.
    Publishing enables HPE Consumption Analytics Portal Server to refresh the data source with new data from the HPE Consumption Analytics Portal database and makes it available to other workbooks you create.
  10. If prompted to log in to HPE Consumption Analytics Portal Server, enter the hostname and port of your HPE Consumption Analytics Portal Server computer and the administrator username and password you created when you installed HPE Consumption Analytics Portal Server, then click OK.
    If also prompted to select a site, select CloudCruiser and click OK.
  11. In the Authentication menu of the Publish Data Source dialog box, select Embedded password.
  12. In the Refresh Extract box, for the Full option select Weekday early mornings.
    HPE Consumption Analytics Portal Server will query the HPE Consumption Analytics Portal database at 4am every weekday and update its extract with current data. Make sure that any HPE Consumption Analytics Portal jobs that run nightly and publish data are scheduled early enough to finish before 4am.
  13. Click Publish. Then click OK in the dialog box that confirms that the data source has been successfully published.
    If you are prompted to embed credentials, click Yes.
Last modified

Tags

Classifications

This page has no classifications.
© Copyright 2018 Hewlett Packard Enterprise Development LP