Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-16418

Add a way to convert a number or string value(s) to a date in $project

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Duplicate
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Aggregation Framework
    • Labels:
      None

      Description

      A very common data management pattern is to do ELT - e.g. extract data (e.g. from an RDBMS), load it (into MongoDB), and then transform it in MongoDB [with $out to another collection], instead of having to transform it in files or via ETL tools.

      The aggregation framework would be much better at this if it could convert dates (and other types in other JIRA tickets).

      One situation I worked on is taking a file with dates as numbers like 20140101 but it would also have been easy to put quotes around that in the files and use $substr to pull out the year, month, and day from "20140101" but there was no way to take those values and project it to a date value

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: