Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Passthrough Time Grain option #7

Open
chris-nolan opened this issue Oct 16, 2023 · 1 comment
Open

Passthrough Time Grain option #7

chris-nolan opened this issue Oct 16, 2023 · 1 comment

Comments

@chris-nolan
Copy link

I've noticed a few superset integration are now providing, what I believe to be, a passthrough option for time grain e.g. https://github.com/apache/superset/blob/8c6bd4ef047b1914b7e3023d6b559b4bdae13b65/superset/db_engine_specs/clickhouse.py#L58

Would it be possible to provide this for QuestDB. We have data at 0.2s intervals that we don't particularly want to aggregate.

@marregui
Copy link
Contributor

marregui commented Nov 3, 2023

these are the time grain expressions in questdb-connect:

 _time_grain_expressions = {
        None: "{col}",
        "PT1S": "DATE_TRUNC('second', {col})",
        "PT1M": "DATE_TRUNC('minute', {col})",
        "PT1H": "DATE_TRUNC('hour', {col})",
        "P1D": "DATE_TRUNC('day', {col})",
        "P1W": "DATE_TRUNC('week', {col})",
        "P1M": "DATE_TRUNC('month', {col})",
        "P1Y": "DATE_TRUNC('year', {col})",
        "P3M": "DATE_TRUNC('quarter', {col})",
    }

are we missing something?

I can extend the above list if you provide:

thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants