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

Feature request: Cloudant package, changes feed: add filtering parameters #68

Closed
markusthoemmes opened this issue Mar 10, 2017 · 2 comments

Comments

@markusthoemmes
Copy link
Contributor

@bseyb commented on Wed Oct 19 2016

Why

I was trying to listen to changes of a cloudant feed and then send an email using sendgrid, when one flag 'process' was set to true.
For this I needed to implement one openwhisk action to filter out whether 'process' was set to true and 'mailsend' set to false.

Suggestion

Looking at the documentation of cloudant I saw that you can add add filter and doc_ids to a changefeed. It would be very awesome to add these parameters, so that filtering can already be taken care of at the change feed instead of the user created action.

Bonus

I also saw that you can pass oldDoc as a parameter. This could be helpful if you want to compare what exactly changed in an action.


@csantanapr commented on Thu Nov 24 2016

Hi @bseyb I started looking into the design on providing a way to filter changes for the cloudant trigger.

Looking at the spec of the changes API

It looks like a filter and docs_id is doable, a filter will be a filter function on a design document.

What I didn't find was oldDoc during my testing the changes feed only provide the id and deleted=true and the new revision marked as deleted.

I was not able to find a reference to oldDoc in the changes API params.
Could you share a bit more where you saw this reference?


@bseyb commented on Tue Dec 13 2016

Hi @csantanapr I must have misread it, I cannot find oldDoc in the correct context either.

Having that Filter function available would help a whole lot.


@rabbah commented on Tue Jan 24 2017

@csantanapr move this to openwhisk-catalog-cloudant? FYI @johnsolm @dubeejw.

@jasonpet
Copy link
Contributor

@csantanapr - this is complete.

@csantanapr
Copy link
Member

Thanks @jasonpet for the contribution
@bseyb go ahead and give filter a try

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

3 participants