cancel
Showing results for 
Search instead for 
Did you mean: 
Data Engineering
Join discussions on data engineering best practices, architectures, and optimization strategies within the Databricks Community. Exchange insights and solutions with fellow data engineers.
cancel
Showing results for 
Search instead for 
Did you mean: 

Map("skipRows", "1") ignored during autoloader process. Something wrong with the format?

Chris_Shehu
Valued Contributor III

I've tried multiple variations of the following code. It seems like the map parameters are being completely ignored.

CREATE LIVE TABLE a_raw2
TBLPROPERTIES ("quality" = "bronze")
AS SELECT * FROM cloud_files("dbfs:/mnt/c-raw/a/c_medcheck_export*.csv", "csv", map("skipRows","1" , "header", "true", "cloudFiles.inferColumnTypes", "true")) 

com.databricks.sql.transaction.tahoe.DeltaAnalysisException: Found invalid character(s) among ' ,;{}()\n\t=' in the column names of your schema.

Please upgrade your Delta table to reader version 2 and writer version 5

and change the column mapping mode to 'name' mapping. You can use the following command:

ALTER TABLE <table_name> SET TBLPROPERTIES (

'delta.columnMapping.mode' = 'name',

'delta.minReaderVersion' = '2',

'delta.minWriterVersion' = '5')

Refer to table versioning at https://docs.microsoft.com/azure/databricks/delta/versioning

org.apache.spark.sql.AnalysisException: Column name "Duration (in seconds)" contains invalid character(s). Please use alias to rename it.

2 REPLIES 2

jose_gonzalez
Moderator
Moderator

skipRows was added in DBR 11.1 -- what DBR is your DLT pipeline on?

Chris_Shehu
Valued Contributor III

Good morning, I'm using 12.0.

Join 100K+ Data Experts: Register Now & Grow with Us!

Excited to expand your horizons with us? Click here to Register and begin your journey to success!

Already a member? Login and join your local regional user group! If there isn’t one near you, fill out this form and we’ll create one for you to join!