[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
- SELF HOSTING ISSUE, DATA NOT MIGRATING T...
Hey, devs, I recently tried to migrate my cloud instance to a self hosted version but my data is not transferred fully only the table structure is transferred ...
- No Document ID?
Hi I have a self hosted appwrite. My documents get a document ID but are not visible in the console. I don't know why this happens and how to fix this
- How to determine if a user is anonymous?
This is probably a silly question, but I have not yet found a good answer. Is there a method to determine if the current session is anonymous aside from seein...