Repository containing CoW DAO relevant dune queries.
Please employ standard engineering principles such as divide and conquer, DRY (don't repeat yourself) by creating intermediate queries that can be used for debugging and depended on in upstream queries using Dune's Query Views
For information on writing efficient Dune queries cf. this guide
Queries can be placed in any subfolder (please organize the file structure thoughtfully).
All query file names must be formatted as **/*_{queryId}.sql
.
This will cause continuous integration to automatically update queries in Dune whenever a PR is merged into main.
In order to generate a new queryId
create and save a new query via https://dune.com/queries.
This will turn the url into something like https://dune.com/queries/<some id>
, where the last part is your newly generated query id.
Upon merging your PR into main the content of the Dune query will be overridden by the content of the query file in github.
To update an existing query, simply change the SQL, then create, review and merge the PR. Upon merging the changes will be automatically synced to Dune.
Removing a content file does not automatically archive the query in Dune. If this is desired, please go ahead and remove it manually.
Sqlfluff is run automatically on every PR to ensure queries follow a consistent formatting. See this guide for installing it locally.