Section 11 - Create a DataBlock Collection using IntelliJ
Go back to Getting started guide
In this section we will:
-
we will show how to create a
DataBlock_Collection
to include all customers inCUSTOMER
schema that are younger than 45 years old.Description Config Reference -
When a new schema is created, for example
CUSTOMER
the platform implicitly creates an associated collection calledCUSTOMER_ALL
that includes all data (Datablocks
) in the specific schema. - See below how we can create a collection to hold all the customers that are under 45 years old.
Datablock Collection using the UI
Create <45 year old customers collection
via the UI
TODO
Datablock Collection using Intellij
Create <45 year old customers collection
using IntelliJ
- Start by creating a file called
CUSTOMERS_YOUNGER_45_0.xml
and copy and paste the config below in the new file. - Replace
DATABLOCK_COLLECTION_NAME
with `CUSTOMERS_YOUNGER_45. - Replace
#GRV{}
with#GRV{ return ( CTX['AGE'] < 45) }
. -
Replace
SCHEMA_NAME
withCUSTOMER
.1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
<?xml version="1.0" encoding="UTF-8"?> <apiroConf version="1" xmlns="http://apiro.com/apiro/v1/root"> <loadOrder>10</loadOrder> <dataBlockCollectFilters> <dataBlockCollectFilter name="DATABLOCK_COLLECTION_NAME" definition="GEN_EXPRESS" > <description/> <config> <![CDATA[ #GRV{} ]]> </config> <abstract>false</abstract> <inheritable>true</inheritable> <execPredicate>#GRV{ true }</execPredicate> <schema>SCHEMA_NAME</schema> </dataBlockCollectFilter> </dataBlockCollectFilters> </apiroConf>
-
See below the completed configuration file and follow the config deployment instructions at the bottom of this page.
Configuration files
Completed configuration files
- This is the completed Datablock collection that can be included in any Distribution.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
<?xml version="1.0" encoding="UTF-8"?> <apiroConf version="1" xmlns="http://apiro.com/apiro/v1/root"> <loadOrder>10</loadOrder> <dataSinks/> <dataBlockCollectFilters> <dataBlockCollectFilter name="CUSTOMERS_YOUNGER_45_0" definition="GEN_EXPRESS" > <description/> <config> <![CDATA[ #GRV{ return ( CTX['AGE'] < 45) } ]]> </config> <abstract>false</abstract> <inheritable>true</inheritable> <execPredicate>#GRV{ true }</execPredicate> <schema>CUSTOMERS</schema> </dataBlockCollectFilter> </dataBlockCollectFilters> </apiroConf>
Deploy config files
Follow these steps Config Deployment to deploy and start using your configuration files.