Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

168
Views
generar series en mongodb

En postgres usamos el siguiente código cuando necesitamos una serie de datos de tiempo para un gráfico de líneas

 SELECT date_trunc('day', dd)::date FROM generate_series ( '2004-04-01'::timestamp , '2005-04-01'::timestamp , '1 day'::interval) dd LEFT JOIN school_attendence on dd = school_attendence.attendence_date

¿Existe una función similar en mongodb o en la biblioteca mongoose que haga el trabajo por mí?

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Puedes usar la herramienta mgeneratejs :

 //install mongo and down mongoinport //install tool $ npm install -g mgeneratejs //generate 10000000 documents for mongodb $ mgeneratejs '{"name": "$name", "age": "$age", "emails": {"$array": {"of": "$email", "number": 3}}}' -n 10000000 | mongoimport --uri mongodb://localhost:27017/test --collection user --mode insert
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!