Can someone let me know to convert the following from a Dataframe to an InterType()
df = DeltaTable.forPath(spark, '/mnt/lake/BASE/SQLClassification/cdcTest/dbo/cdcmergetest/1').history().select(max(col("version")).alias("version"))
I have tried the following
result = df.collect()[0]
result2 = df.withColumn("version",df.version.cast('integer'))
But with no luck
Any thoughts?