Setting ignored for a Virtual model object (Business Rule)
Applies to
Platform: Databricks · Databricks dbt · Fabric Lakehouse · Oracle
This business rule warns when a model object with Implementation Type Virtual has an Optimization Method or an Oracle Partition Clause. A virtual model object is a view, so the generator ignores the setting. Remove the setting or choose another Implementation Type.
Messages
Optimization method on a Virtual model object
Message: Optimization method will be ignored for 'Virtual' model object '<model object name>' of type '<type>'.
Cause: warning ID-31003 (Databricks, Databricks dbt, Fabric Lakehouse). Optimization Method is Partitioned By or Cluster By while Implementation Type is Virtual.
Fix: clear Optimization Method and Optimization Method Columns, or set Implementation Type to Cached or Permanent where the model object type allows it.
Partition clause on a Virtual model object
Message: Partition clause will be ignored for 'Virtual' model object '<model object name>' of type '<type>'.
Cause: warning ID-33005 (Oracle). The model object has a Partition Clause while Implementation Type is Virtual.
Fix: clear the Partition Clause, or set Implementation Type to Cached or Permanent where the model object type allows it.
Available since Generator 2.3.
Check the result
After the fix the warning is gone. While the warning is shown, the generated view contains no partitioning or clustering.
Example
The RawVault Composite load_virtual_rvc of the Oracle Data Vault Test Project is Virtual and gets the Partition Clause PARTITION BY HASH (BG_LoadTimestamp) PARTITIONS 4. Generation reports:
Partition clause will be ignored for 'Virtual' model object 'load_virtual_rvc' of type 'RawVault Composite'.
The artifacts contain the view of load_virtual_rvc without the clause. On Databricks the same model object with an Optimization Method gives the Optimization Method message, and its view has no PARTITIONED BY or CLUSTER BY.
Related articles
- Reference: Implementation Type (Model Object), Optimization Method (Model Object), Optimization Method Columns (Model Object)
- See also: Understand warnings and errors