I've tried replacing int with Decimal in spark, but I'm getting the below error.
spark.createDataFrame([{'abc': 7010930}], StructType([StructField('abc', DecimalType(20, 0), True)]))
field abc: DecimalType(20,0) can not accept object 7010930 in type <class 'int'>
I understand that if the Precision is 20 it should be able to get 7 digits, but where am I going wrong?