matthewmturner opened a new issue #1836:
URL: https://github.com/apache/arrow-datafusion/issues/1836
**Is your feature request related to a problem or challenge? Please describe
what you are trying to do.**
A clear and concise description of what the problem is. Ex. I'm always
frustrated when [...]
(This section helps Arrow developers understand the context and *why* for
this feature, in addition to the *what*)
I want to make it really easy to register multiple tables in a directory
into a `ExecutionContext` so I can write SQL queries on them.
**Describe the solution you'd like**
A clear and concise description of what you want to happen.
For example if their is a data directory like the below:
s3://bucket/active/table1/abc.parquet
s3://bucket/active/table2/abc.parquet
s3://bucket/active/table3/abc.parquet
s3://bucket/historical/table1/abc.parquet
s3://bucket/historical/table2/abc.parquet
s3://bucket/historical/table3/abc.parquet
I would like to be able to do something like the below.
```
ctx.register_object_store("s3", object_store);
// Provide a list of tables and table name prefix
// Registers active_table1, active_table2 into ctx
let tables = vec!["table1", "table2"];
ctx.register_listing_tables(
object_store: "s3",
object_store_prefix: "bucket/active",
tables: Some(&tables),
table_prefix: Some("active")
);
// Provide a prefix and register everything in the level below that as a
table with a table name prefix
// Registers active_table1, active_table2, active_table3 into ctx
ctx.register_listing_tables(
object_store: "s3",
object_store_prefix: "bucket/active",
tables: None
table_prefix: "active"
);
// Provide a prefix and register everything in the level below that as a
table with a no prefix
// Registers table1, table2, table3 into ctx
ctx.register_listing_tables(
object_store: "s3",
object_store_prefix: "bucket/active",
tables: None
table_prefix: "active"
);
```
**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features
you've considered.
**Additional context**
Add any other context or screenshots about the feature request here.
--
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]