Uploaded image for project: 'Compass '
  1. Compass
  2. COMPASS-7144

String field incorrectly autodetected as RegEx on CSV import

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Minor - P4 Minor - P4
    • 1.40.0
    • Affects Version/s: None
    • Component/s: None
    • Environment:
      OS: Windows 11 Pro Build 22621.2134
      Compass: 1.37.0-beta.2
    • 3
    • Not Needed

      Problem Statement/Rationale

      When importing a CSV which has a column where some are normal strings and others are URL slugs, for example "/Home/Example" the column gets detected as "mixed" type on import and fails with the error below as it is treated as a regular expression. 

      If manually changing to String, it imports successfully.

      Please be sure to attach relevant logs with any sensitive data redacted.

      {"name":"BSONError","message":"The regular expression option [T] is not supported [Col 5][Row 15]"} {"name":"BSONError","message":"The regular expression option [A] is not supported [Col 5][Row 26]"} {"name":"BSONError","message":"The regular expression option [N] is not supported [Col 5][Row 28]"} {"name":"BSONError","message":"The regular expression option [S] is not supported [Col 5][Row 31]"} {"name":"BSONError","message":"The regular expression option [V] is not supported [Col 5][Row 66]"} {"name":"BSONError","message":"The regular expression option [D] is not supported [Col 5][Row 85]"} {"name":"BSONError","message":"The regular expression option [W] is not supported [Col 5][Row 86]"} {"name":"BSONError","message":"The regular expression option [C] is not supported [Col 5][Row 99]"} {"name":"BSONError","message":"The regular expression option [E] is not supported [Col 5][Row 100]"}

      Steps to Reproduce

      • Create a CSV
      • Have a column contain text only
      • in a row for that column, put values like "/Home" and "/Home/Example"
      • Import the CSV in compass to an empty collection
      • Notice that the field type is autodetected to mixed
      • Run the import
      • Notice the error that it is treated as a regular expression

      Expected Results

      It autodetects as string and imports successfully

      Actual Results

      It autodetects incorrectly and throws import errors

       

            Assignee:
            leroux.bodenstein@mongodb.com Le Roux Bodenstein
            Reporter:
            chris.grabosky@mongodb.com Chris Grabosky
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: