Home > Software design >  Syntax error for time travel of delta sql
Syntax error for time travel of delta sql

Time:11-27

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 following:

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

CodePudding user response:

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