Projections\queries documentation

Hi Guys

I’m trying to get the hang of the product, so far it looks great.

I’m having trouble finding information around projections\queries etc… can someone direct me to some resources describing the topic?

to be more specific, I’m trying to implement a standard use case of:

  1. writing events to a stream (already figured it out)

  2. defining a projection to capture\generate a read model for the stream

  3. query that projection



You are not looking for projections/queries in event store.

You want to look up a catch up subscription (you subscribe and write
to whatever read model you want say one SQL and one graph database)

thanks for the quick reply

I might not have provided the full picture

in my use case, a combination of events with a certain logic means something specific in the application.

I could do it using a subscription, and apply this logic while iterating over the events, but I would rather evaluate this

feature as I understand this is a suitable use case for it.

isn’t that the recommended way of doing that using ES?


While you can use event store projections for a read model, it’s real power lies in repartioning streams. You are better off dealing with read models in something else.

Thanks João

can you point me to some resources regarding projections?


there aren't that many by design (they are officially supported in
4.0). If you explain what it is you are trying to do we can probably
help you. The model is not that difficult and there are some videos
out there covering how it works.

I’m trying to implement a simple CEP scenario:
the app creates multiple sub tasks per one parent task, the app needs to report when the parent task has completed.

I want to listen on the stream and identify the case when the completed\failed subtasks number equals the number

of scheduled sub tasks.

I can see the simple example of projection at:

I’m having trouble finding documentation for complete scenario - creating a new

projection, description of the projection api (available javascript methods when writing a projection)

help will be much appreciated


ok, I’ve found some useful blog posts that got me up and running, I have a different problem now, will open a separate post