Syntax error for time travel of delta sql

Viewed 124

I ran the example in delta doc:

SELECT * FROM delta.`/delta/events` VERSION AS OF 1

But got the following error:

mismatched input ‘AS’ expecting {<EOF>, ‘;’}(line 3, pos 44)

Does anyone know what is the correct syntax ?

Spark version: 3.1.2

Delta version: 1.0.0

Configure spark as follows:

spark.sql.extensions io.delta.sql.DeltaSparkSessionExtension
spark.sql.catalog.spark_catalog org.apache.spark.sql.delta.catalog.DeltaCatalog
1 Answers

This syntax is not supported in the open source version right now as it requires changes in Spark to support that syntax (the required changes are committed already). Specifically, this is a bug in the documentation that was copied from the Databricks Delta documentation. The issue with documentation will be fixed in the next major release - it was already reported.

Related