[SOLVED] What do you recommend to do a data analysis of a collection? It has a lot of information.
- 1
- Self Hosted
- Databases
Hi, I need to do an analysis of an entire collection by user, what would be the best way to address the problem
thank you
What kind of analysis?
perform operations with the information of the collections, that is, perform calculations to determine earnings of the day, month, year per user.
I do that by updating it when a new income (for example) comes, so you have a total earnings field and you update it by + the new earnings. This is done with a function to prevent data manipulation
i would use functions and maybe store incremental data or so in a collection.
The detail is that if a number changes, a calculation process must be done for all the information of that user. I don't know if that concept that you think works or there may be some other approach.
I like that approach although I don't know if it would apply with thousands of data?
it depends on what kind of reporting you want.
for this use case, i would have a collection of daily earnings where each document is the earnings of a user for a day. i'd have a function that updates that document when earning changes for a particular day. then, you can generate a report using the documents in that collection
the idea is perfect. My question would be that function. Can I make it run when it detects a change?
yes, you can have functions trigger on an event like document creation or delete
OK. He asks how I can obtain the information of a user in nodejs (this is already executed on the server side) since I need a session type to act with his user.
how is this related to your original question?
I understand, I open another question. It's already a nodejs related topic. thank you.
[SOLVED] What do you recommend to do a data analysis of a collection? It has a lot of information.
Recommended threads
- Type Mismatch in AppwriteException
There is a discrepancy in the TypeScript type definitions for AppwriteException. The response property is defined as a string in the type definitions, but in pr...
- What Query's are valid for GetDocument?
Documentation shows that Queries are valid here, but doesn't explain which queries are valid. At first I presumed this to be a bug, but before creating a githu...
- Realtime with multiple connections
I need the Realtime on multiple Collections for diffrent applicational logic. So my question is: Is there a way to have only 1 Websocket connection or do I need...