helxsz opened a new issue, #9280:
URL: https://github.com/apache/arrow-datafusion/issues/9280

   I have a parquet file in a directory called /resource/user inside the 
project directory.
   
   ```
   --project root
     --resources
       --user
         --user1.parquet
         --user2.parquet
         --user3.parquet
     --main.rs
   ```
   I use this directory as the data source for query, then use Apache 
DataFusion to run SQL queries on Parquet files
   
   
   ```
     let ctx = SessionContext::new();
   
     // Configure listing options
     let file_format = ParquetFormat::default().with_enable_pruning(Some(true));
     let listing_options = ListingOptions::new(Arc::new(file_format))
     .with_table_partition_cols(vec![])
     .with_file_extension(".parquet")
     .with_collect_stat(true);
   
     ctx.register_listing_table(
         "my_table",
         &format!("file://{}","./resources/user"),
         listing_options,
         None,
         None,
     )
     .await
     .unwrap();
   
     // execute the query
     let df = ctx.sql("SELECT * FROM my_table LIMIT 1",)
         .await?;
   
     // print the results
     df.show().await?;
   ```
   
   running the code gives me an error saying:
   
   **called `Result::unwrap()` on an `Err` value: Internal("No suitable object 
store found for file://./resources/user")**


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to