SAP Knowledge Base Article - Public

3516476 - Field length not correctly detected when creating Data Flow from file-based sources in SAP Datasphere

Symptom

When creating a Data Flow in SAP Datasphere based on an Excel file, the system may show the wrong field length.

Example: A field can be assigned String(2) even though some values in the dataset need String(3) or longer.

Environment

SAP Datasphere

Reproducing the Issue

  1. Logon to Datasphere tenant
  2. Go to Data Builder
  3. Create a Data Flow from file-based data source
  4. Select an Excel file
  5. Check the Data Type of some Field (e.g. named columnA) in Columns section
    => The Data Type should be String(3) but it shows as String(2) which is incorrect

Cause

  • This behavior is by design.
  • Excel, CSV, and JSON files do not provide metadata about field definitions.
  • Therefore, SAP Datasphere infers the schema by checking only a subset of the data (see Point 5 in SAP Datasphere Document Add a Source to a Data Flow).
  • If longer values appear outside of the scanned subset, they are not considered, and the suggested Data Type may be too short.

Resolution

Workaround 1: Manually adjust the column definition so it covers the full length of the values in the dataset.

“For CSV, JSON, or Excel files, the schema is calculated based on a subset of data and hence you can adjust/verify the suggested data as per your requirements to cover all the data.”

Workaround 2: Manually change the Data Type of the field to the correct definition.

See Also

Add a Source to a Data Flow | SAP Help Portal

Keywords

SAP Datasphere, Data Flow, Field Length, Data Type String, SFTP, Upload, Metadata, CSV, JSON, Excel, Schema, Adjust Column Definition. , KBA , DS-DI-DF , Data Flows , CA-DI-EMB , Data Intelligence Embedded in Data Warehouse Cloud , Problem

Product

SAP Datasphere all versions