понедельник, 28 сентября 2015 г.

BIEE 11g: instanceconfig.xml (11.1.1.7.1)

Так и не нашел в документации и блогосфере полной структуры файла instanceconfig.xml
В итоге выкладываю сам для версии OBIEE 11.1.1.7.1 со значениями по умолчанию.


<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Oracle Business Intelligence Presentation Services Configuration File -->
<WebConfig xmlns="oracle.bi.presentation.services/config/v1.1">
 <ServerInstance>

четверг, 24 сентября 2015 г.

Построение отчетов Oracle BI на основе данных RTD

В Real-Time Decisions уже встроен ряд отчетов, позволяющих посмотреть, что происходит при общении с клиентом, какие корелляции возникают между покупкой продукта и параметрами клиента и т.д.
Однако, бывают ситуации, когда необходимо построить собственный кастомизированный отчет. Удобнее всего такие отчеты строить в Oracle BI. Однако, напрямую читать данные, накапливаемые RTD, невозможно, поскольку они сохраняются в оптимизированном BLOB-формате. Прежде чем использовать эти данные — их нужны выгрузить. Проще говоря, сделать snapshot.
Прежде чем выгружать данные необходимо из каталога RTD_HOME/scripts выполнить следующие команды:
1. Создать пользователя
сreate user snap identified by oracle;
grant connect,resource to snap;
connect snap/oracle
@RTD_HOME/scripts/sql/Oracle/util.sql
2. Создать таблицы
sdexec com.sigmadynamics.tools.SDDBTool.SDDBTool -f -i -I InitSnapshotDb.ctl db_type db_host db_port db_name db_runtime_user db_admin_user db_admin_password
Здесь:
  • db_type — тип базы данных(oracle, mssql, db2)
  • db_host — имя компьютера с базой данных
  • db_port — порт (1521)
  • db_name — SID базы данных
  • db_runtime_user, db_admin_user — пользователи, под которыми создана схема RTD. Для Oracle — это один и тот же пользователь
  • db_admin_password — пароль пользователя со схемой RTD
Как  результат мы получим следующую схему:
model_snapshots_table_diag

После этого необходимо добавить источник данных в OC4J, который будет указывать на этого пользователя
  1. Создаем стандартный JDBC источник данных в сервере приложений
  2. В файле OC4J_HOME/j2ee/home/applications/OracleRTD/ls/WEB-INF/web.xml прописываем источник
    <resource-ref id="jndi_name_LS">
    <res-ref-name>jndi_name</res-ref-name>
    <res-type>javax.sql.DataSource</res-type>
    <res-auth>Container</res-auth>
    <res-sharing-scope>Unshareable</res-sharing-scope> </resource-ref>
  3. В файле OC4J_HOME/j2ee/home/applications/OracleRTD/ls/WEB-INF/web.xml  прописываем ссылку
    <resource-ref-mapping name="jndi_name" location="jndi_name"/>
Далее необходимо зайти в JMX Console и через нее настроить источник данных (MBeans > OracleRTD > SDClusterPropertyManager > Misc > ModelSnapshotDSName) и выполнить операцию экспорта MBeans > OracleRTD > Learning Server > your study name > Complete Snapshot.
После этого к таблицам можно будет обращаться, что писать свои собственные отчеты. Ниже пара примеров:
Посчитать количество событий по каждому choice
select g.display_name     as 'Choice Group', 
       c.display_name     as 'Choice',
       e.name             as 'Event',
      mi.timewindow_start as 'Start',
      mi.timewindow_end   as 'End',
      mi.state            as 'Model Status',
       m.name             as 'Model Name',
      mi.count_total,
      mi.count_positive,
      mi.quality
from RTDApp a 
     inner join RTDStudy s          on s.id=a.study_id
     inner join RTDModel m          on m.study_id=s.id
     inner join RTDModelInstance mi on mi.model_id=m.id
     inner join RTDEvent e          on mi.event_id=e.id
     inner join RTDChoice c         on c.id=mi.choice_id
     inner join RTDChoiceGroup g    on c.choicegroup_id=g.id
where a.name='CrossSell'
order by m.name, 
         g.display_name, 
         c.display_name,
       mi.timewindow_start
counts_by_choice

