You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Getting Exception in thread "main" org.apache.spark.SparkClassNotFoundException: [DATA_SOURCE_NOT_FOUND] Failed to find the data source: deltaSharing. Please find packages at https://spark.apache.org/third-party-projects.html. while trying to read table as dataframe from a share.
#428
Open
mohika-knoldus opened this issue
Oct 25, 2023
· 5 comments
val spark = SparkSession.builder()
.master("local[1]")
.appName("Read Shared Data")
.getOrCreate()
val profilePath = "/home/knoldus/Desktop/Delta Open Sharing/resources/config.share"
val sharedFiles = client.DeltaSharingRestClient(profilePath).listAllTables()
sharedFiles.foreach(println) /// this works fine and lists all the tables in the share provided by data provider.
val popular_products_df = spark.read.format("deltaSharing").load("/home/knoldus/Desktop/Delta Open Sharing/resources/config.share#checkout_data_products.data_products.popular_products_data")
popular_products_df.show()
The text was updated successfully, but these errors were encountered:
Then you can read the table in like this: delta_sharing.load_as_spark(table_url).show()
or like this: spark.read.format("deltasharing").load(table_url).limit(100)
You can alternatively read the table in without Hadoop, if you use delta_sharing.load_as_pandas(table_url, limit=10)
import io.delta.sharing.client
import org.apache.spark.sql.SparkSession
object ReadSharedData extends App {
val spark = SparkSession.builder()
.master("local[1]")
.appName("Read Shared Data")
.getOrCreate()
val profilePath = "/home/knoldus/Desktop/Delta Open Sharing/resources/config.share"
val sharedFiles = client.DeltaSharingRestClient(profilePath).listAllTables()
sharedFiles.foreach(println) /// this works fine and lists all the tables in the share provided by data provider.
val popular_products_df = spark.read.format("deltaSharing").load("/home/knoldus/Desktop/Delta Open Sharing/resources/config.share#checkout_data_products.data_products.popular_products_data")
popular_products_df.show()
The text was updated successfully, but these errors were encountered: