{
  "name": "mongoimport",
  "description": "Import data from a JSON, CSV, or TSV file into a MongoDB instance",
  "options": [
    {
      "names": [
        "--help"
      ],
      "description": "Returns information on the options and use of mongoimport"
    },
    {
      "names": [
        "--verbose",
        "-v"
      ],
      "description": "Increases the amount of internal reporting returned on standard output or in log files"
    },
    {
      "names": [
        "--quiet"
      ],
      "description": "Runs mongoimport in a quiet mode that attempts to limit the amount of output"
    },
    {
      "names": [
        "--version"
      ],
      "description": "Returns the mongoimport release number"
    },
    {
      "names": [
        "--config"
      ],
      "description": "Specifies the full path to a YAML configuration file containing sensitive values for the following options to mongoimport",
      "args": [
        {
          "name": "filename",
          "template": "filepaths"
        }
      ]
    },
    {
      "names": [
        "--uri"
      ],
      "description": "Specifies the resolvable URI connection string of the MongoDB deployment",
      "priority": 100,
      "args": [
        {
          "name": "connectionString",
          "description": "MongoDB connection string",
          "suggestions": [
            "mongodb://localhost:27017",
            "mongodb+srv://username:password@cluster0.example.mongodb.net/database"
          ]
        }
      ]
    },
    {
      "names": [
        "--host",
        "-h"
      ],
      "description": "Specifies the resolvable hostname of the MongoDB deployment",
      "args": [
        {
          "name": "hostname:port",
          "suggestions": [
            "localhost:27017"
          ]
        }
      ]
    },
    {
      "names": [
        "--port"
      ],
      "description": "Specifies the TCP port on which the MongoDB instance listens for client connections",
      "args": [
        {
          "name": "port",
          "suggestions": [
            "27017"
          ]
        }
      ]
    },
    {
      "names": [
        "--ssl"
      ],
      "description": "Enables connection to a mongod or mongos that has TLS/SSL support enabled"
    },
    {
      "names": [
        "--sslCAFile"
      ],
      "description": "Specifies the .pem file that contains the root certificate chain from the Certificate Authority",
      "args": [
        {
          "name": "filename",
          "template": "filepaths"
        }
      ]
    },
    {
      "names": [
        "--sslPEMKeyFile"
      ],
      "description": "Specifies the .pem file that contains both the TLS/SSL certificate and key",
      "args": [
        {
          "name": "filename",
          "template": "filepaths"
        }
      ]
    },
    {
      "names": [
        "--sslPEMKeyPassword"
      ],
      "description": "Specifies the password to de-crypt the certificate-key file (i.e. --sslPEMKeyFile)",
      "args": [
        {
          "name": "value",
          "description": "Password"
        }
      ]
    },
    {
      "names": [
        "--sslCRLFile"
      ],
      "description": "Specifies the .pem file that contains the Certificate Revocation List",
      "args": [
        {
          "name": "filename",
          "template": "filepaths"
        }
      ]
    },
    {
      "names": [
        "--sslAllowInvalidCertificates"
      ],
      "description": "Bypasses the validation checks for server certificates and allows the use of invalid certificates"
    },
    {
      "names": [
        "--sslAllowInvalidHostnames"
      ],
      "description": "Disables the validation of the hostnames in TLS/SSL certificates"
    },
    {
      "names": [
        "--username",
        "-u"
      ],
      "description": "Specifies a username with which to authenticate to a MongoDB database that uses authentication",
      "args": [
        {
          "name": "username"
        }
      ]
    },
    {
      "names": [
        "--password",
        "-p"
      ],
      "description": "Specifies a password with which to authenticate to a MongoDB database that uses authentication",
      "dependsOn": [
        "--username"
      ],
      "args": [
        {
          "name": "password"
        }
      ]
    },
    {
      "names": [
        "--awsSessionToken"
      ],
      "description": "Specifies the session token for MONGODB-AWS authentication mechanism",
      "args": [
        {
          "name": "AWS Session Token"
        }
      ]
    },
    {
      "names": [
        "--authenticationDatabase"
      ],
      "description": "Specifies the authentication database where the specified --username has been created",
      "args": [
        {
          "name": "dbname",
          "description": "Database name"
        }
      ]
    },
    {
      "names": [
        "--authenticationMechanism"
      ],
      "description": "Specifies the authentication mechanism the mongoimport instance uses to authenticate to the mongod or mongos",
      "args": [
        {
          "name": "name",
          "suggestions": [
            "SCRAM-SHA-1",
            "SCRAM-SHA-256",
            "MONGODB-X509",
            "MONGODB-AWS",
            "GSSAPI",
            "PLAIN"
          ]
        }
      ]
    },
    {
      "names": [
        "--gssapiServiceName"
      ],
      "description": "Specify the name of the service using GSSAPI/Kerberos. This option is available only in MongoDB Enterprise",
      "args": [
        {
          "name": "serviceName"
        }
      ]
    },
    {
      "names": [
        "--gssapiHostName"
      ],
      "description": "Specify the hostname of the service using GSSAPI/Kerberos. This option is available only in MongoDB Enterprise",
      "args": [
        {
          "name": "hostname"
        }
      ]
    },
    {
      "names": [
        "--db",
        "-d"
      ],
      "description": "Specifies the name of the database on which to run the mongoimport",
      "args": [
        {
          "name": "database"
        }
      ]
    },
    {
      "names": [
        "--collection",
        "-c"
      ],
      "description": "Specifies the name of the collection to import",
      "priority": 90,
      "args": [
        {
          "name": "collection"
        }
      ]
    },
    {
      "names": [
        "--fields",
        "-f"
      ],
      "description": "Specify a comma separated list of field names when importing CSV or TSV files that do not have field names in the first (i.e. header) line of the file",
      "exclusiveOn": [
        "--fieldFile"
      ],
      "args": [
        {
          "name": "field1,field2,...",
          "description": "Comma separated list of fields"
        }
      ]
    },
    {
      "names": [
        "--fieldFile"
      ],
      "description": "Specify a file containing a comma separated list of field names when importing CSV or TSV files that do not have field names in the first (i.e. header) line of the file",
      "exclusiveOn": [
        "--fields",
        "-f"
      ],
      "args": [
        {
          "name": "filename",
          "template": "filepaths"
        }
      ]
    },
    {
      "names": [
        "--ignoreBlanks"
      ],
      "description": "Ignores empty fields in CSV and TSV exports"
    },
    {
      "names": [
        "--type"
      ],
      "description": "Specifies the file type to import",
      "args": [
        {
          "name": "type",
          "suggestions": [
            "json",
            "csv",
            "tsv"
          ]
        }
      ]
    },
    {
      "names": [
        "--file"
      ],
      "description": "Specifies the location and name of a file containing the data to import",
      "priority": 80,
      "args": [
        {
          "name": "filename",
          "template": "filepaths"
        }
      ]
    },
    {
      "names": [
        "--drop"
      ],
      "description": "Modifies the import process so that the target instance drops the collection before importing the data from the input"
    },
    {
      "names": [
        "--headerline"
      ],
      "description": "Treats the first line of the input file as a header line"
    },
    {
      "names": [
        "--useArrayIndexFields"
      ],
      "description": "Interpret natural numbers in fields as array indexes when importing CSV or TSV files"
    },
    {
      "names": [
        "--mode"
      ],
      "description": "Specifies how the import process should handle existing documents in the database that match documents in the import file",
      "priority": 80,
      "args": [
        {
          "name": "mode",
          "suggestions": [
            "insert",
            "upsert",
            "merge",
            "delete"
          ]
        }
      ]
    },
    {
      "names": [
        "--upsertFields"
      ],
      "description": "Specifies a list of fields for the query portion of the import process",
      "args": [
        {
          "name": "field1,field2,...",
          "description": "Comma separated list of fields"
        }
      ]
    },
    {
      "names": [
        "--stopOnError"
      ],
      "description": "Forces mongoimport to halt the insert operation at the first error rather than continuing the operation despite errors"
    },
    {
      "names": [
        "jsonArray"
      ],
      "description": "Accepts the import of data expressed with multiple MongoDB documents within a single JSON array"
    },
    {
      "names": [
        "--legacy"
      ],
      "description": "Indicates that the import data is in Extended JSON v1 format"
    },
    {
      "names": [
        "--maintainInsertionOrder"
      ],
      "description": "Maintains the order of documents in the import file when inserting documents into the database"
    },
    {
      "names": [
        "--numInsertionWorkers"
      ],
      "description": "Specifies the number of insertion workers to run concurrently",
      "args": [
        {
          "name": "number",
          "description": "Number of workers"
        }
      ]
    },
    {
      "names": [
        "--writeConcern"
      ],
      "description": "Specifies the write concern for each write operation that mongoimport performs",
      "args": [
        {
          "name": "document"
        }
      ]
    },
    {
      "names": [
        "--bypassDocumentValidation"
      ],
      "description": "Enables mongoimport to bypass document validation during the operation"
    },
    {
      "names": [
        "--columnsHaveTypes"
      ],
      "description": "Instructs mongoimport that the field list specified in --fields, --fieldFile, or --headerline specifies the types of each field"
    },
    {
      "names": [
        "--parseGrace"
      ],
      "description": "Specifies how mongoimport handles type coercion failures when importing CSV or TSV files with --columnsHaveTypes",
      "args": [
        {
          "name": "grace",
          "suggestions": [
            "autoCast",
            "skipField",
            "skipRow",
            "stop"
          ]
        }
      ]
    }
  ]
}
