DimensionTabler
Builds dimension tables with configurable/variable grainularity. Keeps those tables up-to-date. This makes reporting queries performant and doable. I use it with grafana.
Btw: this is a bad “denglish” name, suggest a better one.
I’m interested, some details please
Let’s do an example. We do gather tickers for a bunch of cryptocurrencies. We do that every minute for the top 10 currencies. This makes 864k lines per day.
Now we want to show them on a graph using grafana - great this works. later we join more and more information into this graph (e.g. balance we hold on each coin), the query gets slower and slower, and finally times out.
Here DimensionTabler jumps in. We want to be able to see long term ticker graphs, and we want to be able to see short term graphs in more detail. Let’s put this in a table:
Ticker date |
granularity |
original count |
dim.table count |
reduced to % |
|---|---|---|---|---|
last 24 hours |
every ticker value |
every minute = 1,440 |
1,440 |
0% |
last 7 days |
15 minutes |
(6 days) = +8,640 |
/15’ = +576 |
20% |
last 30 days |
1 hour |
+33,120 |
+552 |
5.9% |
last 90 days |
4 hours |
+86,400 |
+360 |
2.3% |
before 90 days: |
||||
… stat for 1 year |
1 day |
+396,000 |
+275 |
0.6% |
… for another 9 years |
1 day |
+4,730,400 |
+3,285 |
0.1% |
So for 10 years our graph sql result counts 6,488 lines, the unfiltered result has 5,256,000 lines. Just by ignoring really unneded detail. DimensionTabler keeps this up-to-date and applies given rules.
Usage
See Example.py
Donate
Support me with bitcoins:
Imgur
1MiToswzMsrhQEfmZbLQT8PHC68E5JhJzh
Thanks.
Metadata
Release files for DimensionTabler 0.1.6
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| DimensionTabler-0.1.6.tar.gz | 39.3 kB | Without provenance | Details for DimensionTabler-0.1.6.tar.gz |
Release files / DimensionTabler-0.1.6.tar.gz
| Download URL | DimensionTabler-0.1.6.tar.gz |
|---|---|
| Size | 39.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7e86f2eb1e894df4efd7cfbc97bac1efdf0ffce207f8c04ce645a6540e73f8a9
|
|
BLAKE2b-256 checksum How to use checksums |
f2dd979d3f6d8e58e06cade1499aa3dcb38ed71ae5bf2d95c942caf397fad14a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for DimensionTabler 0.1.6
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.