Top 6 прогнозирующих атрибутов
select a.name                'Attribute Name',
       p.predictiveness      'Predictiveness',
       c.display_name        'Choice Name',
      mi.timewindow_start as 'Start',
      mi.timewindow_end   as 'End',
      mi.state            as 'Model Status'
from RTDApp app
     inner join RTDChoice c         on c.app_id=app.id
     inner join RTDStudy s          on s.id=app.study_id
     inner join RTDModel m          on m.study_id=s.id
     inner join RTDModelInstance mi on mi.model_id=m.id and mi.choice_id=c.id
     inner join RTDEvent e          on mi.event_id=e.id
     inner join RTDPredictiveness p on p.model_instance_id=mi.id
     inner join RTDAttribute a      on a.id=p.attribute_id
where app.name         = 'CrossSell'
  and   c.display_name = 'Credit Protection'
  and   e.name         = 'Purchased'
  and   m.name         = 'OfferAcceptance'
  and   7 > (select count(*) 
             from RTDPredictiveness p2 
             where p2.model_instance_id = p.model_instance_id 
               and p2.predictiveness > p.predictiveness)
order by mi.timewindow_end desc,
          p.predictiveness desc

top_5_most_predictive

вторник, 22 сентября 2015 г.

How to add custom fields to a list format

In Siebel Marketing (7.7.x, 7.8.x, 8.x), the campaign load and list generation processes pass a variety of parameters to the web services available on Analytics ( OBI ) server.
Out of the Box there are some pre-defined report parameters (e.g. campaignName, campaignCode) which can be used in the list format to control column expressions, list format filters and contents of the list header / footer. These parameters are Name Value pairs, which get passed from Siebel Server to Siebel Analytics Web (OBI Presentation services ) along with WriteListFiles SOAP call.

The process can be extended to pass additional Parameters during the WriteListFiles call (the web services API to generate the campaign load or list export file) .
This document describes the process to add custom fields and make them available as 'system data' :


  

SOLUTION

This document describes how to add custom fields to Campaign Load Format.

1. Create custom field ( in case it does not exist ) :

 If the data that needs to be passed to Analytics (OBI) Server is coming for S_SRC extension column, then expose that column in Campaign BusComp. If it is coming for other objects (eg. Program, Segment), then expose that column in the Campaign BusComp using appropriate joins. (If column already exists in the Campaign BC, then ignore this step). Make sure you compile the SRF after these changes.

2. Modify Workflow

In Siebel Tools > Object explorer, select Workflow Process steps and query for “Marketing Campaign Load” workflow process. Revise the latest version using “Revise” button. Note that new record with status = ‘In Progress’ is created, and you will be making changes to this workflow process record
Right click and select Edit Workflow Process menu item. It will bring up workflow process designer. Select “Get List Format System Data” step, and then click “Show Input Arguments” from the right click menu. Note that bottom applet now displays Input arguments for the step :

Create a new record in the bottom applet, and set following properties:
Repeat above step for additional fields that you want to pass over to Marketing Server, and then deploy the workflow.
Once the workflow changes are deployed, you will have to “Activate” the new version using Siebel Client > Administration – Business Processes > Workflow Deployment view
Once you finish above step, next time you run the WriteListFile job (eg. campaign load), You will see these new parameters values in the NameValuePair section of the Marketing Job detail log. The log can be found under site map > Administration – Marketing > Marketing Server Administration > Manage Marketing Jobs.

3. Add the new expression to the List Format Designer expression list.

In the List Format Designer user interface, there is a list of available web expressions provided in the standard product. The list of available expressions is controlled by a set of web message files in the Siebel Analytics Web file system.

There are 2 file types that control the list of web expressions - one for the language independent expression and a translated file for each language. To add a new expression, you need to add a new entry to both the language independent file as well as any languages that you use in production.

The file of language independent expressions is located in:

\install root\SiebelAnalyticsData\Web\Config\marketingwebexpressions.xml  (10g)
<OBI Install Root>\instances\instance1\config\OracleBIPresentationServicesComponent\coreapplication_obips1\marketingwebexpressions.xml (11g)

The translated display name for each expression is indicated in the web expression message file for the selected language. The location is dependent on the installed language(s). For English the file can be found in:

