Setting ignored for a Virtual model object (Business Rule)
Applies to
Platform: Microsoft SQL Server · Databricks · Databricks dbt · Fabric Lakehouse · Oracle
This business rule warns when a model object with Implementation Type Virtual has an Optimization Method, an Oracle Partition Clause or a custom index. A virtual model object is a view, so the generator ignores the setting, and generation continues. The rule IDs are ID-31003, ID-33005 and ID-10056.
Messages
Each message names the model object and its type in place of <model object name> and <type>. The Generate Artifacts page lists the messages without the rule ID.
Optimization method on a Virtual model object
The client shows a warning with this text:
Optimization method will be ignored for 'Virtual' model object '<model object name>' of type '<type>'.
On the model object card, point to the warning icon to see this message with the rule ID: Warning ID-31003.
Cause: on Databricks, Databricks dbt and 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
The client shows a warning with this text:
Partition clause will be ignored for 'Virtual' model object '<model object name>' of type '<type>'.
On the model object card, point to the warning icon to see this message with the rule ID: Warning ID-33005.
Cause: on 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.
The optimization method and partition clause rules are available since Generator 2.3.
Index on a Virtual model object
The client shows a warning with this text:
Model object '<model object name>' of type '<type>' has unsupported implementation type 'Virtual' defined because it has indexes. Indexes are only supported when implementation type is not 'Virtual'.
On the model object card, point to the warning icon to see this message with the rule ID: Warning ID-10056.
Cause: the model object has a custom index while Implementation Type is Virtual. Custom indexes exist on Microsoft SQL Server and Oracle.
Fix: delete the index, see Delete an Index, or set Implementation Type to Cached or Permanent where the model object type allows it.
The index rule is available since Generator 2.0.
Check the result
After the fix the warning icon is gone. While the warning is shown, the generated view contains no partitioning, clustering or index.
Example
In a Data Vault project on Oracle, the RawVault Composite load_virtual_rvc is Virtual and gets the Partition Clause PARTITION BY HASH (BG_LoadTimestamp) PARTITIONS 4. The client shows:
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. On Microsoft SQL Server, the Virtual Mart Out cust_index_mo with the index cust_index_mo_ix gives the index message, and the artifacts contain its two views without the index.
Related articles
- Reference: Implementation Type (Model Object), Optimization Method (Model Object), Optimization Method Columns (Model Object), Partition Clause and table storage (Model Object), Add an Index, Delete an Index
- See also: Understand warnings and errors