Oracle - DataVault
Applies to
Platform: Oracle
Architecture: Data Vault
Oracle - DataVault generates a Stage, Raw Vault and Business Vault for an Oracle database as SQL*Plus scripts with PL/SQL loader packages. Select it in Project Settings, where Generator Configuration shows Oracle DataVault, when your Data Vault runs on Oracle. This article lists what the configuration supports and where it differs from Microsoft SQL Server - DataVault.
Business Driving Key Link offers no Foreign Key Mode, Partition Clause or Table Compression on Oracle.
Scope and output
- Platform: Oracle. The configuration is available since Generator 2.0.
- Layers: Source, Stage, Raw Vault and Business Vault. Dataflow Modeling shows Stage in the Bronze column and both vault layers in the Silver column. See Understand the Layering concept.
- Output: one SQL*Plus script per layer, PL/SQL loader packages, the load control scripts and the PowerShell 7 scripts that deploy and load, described in Oracle - Artifacts.
Prerequisites
- One Oracle user for each layer, here Stage, Raw Vault and Business Vault, and one for load control (with Native Load Control). Each user name is also the schema name of its layer.
- PowerShell 7 and SQL*Plus on the machine that deploys.
- The privileges listed in Oracle - Target environment, for example
CREATE DATABASE LINKfor the Stage user. - For model objects imported from a linked project, with Create GRANTs for Imported Objects on: the user name and password of each linked layer's user. The deployment connects as that user to grant the objects.
The placeholders for the users, schemas and connections are listed in Oracle - Placeholder values.
Sources and linked projects
The source system has the type Oracle. Stage views read its tables through a database link or directly, as set in Database Links for Source Systems. To create source model objects from an Oracle schema, see Discover an Oracle database.
You can import a linked project as a source and export this project as a linked project. Create GRANTs for Imported Objects decides whether the deployment grants the imported objects to the layer users.
Supported model objects
Source and Stage
Raw Vault
- Hub
- Link
- Satellite
- Link Satellite
- Multi-Active Satellite
- Same As Link
- Hierarchical Link
- Driving Key Link
- Record Tracking Satellite
- Effectivity Satellite
- Record Tracking Link Satellite
- Effectivity Link Satellite
- Non-Historized Link Satellite
- Non-Historized Satellite (no article yet), since Generator 2.4
- PIT
- Reference Table
- RawVault Composite
- Current View
- History View
Business Vault
- Business Hub
- Business Link
- Business Satellite
- Business Link Satellite
- Same As Business Link
- Hierarchical Business Link
- Business Driving Key Link
- Effectivity Business Satellite
- Record Tracking Business Link Satellite
- Effectivity Business Link Satellite
- Non-Historized Business Link Satellite
- Non-Historized Business Satellite (no article yet), since Generator 2.4
- Business PIT
- BusinessVault Composite
- Business Current View
- Business History View
- Hierarchy Flatten
- Vault Out, since Generator 2.2
Capabilities and limitations
- Names: generated names are unquoted and in capitals. Characters other than letters, digits,
_,$and#become_, and names are cut to 128 characters. - Keys: primary keys are created with
RELYand a unique index, and business keys get a unique constraint. Foreign Key Mode offersNone,Create Disabled(default) andCreate Enforced. - Indexes: the deployment creates a B-tree index on the referencing columns of each relationship, unless the primary key or a unique key has the same columns. Index management offers
B-Tree IndexandBitmap Indexand the option Create as local Index. - Table storage: the partition, compression, tablespace and statistics properties of a model object are described in Partition Clause and table storage (Model Object).
- Wide objects: Hash Group Size splits the row hash of Satellites, Link Satellites, Multi-Active Satellites, Business Satellites, Business Link Satellites and Reference Tables into groups.
- Identity values: identity columns such as
BG_IDareNUMBER GENERATED BY DEFAULT AS IDENTITY. - Grants: each layer grants
ALLwithGRANT OPTIONon its tables and views to the users of the following layers. It grantsEXECUTEon its loader packages to the load-control user. - Loading: LoadControl Options offers
Native Load ControlandAirflow. - Data types: the platform data types
CHAR(CHAR),CHAR(BYTE),VARCHAR2(CHAR)andVARCHAR2(BYTE)write the length semantics, for exampleVARCHAR2(100 CHAR).CHARandVARCHAR2write none, so the database settingNLS_LENGTH_SEMANTICSapplies.TIMESTAMP WITH TIME ZONEwith precision 3 becomesTIMESTAMP(3) WITH TIME ZONE. - Data type validation: a length, precision or scale that does not fit the Oracle data type gets a warning, see Invalid data type configuration (Business Rule). The generator writes the configured value:
VARCHAR2(5000)fails withORA-00910at deployment on a database withMAX_STRING_SIZE = STANDARD.
Project properties
Project Settings shows these properties of the configuration, with their defaults:
- Hash Algorithm:
SHA1; alsoMD5,SHA256,SHA384andSHA512
With SHA256, SHA384 or SHA512, the hash Default Terms stay RAW(20). Set their data type to the result length of the algorithm, see Hash Algorithm.
- Hash Casing:
None; alsoUpperandLower - Hash Concatenation Separator:
_ - Hash Null Placeholder:
_NULL_ - Hash Trim: off
- Begin of Universe:
19000101 - End of Universe:
99991231 - Persist Validity: off
- Behaviour for Nulled Business Keys in Links:
Nulled Business Keys Point to Non-Existing Hub Key - Create Result Views: on
- Target Object Comment Type:
None - Artifact Output Mode:
Layer Composites - Deployment Options:
Generate Drop Table Statements - Configure LoadControl: on
- Deploy LoadControl: on
- LoadControl Options:
Native Load Control; alsoAirflow - Database Links for Source Systems:
Create Database Links - Create GRANTs for Imported Objects: on
Platform differences
The table compares the configuration with Microsoft SQL Server - DataVault of the same release:
| Item | Oracle | Microsoft SQL Server |
|---|---|---|
| Timestamp Default Terms | TIMESTAMP | datetimeoffset |
| Effectivity Default Terms | TIMESTAMP | datetime2 |
| Hash Default Terms | RAW(20) | binary(20) |
| Text Default Terms | VARCHAR2 | nvarchar |
| Number Default Terms | NUMBER | int or bigint |
| Flag Default Terms | NUMBER(1, 0) | bit |
Hash Algorithm values besides SHA1 and MD5 | SHA256, SHA384, SHA512 | SHA2_256 |
| Index types | B-tree, bitmap | rowstore, columnstore |
| Foreign Key Mode on Business Driving Key Link | not available | available |
Database Links for Source Systems, Create GRANTs for Imported Objects, Hash Group Size, Create as local Index and the table storage properties exist only on Oracle. Included Columns of an index exists only on Microsoft SQL Server.
These Default Terms belong to each group; text Default Terms have the same lengths on both platforms:
- Timestamps:
BG_LoadTimestamp,BG_ValidFromTimestamp,BG_ValidToTimestamp,BG_UpdateTimestamp,BG_EffectiveTimestamp,DVPIT_ForeignKey_LoadDate - Effectivity:
BG_Effectivity_Begin,BG_Effectivity_End - Hash keys and row hashes:
Hub_HK,Link_HK,DrivingKeyLink_HK,PIT_HK,DVLINK_ForeignKey_Identity,DVPIT_ForeignKey_Identity,BG_RowHash,BG_RowHashScd1,BG_RowHashScd2 - Text:
BG_SourceSystem,BG_DataflowName,BG_DataflowSetName,BG_ErrorDescription,BG_IncrementLoadStatus - Numbers:
BG_ID,BG_Sequence,BG_ErrorCount,BG_DataQuality_ID - Flags:
BG_IsDeleted,BG_Appearance,BG_MAS_HubDifferenceFound
Example
A Hub common_customer with the business key term CUSTOMER_ID generates this table. In the excerpt, <raw vault schema> and <business vault user> stand for the placeholders of the Raw Vault schema and the Business Vault user, and short lines are joined:
CREATE TABLE <raw vault schema>.RDV_HUB_COMMON_CUSTOMER (
BG_LOADTIMESTAMP TIMESTAMP NOT NULL
,HUB_HK RAW(20) NOT NULL
,BG_SOURCESYSTEM VARCHAR2(255)
,CUSTOMER_ID NUMBER NOT NULL
)
;
ALTER TABLE <raw vault schema>.RDV_HUB_COMMON_CUSTOMER
ADD CONSTRAINT RDV_HUB_COMMON_CUSTOMER_PK PRIMARY KEY (HUB_HK)
RELY
USING INDEX (
CREATE UNIQUE INDEX <raw vault schema>.RDV_HUB_COMMON_CUSTOMER_PK
ON <raw vault schema>.RDV_HUB_COMMON_CUSTOMER (HUB_HK)
);
ALTER TABLE <raw vault schema>.RDV_HUB_COMMON_CUSTOMER
ADD CONSTRAINT RDV_HUB_COMMON_CUSTOMER_UK UNIQUE (CUSTOMER_ID)
USING INDEX (
CREATE UNIQUE INDEX <raw vault schema>.RDV_HUB_COMMON_CUSTOMER_UK
ON <raw vault schema>.RDV_HUB_COMMON_CUSTOMER (CUSTOMER_ID)
);
GRANT ALL ON <raw vault schema>.RDV_HUB_COMMON_CUSTOMER
TO <business vault user> WITH GRANT OPTION;
With Microsoft SQL Server - DataVault, the three Default Terms of this Hub get the types datetimeoffset, binary(20) and nvarchar(255).
Release differences
Project Settings shows the Generator Version of your project.
- Generator 2.0: first release of the configuration.
- Generator 2.2: Vault Out; the project properties Persist Validity, Create Result Views, Hash Casing, Hash Concatenation Separator, Hash Null Placeholder and Hash Trim; the model object properties Increment Management Type and Use Embryo Loader, see Embryo Loader; the platform data types with length semantics and the data type validation; the replacement of characters in generated names. Up to Generator 2.0.1, precision 3 was written as
TIMESTAMP(3 WITH TIME ZONE). - Generator 2.3: the model object properties Hash Group Size and Custom Singleton Values.
- Generator 2.4: Non-Historized Satellite and Non-Historized Business Satellite; the model object property Excluded from Delta Detection.
- Fixes for Oracle are listed in Generators Release - 2.3.0, Generators Release - 2.4.0 and Generators Release - 2.4.1.
Related articles
- Previous:
- Oracle: Target environment
- Next: Generate artifacts, Replace the placeholders in the artifacts
- Reference: Foreign Key Mode (Model Object), Partition Clause and table storage (Model Object), Hash Group Size (Model Object), Database Links for Source Systems (Project), Create GRANTs for Imported Objects (Project), LoadControl Options (Project)
- Oracle: Placeholder values
- See also: Available Generator Configurations, Understand the Generator Configuration, Source Systems per Generator Configurations, Microsoft SQL Server - DataVault
- Oracle: Stage, Data Store, Datamart, DataVault and Mart