---
schema_version: "1"
id: da6dea5f28b6e7987de4b4c6d5e36e3aeb33b4c430d709726daf45b34f111d76
title: Rules for Automatic Generation of a Metadata File
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/analytics/264-0-0/bi_integrate_metadata_file_generation_requirements.md
canonical_url: https://help.salesforce.com/s/articleView?id=analytics.bi_integrate_metadata_file_generation_requirements.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: ed4ee06619d01050e517ea1d8e198440c0be549f33c7af5308d410a40a947fe5
description: When you upload a CSV file from the user interface, Analytics automatically generates the metadata file as long as the CSV file meets certain requirements.
products:
  - CRM Analytics
  - Cross Cloud
release: "264"
---
# Rules for Automatic Generation of a Metadata File

When you upload a CSV file from the user interface, Analytics automatically generates the metadata file as long as the CSV file meets certain requirements.

To enable Analytics to generate the metadata file, a CSV file must meet the following requirements.

- The file type must be .csv, not .gz or .zip.
- The file must contain one row for the column header and at least one record.
- The CSV file must meet all Analytics requirements as mentioned in the [Analytics External Data Format Developer Guide](https://developer.salesforce.com/docs/analytics/bi-dev-guide-ext-data/guide/).

Analytics generates the metadata attributes for each CSV column based on the first 100 rows in the CSV file. Analytics uses the following rules to convert the CSV column names to field labels.

- Replaces special characters and spaces with underscores. For example, "Stage Name" becomes "Stage\_Name."
- Replaces consecutive underscores with one underscore, except when column name ends with "\_\_c." For example, "stage\*&name" becomes "stage\_name."
- Prefixes the field label with "X" when the first character of the column name is numeric. For example, "30Day" becomes "X30Day."
- Replaces the field name with "Column" + column number when all characters in the column name are not alphanumeric. For example, the fourth column name "\*&^\*(&\*(%" becomes "Column4."
- Deletes underscores at the beginning and end of the field label to ensure that it doesn't start or end with an underscore.
- Increments the derived field label if the label is the same as an existing label. For example, if "X2" already exists, uses "X21," "X22," "X23."

![Tip](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-analytics-bi-264-0-0-production-enus/ec791473-f5b4-4f64-a656-9104f455d966/images/icon_tip.png)

Tip You can download the generated metadata file to change the metadata settings, and then upload it to apply the changes. You can download the metadata file when you create or edit a dataset.