This topic provides a high-level overview of the steps necessary to create a collection.
The procedure assumes that your are creating two collections: Products (with the ProductID standard attribute as its unique property key) and Sales (with the SalesID standard attribute as its unique property key). It also assumes that each source record (when ingested) will have an assignment of either the ProductID attribute (in which case it will belong to the Products collection) or the SalesID attribute (in which case it will belong to the Sales collection).
To create a collection:
<listCollectionsResponse xmlns="http://www.endeca.com/endeca-server/sconfig/3/0"> <collectionRecord collectionKey="Products" displayName="Product data" uniquePropertyKey="ProductID"> <description>Collection of Product information</description> <property key="Locale">US region</property> <collectionAttributes> <collectionAttribute propertyKey="Color"/> <collectionAttribute propertyKey="DealerPrice"/> ... <collectionAttribute propertyKey="Style"/> <collectionAttribute propertyKey="Weight"/> </collectionAttributes> </collectionRecord> <collectionRecord collectionKey="Sales" displayName="Sales data" uniquePropertyKey="SalesID"> <description>Collection of Sales information</description> <property key="Currency">$</property> <collectionAttributes> <collectionAttribute propertyKey="FactSales_CurrencyKey"/> <collectionAttribute propertyKey="FactSales_CustomerPONumber"/> ... <collectionAttribute propertyKey="FactSales_TotalProductCost"/> <collectionAttribute propertyKey="FactSales_UnitPrice"/> </collectionAttributes> </collectionRecord> </listCollectionsResponse>
The listCollectionsResponse shows the two Products and Sales collections that were created in step 3. It also shows that the Dgraph has populated the CDRs with the attributes from records that have an assignment from the unique property key of a collection.