Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
a month ago
Hi @Aviral-Bhardwaj -
From your sample it looks like the values are losing everything past the 2nd decimal place (e.g. 24.5638 → 24.56 / 24.57), which usually points to the scale of the target column or a cast in the pipeline, not a Databricks display setting.
Could you share:
- The target column’s data type (DESCRIBE TABLE your_table), e.g. is it DECIMAL(10,2), FLOAT, DOUBLE?
- How the data is loaded (JDBC read, Auto Loader, COPY INTO, or a file export) and whether a schema is inferred or explicitly defined?
- Whether any transformation in between uses CAST, ROUND, or format_number?
If it’s a DECIMAL scale issue, the fix is to define the column with enough scale (e.g. DECIMAL(18,6)) and re-load. If you’re reading via JDBC, also check the source column’s precision/scale, since Spark maps it from the source metadata.