You are here:
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.
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."

