cancel
Showing results forย 
Search instead forย 
Did you mean:ย 
Data Engineering
cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

Why I am getting a parse syntax error while running SQL?

Biswa9
New Contributor

Can anyone please help me what is wrong here in the syntax: 

dbutils.fs.ls;
Error in SQL statement: ParseException: [PARSE_SYNTAX_ERROR] Syntax error at or near 'dbutils'.(line 1, pos 0)
1 REPLY 1

Kaniz
Community Manager
Community Manager

Hi @Biswa9 , dbutils.fs.ls is typically used in Databricks Notebooks or scripts, and it's not a valid SQL statement. To list files and directories in the Databricks File System (DBFS), you should use it within a Databricks Notebook or script, not in SQL.