Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-21-2024 10:11 PM
Hi @lauraxyz , We can load the SQL file using dbutils.fs from volumes and then we can create a dataframe using spark.sql()
Example:
sql_query = dbutils.fs.head("/Volumes/jahnavi/datasets/data/test.sql")
result_df = spark.sql(sql_query)
display(result_df)
Jahnavi N