\installroot\D:\SiebelAnalytics\Web\App\Res\l_en\messages\marketingwebexpressionmessages.xml (10g)
<OBI Install Root>\Oracle_BI1\bifoundation\web\msgdb\l_en\messages\marketingwebexpressionmessages.xml (11g)

Note that sub-folder l_en is for English strings only. Other language sub-folders can be found under \installroot\SiebelAnalytics\Web\App\Res (10g) or <OBI Install Root>\Oracle_BI1\bifoundation\web\msgdb

To add the new expression:
- Open \install root\SiebelAnalyticsData\Web\Config\marketingwebexpressions.xml (10g) or <OBI Install Root>\instances\instance1\config\OracleBIPresentationServicesComponent\coreapplication_obips1\marketingwebexpressions.xml (11g)
- Add your new expression to the end of the file using the same XML formatting as the existing entries. Make sure the string you use for the expression name matches what you added to the Business Service.
For example:

<WebExpression name="batchNumber" usequotes="false">
<messageKey>kmsgMktgWebExprBatchNumber</messageKey>
<default>1</default>
</WebExpression>
<WebExpression name="DNISNumber" usequotes="false">
<messageKey>kmsgMktgWebExprDNISNumber</messageKey>
<default></default>
</WebExpression>
<WebExpression name="fileCounter" usequotes="false">
<messageKey>kmsgMktgWebExprFileCounter</messageKey>
<default></default>
</WebExpression>
<WebExpression name="CampaignCreatedBy" usequotes="false">
<messageKey>kmsgMktgWebExprCampaignCreatedBy </messageKey>
<default></default>
</WebExpression> 
</WebExpressions>
Save the XML file.
Open the translation file for the language(s) you are using.

The English file is located in:

\installroot\SiebelAnalytics\Web\App\Res\l_en\messages\marketingwebexpressionmessages.xml (10g) or <OBI Install Root>\Oracle_BI1\bifoundation\web\msgdb\l_en\messages\marketingwebexpressionmessages.xml (11g)


Add the display caption that you want to appear to the user with the English user interface. Add the expression at the end of the file using the same XML syntax. Be sure to reference the ‘messageKey’ you entered in step 2 in the other XML file.

For example:

<WebMessage name="kmsgMktgWebExprSplitDetails">
<TEXT>Split Details</TEXT>
</WebMessage>
<WebMessage name="kmsgMktgWebExprTokenNumber">
<TEXT>Token Number</TEXT>
</WebMessage>
<WebMessage name="kmsgMktgWebExprWaveID">
<TEXT>Wave Id</TEXT>
</WebMessage>
<WebMessage name="kmsgMktgWebExprCampaignCreatedBy">
<TEXT>Campaign Created By Name</TEXT>
</WebMessage> 
</WebMessageTable>
</WebMessageTables>

Save the XML file.

4. Test the new configuration

To test list generation with new parameters do the following:

Create a list format or modify an existing format to use the new expression.

To test if the new expression appears in the pick list in the user interface, go the Column Formula dialog for a column or the List Format Headers/Footers tab and select the System Data link. The new value should appear in the list.

Add the expression to the list format header or column formula. Save the list format.
Associate the list format to a test campaign in the Marketing application in the List Distribution view tab. Generate the list using the button.
Go to Manage Marketing Jobs and locate your recent WriteListFiles job. Click the Details link to view the XML. The new parameter should appear in the NameValuePair section of the XML.



Example of Creating a Lead Load Format

