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 3 > Batch XML Reference > Universal collectors > JDBC > JdbcFeedConfig

JdbcFeedConfig

Table of contents
No headers

Data feed configuration for the SmartJdbcCollector.

Class


<bean class="com.cloudcruiser.batch.collect.JdbcFeedConfig">

Properties


<property name="request” value="requestSqlStatement" />

Sets the SQL statement to issue to the database. This is a required property.


<property name="requestParameters" value="requestParameterBean" />

Parameter values for placeholders in request. This consists of a list containing another bean, the RequestParameter bean.


<property name="adjustTimestamps" value="true" />

When true , Timestamp values from JDBC are converted to compensate for common driver adaptations with regard to time zone. This defaults to true. This is recommended when collecting data from MySQL, SQL Server and Oracle.

Spring Batch Example

<bean id="feedConfig" class="com.cloudcruiser.batch.collect.JdbcFeedConfig">
  <property name="request" value="SELECT accounting_end_date, accountid, resourceid, sum(resource_units) as resource_units, sum(variable_money_value) AS money_value from summary t1 join account t2 where DATE(accounting_end_date) = ? and t2.account_uid = t1.account_uid and t2.acct_structure = 0 group by accountid, resourceid"/>
  <property name="requestParameters">
    <list>
      <bean class="com.cloudcruiser.batch.collect.RequestParameter">
        <property name="type" value="STRING"/>
        <property name="pos" value="1"/>
        <property name="value" value="${param.myJobParam}"/>
      </bean>
      <bean class="com.cloudcruiser.batch.collect.RequestParameter">
        <property name="type" value="DATETIME"/>
        <property name="pos" value="1"/>
        <property name="value" value="${env.selectDate}"/>
        <property name="format" value="yyyyMMdd"/>
      </bean>
    </list>
  </property>
  <property name="adjustTimestamps" value="true" />
  <property name="outputs">
    <list>
      <bean class="com.cloudcruiser.batch.collect.OutputField">
        <property name="cctype" value="USAGE_DATE"/>
        <property name="input" value="accounting_end_date"/>
      </bean>
      <bean class="com.cloudcruiser.batch.collect.OutputField">
        <property name="cctype" value="IDENTIFIER"/>
        <property name="input" value="accountid"/>
        <property name="label" value="@acctid"/>
      </bean>
      <bean class="com.cloudcruiser.batch.collect.OutputField">
        <property name="cctype" value="RESOURCE"/>
        <property name="input" value="resource_units"/>
        <property name="labelInput" value="resourceid"/>
      </bean>
      <bean class="com.cloudcruiser.batch.collect.OutputField">
        <property name="cctype" value="RESOURCE"/>
        <property name="input" value="money_value"/>
      </bean>
    </list>
  </property>
</bean>
Last modified

Tags

This page has no custom tags.

Classifications

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