What is a Recipe
A Recipe is a document that contains all the information necessary for Quine to execute any batch or streaming data processing task. Recipes are built from components including:
- Ingest Streams to read streaming data from sources and update graph data
- Standing Queries to transform graph data, and to produce aggregates and other outputs
- Cypher expressions to implement graph operations such as querying and updating data
- UI configuration to specialize the web user interface for the use-case that is the subject of the Recipe
Running a Recipe
To run a Recipe, use the Quine command line argument
-r, followed by the name of the Recipe (from https://quine.io/recipes), or a local file (ending in
.yaml), or a URL.
For example use the following command to run the Ethereum Recipe:
❯ java -jar quine.jar -r ethereum
Or to run a Recipe contained in a local file:
❯ java -jar quine.jar -r your-file.yaml
While Quine is running, a web user interface is available at localhost:8080.
Creating a Recipe
A Recipe is a YAML file. The following is a an example Recipe YAML file that can be used as a starting point when building a new Recipe.
# Recipe schema version (currently only supported value is 1; 🎉) version: 1 # Identifies the Recipe but is not necessarily unique or immutable title: Template Recipe # URL to social profile of the person or organization responsible for this Recipe contributor: https://github.com/example-user # Brief copy about this Recipe summary: This is a valid Recipe that ingests and writes back a file # Longer form copy about this Recipe description: |- This Recipe description has multiple lines. # Ingest Streams define how data is processed and transformed ingestStreams: - type: FileIngest path: $in_file format: type: CypherLine query: |- MATCH (n) WHERE id(n) = idFrom($that) SET n.line = $that # Standing Queries define how data is transformed and output. standingQueries: - pattern: type: Cypher query: MATCH (n) RETURN DISTINCT id(n) AS id outputs: output-1: type: CypherQuery query: |- MATCH (n) WHERE id(n) = $that.data.id RETURN n.line andThen: type: WriteToFile path: $out_file # Customize node appearance in web UI. nodeAppearances: [ ] # Add queries to node context menus in web UI quickQueries: [ ] # Customize sample queries listed in web UI sampleQueries: - name: Nodes query: MATCH(n) RETURN n LIMIT 10 - name: Count Nodes query: MATCH (n) RETURN count(n) # Optional Cypher query to be executed and reported to the Recipe user statusQuery: cypherQuery: MATCH (n) RETURN n LIMIT 10
Learn how to create a recipe in the Recipe Tutorial or the Recipe Reference for information about Recipe document content.
How to Contribute a Recipe
Recipes are contributed by creating a pull request (PR) to the Quine git repository. Recipes are stored in the directory