CREATE TABLE fun_av_metadata_detail (
    AV_ID                           NUMBER(18, 0) ,
    AV_NAME                         VARCHAR2(120)     NOT NULL,
    SOURCE_VIEW_NAME                VARCHAR2(600) ,
    VALUE_SET_ID                    NUMBER(18, 0) ,
    SEGMENT_TYPE_CODE               VARCHAR2(120)     NOT NULL,
    DIMENSION_NAME                  VARCHAR2(600) ,
    DIMENSION_SEQ_NUM               NUMBER(9, 0)  ,
    ATTRIBUTE_DIMENSION_NAME        VARCHAR2(600) ,
    DIMENSION_ATTRIBUTES            CLOB          ,
    DIMENSION_LEVEL_ATTRIBUTES      CLOB          ,
    DIMENSION_LEVEL_DESCRIPTIONS    CLOB          ,
    HIERARCHY_NAME                  VARCHAR2(600) ,
    UI_FLAG                         VARCHAR2(4)   ,
    USER_DEFINED_HIERARCHY_NAME     VARCHAR2(600) ,
    HIERARCHY_ATTRIBUTES            CLOB          ,
    TREE_VERSION_PRIOR_STATE        VARCHAR2(120) ,
    TREE_VERSION_CURRENT_STATE      VARCHAR2(120) ,
    TREE_VERSION_NOMINATION_FLAG    VARCHAR2(4)   ,
    TREE_VERSION_STREAMING_FLAG     VARCHAR2(4)   ,
    TREE_VERSION_START_DATE         DATE          ,
    TREE_VERSION_END_DATE           DATE          ,
    TREE_VERSION_ID                 VARCHAR2(128) ,
    CREATION_DATE                   TIMESTAMP(6)      NOT NULL,
    CREATED_BY                      VARCHAR2(256)     NOT NULL,
    LAST_UPDATE_DATE                TIMESTAMP(6)      NOT NULL,
    LAST_UPDATED_BY                 VARCHAR2(256)     NOT NULL,
    LAST_UPDATE_LOGIN               VARCHAR2(128) ,
    OBJECT_VERSION_NUMBER           NUMBER(9, 0)      NOT NULL,
    SEED_DATA_SOURCE                VARCHAR2(2048),
    ORA_SEED_SET1                   VARCHAR2(4)       NOT NULL,
    ORA_SEED_SET2                   VARCHAR2(4)       NOT NULL,
    AV_ID                           NUMBER(18, 0) ,
    AV_NAME                         VARCHAR2(120)     NOT NULL,
    SOURCE_VIEW_NAME                VARCHAR2(600) ,
    VALUE_SET_ID                    NUMBER(18, 0) ,
    SEGMENT_TYPE_CODE               VARCHAR2(120)     NOT NULL,
    DIMENSION_NAME                  VARCHAR2(600) ,
    DIMENSION_SEQ_NUM               NUMBER(9, 0)  ,
    ATTRIBUTE_DIMENSION_NAME        VARCHAR2(600) ,
    DIMENSION_ATTRIBUTES            CLOB          ,
    HIERARCHY_NAME                  VARCHAR2(600) ,
    UI_FLAG                         VARCHAR2(4)   ,
    USER_DEFINED_HIERARCHY_NAME     VARCHAR2(600) ,
    HIERARCHY_ATTRIBUTES            CLOB          ,
    TREE_VERSION_PRIOR_STATE        VARCHAR2(120) ,
    TREE_VERSION_CURRENT_STATE      VARCHAR2(120) ,
    TREE_VERSION_NOMINATION_FLAG    VARCHAR2(4)   ,
    TREE_VERSION_STREAMING_FLAG     VARCHAR2(4)   ,
    TREE_VERSION_START_DATE         DATE          ,
    TREE_VERSION_END_DATE           DATE          ,
    TREE_VERSION_ID                 VARCHAR2(128) ,
    CREATION_DATE                   TIMESTAMP(6)      NOT NULL,
    CREATED_BY                      VARCHAR2(256)     NOT NULL,
    LAST_UPDATE_DATE                TIMESTAMP(6)      NOT NULL,
    LAST_UPDATED_BY                 VARCHAR2(256)     NOT NULL,
    LAST_UPDATE_LOGIN               VARCHAR2(128) ,
    OBJECT_VERSION_NUMBER           NUMBER(9, 0)      NOT NULL,
    DIMENSION_LEVEL_ATTRIBUTES      CLOB          ,
    DIMENSION_LEVEL_DESCRIPTIONS    CLOB          ,
    SEED_DATA_SOURCE                VARCHAR2(2048),
    ORA_SEED_SET1                   VARCHAR2(4)       NOT NULL,
    ORA_SEED_SET2                   VARCHAR2(4)       NOT NULL,
    CONSTRAINT pk_fun_av_metadata_detail PRIMARY KEY (AV_ID, SOURCE_VIEW_NAME, DIMENSION_NAME, AV_ID, SOURCE_VIEW_NAME, DIMENSION_NAME)
);
