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

Select data: Allow only some OR deny some #27

Open
Hurevincent opened this issue Sep 2, 2023 · 8 comments · Fixed by #32 · May be fixed by #66
Open

Select data: Allow only some OR deny some #27

Hurevincent opened this issue Sep 2, 2023 · 8 comments · Fixed by #32 · May be fixed by #66

Comments

@Hurevincent
Copy link

How is it possible to write in database only selected item?
For exemple , I want to store in the database only SOG, because actualy the plugin send|all the data avalaible in signalk server.

@tkurki
Copy link
Owner

tkurki commented Sep 3, 2023

That is not yet possible. I plan to add that over the coming winter, unless someone beats me to it.

@Hurevincent
Copy link
Author

Hurevincent commented Sep 4, 2023 via email

@Krecik7
Copy link

Krecik7 commented Aug 18, 2024

Is it possible to back with this problem ? Like it was in Influx1 plugin
Ignore All
Send only selected manually pathes.

This option which is now - 'ignore with regexp', i do have to try build one big regexp query:
^(?!electrical|environment).*$ to exclude this pathes from excluded list, when we need only - i.e - 20 pathes to be sent do influx2, from 300 that we have in system, to save a/ space, b/ lifetime of sd card. then 'allow' list would be much better -)

What do you think ?

@tkurki
Copy link
Owner

tkurki commented Aug 18, 2024

Certainly doable

@tkurki tkurki reopened this Aug 18, 2024
@scurvy-dog
Copy link

@tkurki can we document which is applied first sources or path filtering? Second as an interim I used a regex to create a whitelist. My guess is that filters are applied in sequential order so it's not easy to do complex whitelist filtering. It might be good to add some regex examples into the repo of known working examples.

Filter All Sources Except 0.35 & 0.42
To match all strings except one that starts with "0.35" or "0.42":^(?!(0.35|0.42)).*$

@tkurki
Copy link
Owner

tkurki commented Sep 17, 2024

@scurvy-dog an incoming datum is ignored (not written) if the path matches an ignored path OR the source matches an ignored source. It does not matter which is applied first. Or am I missing something here?

Regular expressions are such a complex subject that I am not especially keen to start documenting them. If you can provide a documentation snippet with examples that you'd want to add please do so, I am not strictly against it. But please open another issue, as this is a bit separate from this issue.

btw you can have chatgpt write regexps for you, translating from english to regexp. It will even include an explanation of how it works!

@tkurki tkurki changed the title Select data Select data: Allow only some OR deny some Sep 17, 2024
tkurki added a commit that referenced this issue Sep 17, 2024
Add more flexible filteringRules so that you can use both
allow and ignore logic in determining what should or should not
be written to the database.

Fixes #27.
@tkurki tkurki linked a pull request Sep 17, 2024 that will close this issue
@tkurki
Copy link
Owner

tkurki commented Sep 17, 2024

Please see and comment on #66, where I am addressing the need to pick some paths in addition to not writing some.

tkurki added a commit that referenced this issue Sep 18, 2024
Add more flexible filteringRules so that you can use both
allow and ignore logic in determining what should or should not
be written to the database.

Fixes #27.
tkurki added a commit that referenced this issue Sep 18, 2024
Add more flexible filteringRules so that you can use both
allow and ignore logic in determining what should or should not
be written to the database.

Fixes #27.
tkurki added a commit that referenced this issue Nov 4, 2024
Add more flexible filteringRules so that you can use both
allow and ignore logic in determining what should or should not
be written to the database.

Fixes #27.
@tkurki
Copy link
Owner

tkurki commented Nov 4, 2024

No comments? You asked for it, but nobody shows an interest for the feature now?

tkurki added a commit that referenced this issue Nov 4, 2024
Add more flexible filteringRules so that you can use both
allow and ignore logic in determining what should or should not
be written to the database.

Fixes #27.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants