Hello @Rohit Kulkarni ,
Thanks for the question and using MS Q&A platform.
What is schema inference?
Infer schema will automatically guess the data types for each field.
In Azure Synapse Analytics, schema inference works only for parquet format.
For other formats:
Infer schema will automatically guess the data types for each field. If we set this option to TRUE, the API will read some sample records from the file to infer the schema.
To example, in more details I had create two dataframe one with inferschema=’False’ and another inferschema=’True’ with a sample data.
- df_without_schema without inferschema (If you look at the schema of the dataframe, every data type is treated as string).
- df_with_schema with inferschema=‘True’ (If you look at the schema of the dataframe, it automatically detected the data types).
Hope this helps. Do let us know if you any further queries.
---------------------------------------------------------------------------
Please "Accept the answer" if the information helped you. This will help us and others in the community as well.