![]() |
Consumption Analytics Documentation |
You can import services and their rates into HPE Consumption Analytics Portal in two ways: by running the ccimport utility against a comma-delimited (CSV) file in the defined format or by using an ETL workbook to collect the service and rate data from a data source, transform it as necessary, and publish it as services and rates. This article explains how to do both.
Before you begin
Ensure that you have service and rate data available to be collected and published in HPE Consumption Analytics Portal.
To import services and rates using an ETL workbook
Import Collections
step, which is required.Transformation
step with one or more processors to modify the imported data before publishing.Publish as Service and Rate
step in your flow to publish collected service and rate data to HPE Consumption Analytics Portal: Rate Plan: Fixed charge amount
and Rate Plan: Rate
schema fields, else you will have no rates in your published rate plan.Rate plan name
schema field.ComputedServiceName
measure as the service name. Usage for services is charged according to the collected ComputedServiceName
measure, with the units of measurement defined by the collected ServiceResource
measure (which might be Compute Hours
, Data Transfer Out
in GB,and so on).The following ccimport
behaviors took effect with version 4.0.1 and supercede the defaultStartDate
parameter:
effective_date
, the date range currently in effect in the rate plan is updated.When importing new services and rates, when a new service with no effective_date
is added to a rate plan that has been used for existing charges, its rates are added to the date range currently in effect.
Before you begin
Create a CSV file on the HPE Consumption Analytics Portal server in the required CSV format.
To import services
ccimport -t servicerate -f <filename> [-u] [-D <parameter> ...]
The table below lists the parameters you can use when importing services. You must precede each parameter with -D
. For example, to import from the file cloud_services.csv
with incomplete service definitions and update duplicate entries:
ccimport -t servicerate -f cloud_services.csv -u -D enforceValidation=false
Parameter | Description |
---|---|
| Whether to ignore the active_flag values in the import file and instead set all services' Active flag to the value of defaultActiveFlag . The default is false. |
| Whether new services are active when no value is specified for active_flag . The default is true. |
| Whether to enforce validation of imported services, rejecting incompletely defined services. The default is true. |
| The service group in which to place new services when no value is specified for group_name . The default is Default . |
defaultStartDate | New in version 4.0.1. The start date to use when a row in the input file does not include an effective_date value. The default is 20000101 . |
Each row in the file represents a measure in a service and a rate for that service in an effective date range of a rate plan. It contains attributes of the measure, of the service, and of the rate. This means that multiple rows are required to define a service made up of more than one measure or a rate with tiers. When an input file contains more than one row for a given service and those rows have different values for a service-level attribute, the result of the import is the value in the last of those rows.
The first line of the file is a header row that defines the format of the subsequent rows. The following table describes the valid field names for the header row, some of which also have short names that you can use instead. In the full field names, you can substitute dots (.
) for underscores (_
).
CSV rows beginning with a pound sign (#
) are treated as comments and ignored by the importer.
Field Name | Short Name | Attribute of | Description | Required |
---|---|---|---|---|
service_name | service | Service | Name of the service to import or update | Yes |
service_desc | desc | Service | Description of the service | No |
measurement_type | (none) | Measure | How | No |
group_name | group | Service | Group of which the service is a member | No |
active_flag | active | Service | Whether the service is active. Valid values: 1/true or 0/false . The default is true. | No |
proration_type | proration | Service | How to prorate an allocated serviceValid values: Default value: | No |
charge_interval | interval | Service | Valid values: Default value: | No |
unit_decimals | unit_dec | Service | Unit decimal positions | No |
unit_desc | unit | Service | Unit description | Yes |
tag_name | tag.name | Service | Name of the tag | No |
tag_value | tag.value | Service | Value for the named tag | No |
schema_name | schema | Measure | Schema name | No |
measure_name | measure | Measure | Measure name | No |
measure_quantity_operator | quantity_operator | Measure | Operator specifying exact quantity value or range of values. Valid values:
| No |
measure_quantity | quantity | Measure | Quantity of the measure in the service or lower bound quantity if specifying a range | No |
measure_quantity_high | quantity_high | Measure | Upper bound of the measure quantity in the service | No |
conversion_operator | operator | Measure | Unit conversion operator. Valid values: Default value: | No |
conversion_operand | operand | Measure | Unit conversion factor or divisor | No |
dimension_filter_type | filter_type | Service | Name of a dimension to use as a service filter | No |
dimension_filter_value | filter_value | Service | Value of the named dimension to use as a service filter | No |
|
| Rate | Rate plan name. If not specified, use the "Default" rate plan. | Yes |
|
| Rate | Rate plan description | No |
service_rate_desc | svc.rate.desc | Rate | The description of the service when charged under the rate plan. This text appears in place of the service name on standard reports when the Allow unique service descriptions for customers option is enabled in Administration > Configuration > General > System. When the option is disabled, this field is ignored by | No |
svc_rate_tag_name | rate.tag.name | Rate | A rate plan field passed as metadata to the HPE Consumption Analytics Portal database. | No |
svc_rate_tag_value | rate.tag.value | Rate | The value for a svc_rate_tag_name field. | No |
|
| Rate | The beginning date of the effective date range to create or update in the rate plan, in the format of | No |
end_date | end | Rate | The ending date for the effective date range of the rate plan, in the format yyyymmdd . | No |
| model | Rate | Valid values: Default value: | No |
|
| Rate | The decimal precision of the rate | No |
min_commitment_value | min.value | Rate | The amount of a service customers are obligated to purchase regardless of their actual usage of that service | No |
min_commitment_interval | min.interval | Rate | Defines how often the min_commit_value obligation is applied (Daily , Hourly , or Monthly ) | No |
|
| Rate | Minimum units to charge, if this is Basic price model | No |
|
| Rate | State name when the rate type is State | Yes |
|
| Rate | State description when the rate type is State | No |
|
| Rate | Tier name when the rate type is Sticky Tiers or Final Tier | No |
|
| Rate | Lowest value in a tier when the rate type is Sticky Tiers or Final Tier. | No |
|
| Rate | The level of your account structure at which usage is aggregated for tiers when the rate type is Sticky Tiers or Final Tier | No |
fixed_charge_amount | fixed | Rate | One-time, or fixed, rate | No |
rate | unit.price | Rate | Per-unit, or variable, rate | No |