Docs Menu

Supported Data Formats

Data Federation can read the following data formats:

Supported Format
Supported Compression
Avro
JSON 1

BSON

Your CSV or TSV file must start with a header row. Atlas Data Federation utilizes the header row as field names. The dot-delimited field names in the header row become nested fields or objects in JSON format. For each dot in the field name, Data Federation creates another level of nesting.

Example

Suppose your federated database instance is reading a CSV file with content similar to the following:

company,location.state,location.city.name,location.city.street
"MongoDB", "California", "Palo Alto", "Forest Ave"

For the data fields in the above example CSV file, Data Federation creates a JSON document similar to the following:

{
"company": "MongoDB",
"location": {
"state": "California",
"city": {
"name": "Palo Alto",
"street": "Forest Ave",
}
}

Data Federation requires all field names at the same level of nesting to be unique. The following are examples of invalid field names in the header row:

  • One field duplicates another field at the same level of nesting.

    Example

    Consider the following:

    company,location,company

    In the header, company is repeated twice at the same level of nesting.

  • One dot-delimited field duplicates another field at the same level of nesting.

    Example

    Consider the following:

    company,location,location.city

    In the header, location is both a stand-alone field and dot-delimited field at the same level of nesting.

←  Configure S3 EncryptionData Federation AWS S3 Limitations →
Give Feedback
© 2022 MongoDB, Inc.

About

  • Careers
  • Investor Relations
  • Legal Notices
  • Privacy Notices
  • Security Information
  • Trust Center
© 2022 MongoDB, Inc.