# Built-in storages

Storage classes implement result log storage and deduplication.

SnowKill checks may run every minute, but normally you want to receive notifications about one query only once. In order to receive notifications only once, the state should be stored somewhere.

Example usage:

```python
snowkill_storage = SnowflakeTableStorage(connection, getenv("SNOWFLAKE_TARGET_TABLE"))
check_results = snowkill_storage.store_and_remove_duplicate(check_results)
```

### Usage notes

Currently all storage classes share the same interface with only one function - `store_and_remove_duplicate`. This is how it works internally:

* Accept list of [CheckResults](https://docs.snowkill.net/reference/check-result);
* Compare each CheckResult with existing data in storage, remove duplicates;
* Store new CheckResults, which includes either results for brand new queries or for existing queries, but with higher [check result level](https://docs.snowkill.net/implementation-details/check-result-levels);
* Return list of newly stored CheckResults;

The returned CheckResults are normally used to send notifications.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.snowkill.net/storage/built-in-storages.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
