Registers a custom `ObjectStore` to be used with a specific url. This allows DataFusion to create external tables from urls that do not have built in support such as `hdfs://namenode:port/...`. Returns the [`ObjectStore`] previously registered for this scheme, if any. See [`ObjectStoreRegistry`] for more details # Example: Register local file system object store ``` # use std::sync::Arc; # use
(
&self,
url: &Url,
object_store: Arc<dyn ObjectStore>,
)
| 185 | /// runtime_env.register_object_store(&base_url, Arc::new(http_store)); |
| 186 | /// ``` |
| 187 | pub fn register_object_store( |
| 188 | &self, |
| 189 | url: &Url, |
| 190 | object_store: Arc<dyn ObjectStore>, |
| 191 | ) -> Option<Arc<dyn ObjectStore>> { |
| 192 | self.object_store_registry.register_store(url, object_store) |
| 193 | } |
| 194 | |
| 195 | /// Deregisters a custom `ObjectStore` previously registered for a specific url. |
| 196 | /// See [`ObjectStoreRegistry::deregister_store`] for more details. |