These cookies provide us with information on how our websites are being used, to help us improve the quality and relevance of content we place on them. Additionally, they also allow us to show you embedded videos and remember your preferences and actions, so that the websites do not bother you with the same request repeatedly (e.g. filling a form to download a PDF file and provide feedback about such actions to our affiliated entities).
You are viewing our older product's guide. Click here for the documentation of GoodData Cloud, our latest and most advanced product.
Creating a New Projection with CREATE PROJECTION Command
Create a new projection using the CREATE PROJECTION command:
In this command, you can define the list of columns included in the projection, optionally with encoding information. You can specify the sort criteria as a SELECT query in the ORDER BY clause.
Unlike a materialized view, a projection is intended to hold the raw table data. For this reason, the SELECT queries in projection definitions cannot include complex transformations, aggregations, or analytic functions.
You can omit the KSAFE parameter or specify it without a value. In this case, the projection is created with the current system level of K-safety. Unsafe projections are not permitted.
For every projection created using the CREATE PROJECTION command, one of the following must be true:
- The projection is replicated (by specifying UNSEGMENTED ALL NODES).
- The projection is segmented and created with KSAFE 1 or higher.
Example:
When you create a projection, the anchor table is automatically refreshed, and the projection gets updated.