[🕹️] Filter document analytics by link and views
What side quest or challenge are you solving?
In each document, we have aggregated document analytics and in order to better understand the analytics, we want to filter it.
- filter by link
- filter by view
- exclude link(s)
- exclude view(s)
- filter by viewer (i.e. email)
Considerations
Please use url query params or the url query framework nuqs for controlling the state in the url for each filter. This way we always know what we are filtering on.
We already have some functions and pipes in Tinybird that retrieve the relevant data for a set of viewIds
https://github.com/mfts/papermark/blob/832b432e234b52f1c42d29f5afa92ff9db48256b/lib/tinybird/pipes.ts#L64-L73
and the corresponding Tinybird pipe: https://github.com/mfts/papermark/blob/832b432e234b52f1c42d29f5afa92ff9db48256b/lib/tinybird/endpoints/get_document_duration_per_viewer.pipe
Inspiration:
I'm thinking about google flight search where the airlines filter has a toggle for all, only one, or checkbox to (de)select multiple airlines
Please only serious PRs. This will likely take some experimenting, you need to create a tinybird account in order to fully test the implementation yourself.
Points
1500 Points
Provide proof that you've completed the task
Open a PR with working code to the solution, detailed explanation what you did and ideally a video of the working solution.
/assign
Assigned to @RajuGangitla! Please open a draft PR linking this issue within 48h ⚠️ If we can't detect a PR from you linking this issue in 48h, you'll be unassigned automatically 🕹️ Excited to have you ship this 🚀
@RajuGangitla, please open a draft PR linking this issue within 12 hours. If we can't detect a PR in 12 hours, you will be unassigned automatically.
@mfts im trying to setup the tiny bbird database and it added bunch of files am i doing anything wrong
@RajuGangitla Yes that's adding all the python files. You don't need to commit them.
Did you open open a python shell with pipenv?
@RajuGangitla If you have pipenv install on your computer, then inside the repo directory, you can call pipenv shell to open a python shell with the tinybird package installed.
@mfts Its still throwing Error: invalid authentication token. Workspace not found, make sure you use the token host https://api.us-east.tinybird.co am i doing anything wrong
https://github.com/user-attachments/assets/544b8051-5e75-4f1b-8bf3-58c2254c1e47
In tinybird when you create the account and token, you need to add the pipe to the token permissions. You do that inside the tinybird dashboard
maybe that time i didnt add that
is there any way to add pipes to existing tokesns
if not i need to create a new token ?
is this the pipes i need to add
Yes. But to solve this issue you probably need to create a new pipe as well that fits this criteria
hey @RajuGangitla , if you are not working on this, may I take this forward?
@DeepaPrasanna I'm working on this one
@RajuGangitla let me know if you need help :)
@mfts even I have added tinybird token it's still saying invalid authentication token do you have any idea
@mfts I'm interested to work on this one
But I didn't understand why I'm getting invalid authentication token for tinybird token
- I did authentication through cli It's successful
- I push the datasources and data pipes
- now if I'm trying to get the data or ingest the data it's throwing error
I added tinybird token in env
got same error.
@mfts I'm interested to work on this one
But I didn't understand why I'm getting invalid authentication token for tinybird token
- I did authentication through cli It's successful
- I push the datasources and data pipes
- now if I'm trying to get the data or ingest the data it's throwing error
I added tinybird token in env
Hey @RajuGangitla, how did you dort this? Hoy same issues Ty