VERSION 1
# Data Source created from Pipe 'verifications_monthly_v1'

SCHEMA >
    `workspaceId` String,
    `apiId` String,
    `keyId` String,
    `success` AggregateFunction(countIf, Nullable(UInt8)),
    `rateLimited` AggregateFunction(countIf, Nullable(UInt8)),
    `usageExceeded` AggregateFunction(countIf, Nullable(UInt8)),
    `time` Date

ENGINE "AggregatingMergeTree"
ENGINE_PARTITION_KEY "toYYYYMM(time)"
ENGINE_SORTING_KEY "workspaceId, apiId, keyId, time"
ENGINE_TTL "time + toIntervalDay(365)"
