Creating dimension

create dimension location_DIM
LEVEL REPORT IS (ACTIVITY_COUNTS.REPORT_ID)
LEVEL POST_CODE IS (ACTIVITY_COUNTS.POST_CD)
level district IS (ACTIVITY_COUNTS.DISTRICT_CD)
LEVEL county IS (ACTIVITY_COUNTS.COUNTY_CD)
LEVEL CITY_TOWNSHIP IS (ACTIVITY_COUNTS.city_TWNSHIP_NUM)
HIERARCHY REP_ROLLUP
(REPORT CHILD OF
POST_CODE CHILD OF
DISTRICT CHILD OF
COUNTY CHILD OF
CITY_TOWNSHIP
ATTRIBUTE POST_CODE DETERMINES (activity_counts.POST_DESC)
ATTRIBUTE DISRICT DETERMINES (activity_counts.DISTRICT_desc)
ATTRIBUTE COUNTY DETERMINES (activity_counts.COUNTY_desc)
ATTRIBUTE CITY_TOWNSHIP DETERMINES (activity_counts.CITY_TWNSHIP_DESC);
I followed this example.
CREATE DIMENSION products_dim
LEVEL product IS (products.prod_id)
LEVEL subcategory IS (products.prod_subcategory)
LEVEL category IS (products.prod_category)
HIERARCHY prod_rollup (
product CHILD OF
subcategory CHILD OF
category
ATTRIBUTE product DETERMINES
(products.prod_name, products.prod_desc,
prod_weight_class, prod_unit_of_measure,
prod_pack_size,prod_status, prod_list_price, prod_min_price)
ATTRIBUTE subcategory DETERMINES
(prod_subcategory, prod_subcat_desc)
ATTRIBUTE category DETERMINES
(prod_category, prod_cat_desc);
But I get this error
Error at Command Line:15 Column:12
Error report:
SQL Error: ORA-30342: referenced level is not defined in this dimension
30342. 00000 - "referenced level is not defined in this dimension"
*Cause:    A reference to a level not defined within the dimension was found.
------------------------------Even this one is giving me reference error. The two tables do not have referential integrity constraints
create dimension location
LEVEL REPORT IS (ACTIVITY_COUNTS.REPORT_ID)
LEVEL POST_CODE IS (DISTRICT_COUNTY_POST_CITY.POST_CODE)
level district_code IS (DISTRICT_COUNTY_POST_CITY.DISTRICT_CODE)
LEVEL county_nbr IS (DISTRICT_COUNTY_POST_CITY.COUNTY_NBR)
LEVEL CITY_TOWNSHIP IS (DISTRICT_COUNTY_POST_CITY.city_township_nbr)
HIERARCHY GEOG_ROLLUP
(report CHILD OF
post_CODE CHILD OF
DISTRICT_CODE CHILD OF
COUNTY_NBR CHILD OF
CITY_TOWNSHIP
JOIN KEY (activity_counts.CITY_TWNSHIP_NUM) REFERENCES CITY_TOWNSHIP)
ATTRIBUTE POST_CODE DETERMINES (DISTRICT_COUNTY_POST_CITY.POST_DESC)
ATTRIBUTE DISRICT_CODE DETERMINES (DISTRICT_COUNTY_POST_CITY.DISTRICT_NAME)
ATTRIBUTE COUNTY_NBR DETERMINES (DISTRICT_COUNTY_POST_CITY.COUNTY_NAME)
ATTRIBUTE CITY_TOWNSHIP DETERMINES (DISTRICT_COUNTY_POST_CITY.CITY_TOWNSHIP_NAME);
tried to create this but not getting through got stuck in reference key
CREATE DIMENSION customers_dim
LEVEL customer IS (customers.cust_id)
LEVEL city IS (customers.cust_city)
LEVEL state IS (customers.cust_state_province)
LEVEL country IS (countries.country_id)
LEVEL subregion IS (countries.country_subregion)
LEVEL region IS (countries.country_region)
HIERARCHY geog_rollup (
customer CHILD OF
city CHILD OF
state CHILD OF
country CHILD OF
subregion CHILD OF
region
JOIN KEY (customers.country_id) REFERENCES country
ATTRIBUTE customer DETERMINES
(cust_first_name, cust_last_name, cust_gender,
cust_marital_status, cust_year_of_birth,
cust_income_level, cust_credit_limit)
ATTRIBUTE country DETERMINES (countries.country_name)
;

Using the CWM1 views through Enterprise Manager Dimensions/Lookups must be TABLES, fact tables can be VIEWS
In the CWM2 set up you can utilise VIEWS for all componenets. Furthermore, my data mart has a distributed environment where reference data is physically located in a remote database.
In order to reference the remote tables I have considered database synonyms, but this did not work.
Secondly, we created a number of views containing DBLINKS to the remote database. This works but performance can be poor because the SQL generated by the BI Beans, makes several calls to the complex view to create hierarchies, retrieve selections etc. which can be inefficient.
I think my next steps will be to create Materialized views on the data mart from the remote reference database.
Finally, run the following statement before your CWM2 statements. cwm2_olap_manager.Set_Echo_ON will provide a complete output from your statements rather than just "Procedure Completed Sucessfully"
SET ECHO ON
SET LINESIZE 120
SET PAGESIZE 50
SET SERVEROUTPUT ON
execute cwm2_olap_manager.Set_Echo_ON;

Similar Messages

  • Problem while creating Dimension in AW...

    Hi
    I m facing error while creating the Dimension in AW.
    i have done the following steps.
    1.I have created the AW name "myfirstaw" and i can see the AW in my DB.
    2.I have a DIm table Products.
    3.i have attached the AW using below command
    EXECUTE DBMS_AW.AW_ATTACH('MYFIRSTAW', TRUE);
    4.Atlast i m trying to create dimension using
    execute dbms_awm.create_awdimension ('OMTEST', 'PRODUCTS', 'OMTEST','MYFIRSTAW', 'AW_PROD');
    then i m getting error :
    SQL> execute dbms_awm.create_awdimension ('OMTEST', 'PRODUCTS', 'OMTEST','MYFIRSTAW', 'AW_PROD');
    ERROR Create_AWDimension. ___AW_CREATE_DIMENSION
    The Source Dimension of
    OMTEST.PRODUCTS does not exist.
    BEGIN dbms_awm.create_awdimension ('OMTEST', 'PRODUCTS', 'OMTEST','MYFIRSTAW', 'AW_PROD'); END;
    ERROR at line 1:
    ORA-06510: PL/SQL: unhandled user-defined exception
    ORA-06512: at "OLAPSYS.DBMS_AWM", line 975
    ORA-06512: at line 1
    Anyone knows why it is coming..
    Pls help me to simulate the problem
    Thanks in Advance.
    Regards,
    Anwar

    Hi
    I m facing error while creating the Dimension in AW.
    i have done the following steps.
    1.I have created the AW name "myfirstaw" and i can
    see the AW in my DB.
    2.I have a DIm table Products.
    3.i have attached the AW using below command
    EXECUTE DBMS_AW.AW_ATTACH('MYFIRSTAW', TRUE);
    4.Atlast i m trying to create dimension using
    execute dbms_awm.create_awdimension ('OMTEST',
    'PRODUCTS', 'OMTEST','MYFIRSTAW', 'AW_PROD');
    then i m getting error :
    SQL> execute dbms_awm.create_awdimension ('OMTEST',
    'PRODUCTS', 'OMTEST','MYFIRSTAW', 'AW_PROD');
    ERROR at line 1:
    ORA-06510: PL/SQL: unhandled user-defined exception
    ORA-06512: at "OLAPSYS.DBMS_AWM", line 975
    ORA-06512: at line 1
    Anyone knows why it is coming..
    Pls help me to simulate the problem
    Thanks in Advance.
    Regards,
    AnwarI m also facing the same problem. Has anyone got a solution to this?

  • Is it possible to create dimension roles in AWM?

    Hi,
    Is it possible to create dimension roles in AWM like the way we have in OWB ?
    If yes, please direct on the way to do this.
    Many thanks in advance for your kind inputs.
    Piyush

    I think what you need is to use the ALIAS option that is part of the DEFINE DIMENSION statement
    DEFINE DIMENSION ALIASOF
    The DEFINE DIMENSION ALIASOF command defines a dimension alias for a simple dimension. An alias dimension has the same type and values as its base dimension. Typically, you define an alias dimension when you want to dimension a variable by the same dimension twice.
    Additionally, You can use a LIMIT statement to limit alias dimensions and define variables and relations using an alias dimension. However, you cannot maintain an alias dimension directly; instead you maintain its base dimension using MAINTAIN.
    Syntax
    DEFINE name DIMENSION ALIASOF dimension [TEMP] [AW workspace] [SESSION]
    Arguments
    name
    The name of the object you are defining. For general information about this argument, see the main entry for the DEFINE command.
    DIMENSION ALIASOF
    If you look at this example if provides a great example of how to use this feature:
    http://download.oracle.com/docs/cd/B19306_01/olap.102/b14346/dml_x_decimal006.htm#ABC1485326
    But of course the main issue here is how to generate the standard form metadata required to support this feature and make the dimension alias avaliable and visible within AWM. That is the difficult (and I would say impossible) part of the process since this feature is not supported by the AW XML API (at least I don't think it is, you could check the API docs to see if this is supported). if it is not supported then the management of this feature would all have to be controlled via OLAP DML commands (load dimension members etc) but you would still not be able to include it within a cube definition and then maintain that cube using AW XML API.
    Does that help?
    Keith

  • Unable to create dimensions in schemas that use synonyms

    I have three schemas (s1, s2 and s3) that use synonyms to reference different tables. S1 and S2 have all tables, equally distributed in their schema. S3 is an end user who has just synonyms.
    I tried creating dimensions in any of them, table or view not found error is encountered.
    I created required tables in my schema (user: meka) and I was successfully able to create dimensions. The following command worked in "meka", not any of the three schemas (s1, s2 and s3).
    CREATE DIMENSION country
         level city_id is lu_city.CITY_ID
              level state_id is lu_state.STATE_ID
              level country_id is lu_country.COUNTRY_ID
    hierarchy country_hier (
    city_id CHILD OF
    state_id CHILD OF
    country_id
    JOIN KEY lu_city.STATE_ID references state_id
    JOIN KEY lu_state.COUNTRY_ID references country_id
    ATTRIBUTE city_id DETERMINES (lu_city.CITY_NAME)
    ATTRIBUTE state_id DETERMINES (lu_state.STATE_NAME)
    I tried a few combinations, including specifying fully qualified table names (s1.lu_city.city_id, etc); created views at user S3 tried the same. All of them were unsuccessful. I am using Oracle 11g R2, here is screen shot:
    Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
    With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
    Data Mining and Real Application Testing options
    Q: How can I create a dimension in a schema where tables do not exist. They exist in another schema.
    Edited by: user8967661 on Jan 12, 2010 2:12 PM

    This is resolved.

  • Unable to create dimension in Analytic Workspace manager

    Hi all,
    I am trying to create dimension using Analytic Workspace Manager(AWM) and it throws the following error.
    *"The transaction is not committable: "java.lang.RuntimeException: org.xml.sax.SAXException: Missing XML attribute: Attribute for tag: <Metadata><StandardDimension><Organization><AWPrimaryDimensionOrganization><AttributeOrganization>"*
    Kindly share your comments.
    I am using Oracle 11g r1 client to connect with oracle 11g R2 database.
    Please let me know the steps to create a OLAP cube using AWM
    Regards
    Mukhil

    It sounds like a mismatch between an old version of AWM and a new version of the server. Please try a more recent version of AWM.
    http://www.oracle.com/technetwork/database/options/olap/olap-downloads-098860.html

  • BI Administration Tool - Create Dimension automatically

    I installed Oracle Business Intelligence Standard Edition One Release 10.1.3.2.1 and I'm following "Business Intelligence Standard Edition One Tutorial" ( [Tutorial - section 4.3.5|http://download.oracle.com/docs/cd/E10352_01/doc/bi.1013/e10312/repository.htm#CBAHDGAA] )
    I would set up a dimension automatically from a logical dimension table by means of "BI Administration Tool 10.1.3.2.1". So I follow the steps of this tutorial and even the Administration Guide ([section "Creating Dimensions Automatically" pg 134|http://download.oracle.com/docs/cd/E10415_01/doc/bi.1013/b31770.pdf]) :
    Particularly:
    1)In the Administration Tool, I opened a repository.
    2)In the Business Model and Mapping layer of a repository, right-click a logical table.
    3)From the right-click menu, I should find and choose Create Dimension.
    but on the right-click menu I can't see Create Dimension.
    Could you please suggest me the reason?
    Any ideas will be much appreciated.
    Marco
    Edited by: user1005030 on 21-ago-2011 3.18

    Marco,
    You will not see the option for "Create Dimension" when right-clicking a logical table in the BMM Layer if that logical table is:
    1. Already being used as a dimension (icon with 3 prongs)
    2. Not joined correctly with the Business Model (i.e. Either not joined at all or it is joined as a Fact table and is not acting like a dimension table to the Admin Tool)
    My hunch believes that you have already associated the logical table with a dimension/hierarchy. To run a litmus test, just delete all of the dimensions you have created for the Business Model, then right-click the logical table in question. If you see the "Create Dimension" option then you know what the issue is.
    Let me know if that helps.

  • How to create Dimension group in ATG-endeca ecommerce application

    We have requirement where we have to specify dimensions and their schema from BCC in ATG. Now the problem is we want to dimension groups and we don't see anywhere in documents to create it. Since this dimensions are created through FCM so we are not able to see in /config/pipeline directory but we see only in processing directory. So we don't see any means to create dimension group through dev studio too. Please tell us how we can do it.

    we have to do it through EP interface through BP TMS.
    1. connect EP to SAP system
    2. Configure all the iviews of TMS business package so it can communicate with SAP system (change only SAP system name for all iviews)
    3. Assign the roles to user of EP
    4. run application using TMS

  • Create Dimension in 9i/10g

    Hi all.. Happy New Year 2005.
    Is there a possibility that I can create dimension using normal view or materialized view.
    OEM (both 9i and 10g) only provides the table names in the drop down.
    If I can create how can I?
    thanks in advance.
    Saumen

    I just tried this in 10g 10.1.0.3 with all the latest patches. Looks like OEM can use tables or MVs, but NOT views.
    Maybe you could build a temp table that looks exactly like the view and use that to get the generated SQL to build the dimension, then do a find and replace to change the table name to a view name?
    Let us know if that works!
    Thx,
    Scott

  • Creating dimension and levels

    Hi ,
    I need drilling functionality in reporting...and i have tried few things but its not working...need ur help for the same....
    I have two dimension table
    1>Corporate
    2>Departments
    I need drilling functionality...so that when i click on Corporate i moved to Depatrments...
    I did the following...
    1>Right click on Department Table and selected "create dimension"
    I got the following structure for dimension at this moment...
    DepartmentDim
    DepartmentTotal
    DepartmentDetail
    2>Now i right at "DepartmentDetail" and since i need parent of the Department...i selected Parent Level from the right click menu....
    The structure at this moment is:
    DepartmentDim
    DepartmentTotal
    Corporate.......................................(This is the name i gave in Parent Level Selection)
    DepartmentDetail
    3>I right clicked at "Corporate" and selected Logical Key from the option....
    Thats it....this is what i did....
    and after this in Answers...in column Corporate i selected the Drilllling functionality....but things are not working....
    Need help for the same....
    Even if you can provide me some link or document from where i can find some leads will be helpful...
    Looking forward for help
    Vishal

    I am able to resolve this issue...

  • Create Dimension and Fact Table

    I Am Ramana I am new to OBIEE recently i started.
    CAn any one explain what is Fact table and Dimension table and how Create Dimension and Fact Table

    Ramana, don't open multiple instances of the same question...
    Starting with OBIEE

  • Can I create "Dimension value range" dynamically  from data?

    Hi,
    Can I create "Dimension value range" dynamically  from data?
    Regards

    You need to have a Database Link between two servers. Then you could do execute that statement without any problem. Try to create a database link with the help of
    CREATE DATABASE LINK command. Refer Document for further details

  • Can CWM2 API creating dimensions and cube reference a view

    Can CWM2 API creating dimensions and cube reference a view instead of a table.
    Can the following API reference a view instead of table
    For creating dimensions
    CWM2_OLAP_TABLE_MAP.MAP_DIMTBL_HIERLEVEL
    CWM2_OLAP_TABLE_MAP.MAP_DIMTBL_HIERLEVELATTR
    For creating cubes
    CWM2_OLAP_TABLE_MAP.MAP_FACTTBL_LEVELKEY
    CWM2_OLAP_TABLE_MAP.MAP_FACTTBL_MEASURE

    Hi!
    Yes!
    And I am using views sometimes.
    I am reading at this moment also the following...
    maybe someone can explain me this sentence...
    MULTIPLE FACT TABLES:
    "The CWM2 APIs also support multiple fact tables per cube. In this case, the data
    associated with a given combinations of hierarchies can be stored in a separate fact
    table. All the fact tables associated with a cube must have the same column
    structure."
    I get a fetch error message..'cause of this.
    What does it mean by "the same column
    structure" ???
    ODDS

  • What prerequisites shd be taken while creating dimensions in an mp?

    hi all,
    What are the pre-requisties should be taken while creating dimensions nor creating an multiprovider.
    Can anyone list me out the pre-requisites. and send me some docs if u have to my email id [email protected]
    regds
    thanxs in advance
    hari

    Hi Hari,
       that is completely depend on your Reporting requirement... how  you want to generate your  report.. on which object you want to analyse the report .... that object should be take  in one dimension... based on   that you need to design dimensions.. so, first of all every modelling is   based on complete Report requirement..
       Multiprovider means.. it just  provide union operation only.. so,  what are the  fields you want  .. those fileds   only you can take from sources and based on your reporting requirement you can create   dimensions..
    regards
    @jay

  • Do i need to create dimensions on mp using only ods?

    hi all,
    Do i need to create dimensions for multi provider where in all my info providers are only from ods?
    thanxs
    haritha

    Hello Haritha
    Please have a look on following case
    create MP and assign Inbfocube..whatever dimensions are there in cube will be assigned to MP and it will be using the same dmensions as cube while reading dat afor reporting;
    Now if you add an ODS, ODS don't have dimensions so no extra dimension will be added to MP but if you feel that some ODS characteristic are there which u can place in existing dimension than you can create extra dimension and assign ODS characteristic in that...
    Dimensioning always improves performence so use maximun dimensions...if characeristic are differenr from one another..
    Thanks
    Tripple k

  • Create Dimension Problem

    Hi Friends: i am a student and doing project on warehousing. i have problem in creating dimension.
    the problem is
    i have the follwing attributes of a dimension.
    id
    first name
    last name
    DOB
    ph#
    temp address
    perm address
    father name etc
    so my question is
    what are the levels of my dimension?
    what are the level attributes?
    at level attribute dialogue box it show a id attribute i think that is uinque but i want to ask whts the purpose of this id. lets i have a column src_id in my source table
    should i map this column with this attribute or should i crate a new column targ_id and map source column with this targ clmn. if i do this maping so whats the purpose of uk id. what should do with it/
    what are the hierarchy of this dim?
    what are the hierarchy levels .
    please help me. i could get from documentation. i shall be thankfull to you for this kind.
    source table target dim
    id uk_id(uk)
    name dim_id(created myself)
    should i map id with uk_id or dim_id if i map with dim_id so whts the purpose of uk_id. what will happen, whats the role of this uk_id.

    You are getting duplicate names. YOu need to prefix or suffix (or sql concatinate) to make the members unique. in the record 1 example you might want the outpout to look like
    Product line 1 Group 2 subgroup 3 Product family 10 product 10 sku 171
    Of course I used full names to make it undersatandable, some would use one, two or three letter abrevaitions.

Maybe you are looking for