The response list format creates leads from the program flow. It can be stored in the My Data Load Format or Shared Data Load Format folders. This topic gives an example how to create a lead load format based on the Analytics Data Load - Leads sample list format. You can use this feature differently, depending on your business model.
To create a lead load format
  1. Navigate to the Administration - Marketing screen, then the List Formats view, and open the Analytics Data Load - Leads sample list format.
  2. Create new columns and map the column headers to the integration objects, using the following table as a guide.
    Table Heading
    Column Heading
    Column Formula
    Lead
    Id
    'NOID'
    Lead
    Lead Status
    '@{leadStatus}{}'
    Lead
    Treatment Id
    '@{treatmentID}{}'
    Lead
    Description
    '@{description}{}'
    Lead
    Contact Id
    "- Contact Profile"."Contact Id"
    Lead
    Prospect Id
    "- Contact Profile"."Prospect Id"
    Lead
    Account Id
    "- Contact Profile"."Account Id"
    Lead
    Source Id
    '@{campaignID}{}'
    Lead
    Division Owner
    '@{divisionID}{}'
    Lead
    Quality
    '@{leadQuality}{}'
    Lead
    Lead Score
    '@{score}{}'
    Lead
    Primary Partner Id
    '@{partnerID}{}'
    Lead
    Calc Lookback Days
    '@{leadLookbackDays}{}'
    Lead
    Calc Product Id
    '@{productID}{}'
    Lead Product
    Product Id
    '@{productID}{}'
    Lead Position
    Position Id
    '@{positionID}{}'
  3. Add a filter to restrict the query count based on constraining stage wave IDs. For example:
    "Re-qualified against original segment criteria
    "AND ' '@{constrainingStageFlag}{N}'= 'N' OR "Campaign History (Transaction Database)"."Campaign Load Wave Id" IN (@{constrainingWaveID}{'0'})
  4. Set the header and footer to match the object name Mktg Prog Lead Dedup.
  5. Set the Purpose attributes. For example:
    • Purpose: Analytics Data Load
    • Delimited
    • Max# Records: 1000

Example of Creating a Response Load Format

The response list format creates responses from the program flow. It can be stored in the My Data Load Format or Shared Data Load Format folders. This topic gives an example how to create a response load format based on the Analytics Data Load - Responses sample list format. You can use this feature differently, depending on your business model.
To create a response load format
  1. Navigate to the Administration - Marketing screen, then the List Formats view, and open the Analytics Data Load - Responses sample list format.
  2. Create new columns and map the column headers to the integration objects, using the following table as a guide.

    Table Heading
    Column Heading
    Column Formula
    Response
    Id
    'NOID'
    Response
    Response Type
    '@{responseType}{}'
    Response
    Treatment Id
    '@{treatmentID}{}'
    Response
    Description
    '@{description}{}'
    Response
    PR_CON_ID
    "- Contact Profile"."Contact Id"
    Response
    PRSP_CON_ID
    "- Contact Profile"."Prospect Id"
    Response
    ACCNT_ID
    "- Contact Profile"."Account Id"
    Response
    SRC_ID
    '@{campaignID}{}'
    Response
    Response Value
    '@{responseValue}{}'
    Response
    Response Cost
    '@{responseCost}{}'
    Response
    Response Cost Currency Code
    '@{responseCostCurrencyCode}{}'
    Response
    Score
    '@{score}{}'
  3. Add a filter to restrict the query count based on constraining stage wave Ids. For example:
    Re-qualified against original segment criteria
    AND ' '@{constrainingStageFlag}{N}'= 'N' OR "Campaign History (Transaction Database)"."Campaign Load Wave Id" IN (@{constrainingWaveID}{'0'})
  4. Set the header and footer to match the object name "Response."
  5. Set the Purpose attributes. For example:
    • Purpose: Analytics Data Load
    • Delimited
    • Max# Records: 1000
**********************
Мои примечания:

В верхнем заголовке обязательно указать следующее:

# Response



Сайт поддержки Oracle

https://support.oracle.com

Alexander.Baranov@areon.ua
Baranov.1974



Allocation & Control Group Integration

Siebel Marketing presents Allocation and Control Group features.
To create a campaign load format that supports control groups, allocation limits, and stage funneling;

Тригер на создании учасника кампании

create or replace trigger S_CAMP_CON_NEW_REC
  before insert on siebel.S_CAMP_CON 
  for each row
declare
  -- local variables here
begin
  :new.TARGET_NUM := to_number(to_char(sysdate, 'mmddHH24MISS'));

end S_CAMP_CON_NEW_REC;

понедельник, 21 сентября 2015 г.

