Backend stored procedure schedulers in MongoDB dat

2020-04-30 01:28发布

Currently we are using apache flume framework to collect the logs from all our web applications and it will store the logs in MongoDB database table called “Raw_Data”. Now we got a task to differentiate the logs and store the logging information in different tables based on the application. So we decided to maintain a separate table for each application. Is there any way to create and run stored JavaScript on a frequency like scheduler to load the data application wise in MongoDB?

I’m very much familiar with oracle DB but I’m new to MongoDb. Can someone help me to find out the required things for this asap.

Thanks Kishore

1条回答
太酷不给撩
2楼-- · 2020-04-30 02:08

MongoDB has stored Javascript procedures, but no scheduler.

http://docs.mongodb.org/manual/tutorial/store-javascript-function-on-server/

You could trigger this from a client machine using a cron job and the mongo shell. However, I strongly recommend simply running a script in Python or similar client-side scripting language. It'll be far easier to version-control and to debug than server-side Javascript.

查看更多
登录 后发表回答