Use Namespacing for Organizing Data
Last updated
Last updated
Much like relational databases, DeltaStream uses Databases and namespaces for logically organizing data, regardless of the Data Store in which the data resides.
You can use this logical separation to namespace Query statements based on the scope of the query and what stores are involved. This is of particular value when your stores are accessible by more than one team and you require collaboration on the data.
All DeltaStream objects are hosted in a database and namespace. Here's how to use this framework to organize your data:
In addition to Create Data Stores for Streaming Data, you must also create a database to process data. To do this:
In the lefthand navigation, click Workspace ( ). Then, to the right of Database, click +, and then Database.
At the prompt, enter a unique name for the database and then click Add.
The new database displays in the Database list of available databases.
You can use namespaces to further organize objects within a database. This makes it possible to manage complex projects.
Here's an example: refining your pageviews
events before you share them with your business analytics team for further analysis.
Aggregate the page visits for each user and write that into a my-db.analytics.user_visits
stream:
Write this into the analytics team’s public namespace in the analytics-db
, analytics-ds.public.user_visit_location
:
Using databases and namespaces, you can reduce clutter in the analytics-db
. To do this:
Refine the necessary data in the my-db
database.
Use the refinement to push an enriched set of records to the public
namespace of the analytics-db
.
Tip This namespacing approach enables you to organize where to write data into and where it resides, while also ensuring the right consumer can access it across your company.
Use the new page_visits
stream and enrich it with the user’s latest location for a full picture on how your users are visiting pages on your website.
Here, you're using your users’ object to get the location information.