Module: ElasticGraph::Warehouse::SchemaDefinition::IndexExtension
- Defined in:
- elasticgraph-warehouse/lib/elastic_graph/warehouse/schema_definition/index_extension.rb
Overview
Extends SchemaDefinition::Indexing::Index to add warehouse table definition support.
Instance Attribute Summary collapse
-
#warehouse_table_def ⇒ WarehouseTable?
readonly
Returns the warehouse table definition for this index, if one has been defined via #warehouse_table.
Instance Method Summary collapse
-
#exclude_from_warehouse ⇒ void
Excludes this index from the data warehouse configuration.
-
#warehouse_table(name) ⇒ void
Defines a warehouse table for this index with a custom name.
Instance Attribute Details
#warehouse_table_def ⇒ WarehouseTable? (readonly)
Returns the warehouse table definition for this index, if one has been defined via #warehouse_table.
20 21 22 |
# File 'elasticgraph-warehouse/lib/elastic_graph/warehouse/schema_definition/index_extension.rb', line 20 def warehouse_table_def @warehouse_table_def end |
Instance Method Details
#exclude_from_warehouse ⇒ void
This method returns an undefined value.
Excludes this index from the data warehouse configuration. This is useful when you have an index but don't want it to be included in the data warehouse.
63 64 65 |
# File 'elasticgraph-warehouse/lib/elastic_graph/warehouse/schema_definition/index_extension.rb', line 63 def exclude_from_warehouse @warehouse_table_def = nil end |
#warehouse_table(name) ⇒ void
This method returns an undefined value.
Defines a warehouse table for this index with a custom name.
By default, a warehouse table is automatically created with the same name as the index. Use this method only when you need a different table name than the index name. To exclude an index from the warehouse entirely, use #exclude_from_warehouse instead.
43 44 45 |
# File 'elasticgraph-warehouse/lib/elastic_graph/warehouse/schema_definition/index_extension.rb', line 43 def warehouse_table(name) @warehouse_table_def = WarehouseTable.new(name: name, index: self) end |