factcat
Product analytics on the event model already in your warehouse. Your grain, your periods, your definitions.
Every other product analytics tool hard-codes entity = user, period = a calendar bucket,
and retained = did any event. Real definitions violate all three:
from factcat import RetentionSpec, retention_sql
spec = RetentionSpec(
table="analytics.fct_subscription_payments",
entity="subscription_id", # not the user
entity_time="sub_start",
event_time="paid_at",
period_days=35, # a billing cycle plus dunning, not a calendar bucket
n_periods=12,
retained="status = 'collected' AND within_period_offset <= 5",
)
print(retention_sql(spec, dialect="snowflake"))
retained is arbitrary SQL over any column in your table, plus the derived columns
offset_days, period_index and within_period_offset.
Generates SQL and queries in place. No SDK, no ingestion, no copy of your data. Supports DuckDB, Postgres, BigQuery, Snowflake, Databricks, Spark, Trino, Presto, ClickHouse and Redshift.
Full documentation: https://github.com/gordonkjlee/factcat
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file factcat-0.1.0.tar.gz.
File metadata
- Download URL: factcat-0.1.0.tar.gz
- Upload date:
- Size: 10.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5aff6b3d7ecab7606a5fc88136c6777b0014c779188cec91be9032f2e29a9cc6
|
|
| MD5 |
ab130eca9585e09d71b0cac1a5f2bce8
|
|
| BLAKE2b-256 |
9245a304f5a1e5aa3d92934c7370d7d7179af02ea1dff4a6bd78cadcfbf5766e
|
Provenance
The following attestation bundles were made for factcat-0.1.0.tar.gz:
Publisher:
publish.yml on gordonkjlee/factcat
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
factcat-0.1.0.tar.gz -
Subject digest:
5aff6b3d7ecab7606a5fc88136c6777b0014c779188cec91be9032f2e29a9cc6 - Sigstore transparency entry: 2616258361
- Sigstore integration time:
-
Permalink:
gordonkjlee/factcat@06d0e617af8c279071738b74df0ee231eca512b1 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/gordonkjlee
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@06d0e617af8c279071738b74df0ee231eca512b1 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file factcat-0.1.0-py3-none-any.whl.
File metadata
- Download URL: factcat-0.1.0-py3-none-any.whl
- Upload date:
- Size: 9.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b7a1f5b7145d7306fb0ebbba1338e781c85871f8db66208954bb1cc22d6541f0
|
|
| MD5 |
9e8b81937daf434ca557022db1cae62c
|
|
| BLAKE2b-256 |
214b94cf3489febd98f2fe7da8d5125abb3e2b32b2411abb46453ae8ed306539
|
Provenance
The following attestation bundles were made for factcat-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on gordonkjlee/factcat
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
factcat-0.1.0-py3-none-any.whl -
Subject digest:
b7a1f5b7145d7306fb0ebbba1338e781c85871f8db66208954bb1cc22d6541f0 - Sigstore transparency entry: 2616259642
- Sigstore integration time:
-
Permalink:
gordonkjlee/factcat@06d0e617af8c279071738b74df0ee231eca512b1 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/gordonkjlee
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@06d0e617af8c279071738b74df0ee231eca512b1 -
Trigger Event:
workflow_dispatch
-
Statement type: