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

enhancement: saved filters #828

Merged
merged 1 commit into from
Jun 26, 2024

Conversation

nikhilsinhaparseable
Copy link
Contributor

@nikhilsinhaparseable nikhilsinhaparseable commented Jun 25, 2024

updated json for filters with sql -
{
"version": "v1",
"stream_name": "mystream",
"filter_name": "My Filter",
"filter_id": "12345r",
"query": {
"filter_type": "sql",
"filter_query": "SELECT * FROM mystream WHERE datetime = '2019-01-01T00:00:00Z' OR datetime = '2019-01-02T00:00:00Z' AND datetime = '2019-01-03T00:00:00Z'"
},

"time_filter": {
    "from": "<utc-timestamp>",
    "to":  "<utc-timestamp>"
}

}

updated json for filters with builder -
{
"version": "v1",
"stream_name": "mystream",
"filter_name": "My Filter",
"filter_id": "12345r",
"query": {
"filter_type": "builder",
"filter_builder": {
"id": "root",
"combinator": "or",
"rules": [
{
"id": "ruleset-K8MABA",
"combinator": "or",
"rules": [
{
"id": "rule-BUt9yY",
"field": "datetime",
"value": "asadadsdsad",
"operator": "="
},
{
"id": "rule-zC7EF9",
"field": "datetime",
"value": "ssasassasas",
"operator": "="
}
]
},
{
"id": "ruleset-UwqIcb",
"combinator": "and",
"rules": [
{
"id": "rule-tXgB5C",
"field": "datetime",
"value": "aasasass",
"operator": "="
}
]
}
]
}
},
"time_filter": {
"from": "",
"to": ""
}

}

updated json for filters with sql -
{
    "version": "v1",
    "stream_name": "mystream",
    "filter_name": "My Filter",
    "filter_id": "12345r",
    "query": {
        "filter_type": "sql",
        "filter_query": "SELECT * FROM mystream WHERE datetime = '2019-01-01T00:00:00Z' OR datetime = '2019-01-02T00:00:00Z' AND datetime = '2019-01-03T00:00:00Z'"
    },

    "time_filter": {
        "from": "<utc-timestamp>",
        "to":  "<utc-timestamp>"
    }

}

updated json for filters with builder -
{
    "version": "v1",
    "stream_name": "mystream",
    "filter_name": "My Filter",
    "filter_id": "12345r",
    "query": {
        "filter_type": "builder",
        "filter_builder": {
            "id": "root",
            "combinator": "or",
            "rules": [
                {
                    "id": "ruleset-K8MABA",
                    "combinator": "or",
                    "rules": [
                        {
                            "id": "rule-BUt9yY",
                            "field": "datetime",
                            "value": "asadadsdsad",
                            "operator": "="
                        },
                        {
                            "id": "rule-zC7EF9",
                            "field": "datetime",
                            "value": "ssasassasas",
                            "operator": "="
                        }
                    ]
                },
                {
                    "id": "ruleset-UwqIcb",
                    "combinator": "and",
                    "rules": [
                        {
                            "id": "rule-tXgB5C",
                            "field": "datetime",
                            "value": "aasasass",
                            "operator": "="
                        }
                    ]
                }
            ]
        }
    },
    "time_filter": {
        "from": "<utc-timestamp>",
        "to":  "<utc-timestamp>"
    }

}
@nitisht nitisht merged commit 4c0d2a8 into parseablehq:main Jun 26, 2024
7 checks passed
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

Successfully merging this pull request may close these issues.

2 participants