Запуск Web-сервиса RTD

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:dec="http://www.sigmadynamics.com/schema/services/DecisionService">
   <soapenv:Header>
      <Security xmlns="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
         <UsernameToken xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
            <Username>DENISV</Username>
            <Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">areonareon</Password>
         </UsernameToken>
      </Security>
   </soapenv:Header>
   <soapenv:Body>
      <dec:invoke>
         <dec:is>
            <dec:n>ChoiceBestOffer</dec:n>
         </dec:is>
         <dec:req>
            <dec:sk>
               <dec:k>contactID</dec:k>
               <dec:v>1-2LRH</dec:v>
            </dec:sk>
            <dec:at>
               <dec:k>subjectCall</dec:k>
               <dec:v>Тарифы интернет</dec:v>            
            </dec:at>
            <dec:at>
               <dec:k>channel</dec:k>
               <dec:v>Call</dec:v>            
            </dec:at>
            <dec:ip>ChoiceOffer</dec:ip>
         </dec:req>
      </dec:invoke>
   </soapenv:Body>
</soapenv:Envelope>


<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:dec="http://www.sigmadynamics.com/schema/services/DecisionService">
   <soapenv:Header>
      <Security xmlns="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
         <UsernameToken xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
            <Username>DENISV</Username>
            <Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">areonareon</Password>
         </UsernameToken>
      </Security>
   </soapenv:Header>
   <soapenv:Body>
      <dec:invoke>
         <dec:is>
            <dec:n>ChoiceBestOffer</dec:n>
         </dec:is>
         <dec:req>
            <dec:sk>
               <dec:k>contactID</dec:k>
               <dec:v>1-2LRH</dec:v>
            </dec:sk>
            <dec:at>
               <dec:k>subjectCall</dec:k>
               <dec:v>Тарифы интернет</dec:v>            
            </dec:at>
            <dec:at>
               <dec:k>channel</dec:k>
               <dec:v>Call</dec:v>            
            </dec:at>
            <dec:ip>ActivateInternet1</dec:ip>
         </dec:req>
      </dec:invoke>
   </soapenv:Body>
</soapenv:Envelope>

Службы отправки почты

Для отправки почты через маркетинговые кампании, необходимо, чтобы были запущены следующие службы:


пятница, 18 сентября 2015 г.

"Unable To Sign In" An error occurred during authentication

To refresh the user GUIDs:
  1. Open the NQSConfig.INI file for editing. For information, see "Where are Configuration Files Located?" in Oracle Fusion Middleware System Administrator's Guide for Oracle Business Intelligence Enterprise Edition.
  2. Locate the setting FMW_UPDATE_ROLE_AND_USER_REF_GUIDS = NO and change its value to YES.
  3. Modify the instanceconfig.xml file to instruct Presentation Services to refresh GUIDs on restart. Edit the file and find the following section:
    <Catalog>
       <UpgradeAndExit>false</UpgradeAndExit>
    </Catalog>
    
    Comment out the <UpgradeAndExit> line and add an extra line in this section as in the following example:
    <Catalog>
       <!--UpgradeAndExit>false</UpgradeAndExit-->
       <UpdateAccountGUIDs>UpdateAndExit</UpdateAccountGUIDs>
    </Catalog>
    
  4. Stop and restart the managed processes using the opmnctl command with the parameters stopall and startall. You can use the parameter status to verify process status throughout.
    The following components are involved: Presentation Services, Oracle BI Server, Oracle BI Scheduler, Oracle BI Cluster Controller, and Oracle BI JavaHost.
    For information about using opmnctl commands, see "Using the OPMN command line to Start and Stop Oracle Business Intelligence System Components" in Oracle Fusion Middleware System Administrator's Guide for Oracle Business Intelligence Enterprise Edition.
  5. Edit the NQSConfig.INI file to reset the FMW_UPDATE_ROLE_AND_USER_REF_GUIDS = YES to NO and restart the Oracle BI Servers.
  6. Comment out the line added in Step 3 and remove the commenting from the original line so that it reads as shown in the following example:
    <Catalog>
     
      <UpgradeAndExit>false</UpgradeAndExit>
     
      <!--UpdateAccountGUIDs>UpdateAndExit</UpdateAccountGUIDs-->
    </Catalog>
    
  7. Restart Presentation Services for the instanceconfig.xml file that was updated.
  8. Ensure that Oracle WebLogic Server and the system components are also running. If they are not running, then restart them.
    For information, see "Starting and Stopping the Oracle Business Intelligence Components" in Oracle Fusion Middleware System Administrator's Guide for Oracle Business Intelligence Enterprise Edition.