pub trait OpendalSinkBackend:
Send
+ Sync
+ 'static
+ Clone
+ PartialEq {
type Properties: TryFromBTreeMap + Send + Sync + Clone + WithOptions;
const SINK_NAME: &'static str;
// Required methods
fn from_btreemap(
btree_map: BTreeMap<String, String>,
) -> Result<Self::Properties>;
fn new_operator(properties: Self::Properties) -> Result<Operator>;
fn get_path(properties: Self::Properties) -> String;
fn get_engine_type() -> EngineType;
fn get_batching_strategy(properties: Self::Properties) -> BatchingStrategy;
}
Expand description
The OpendalSinkBackend
trait unifies the behavior of various sink backends
implemented through OpenDAL
(<https://github.com/apache/opendal>
).
§Type Parameters
- Properties: Represents the necessary parameters for establishing a backend.
§Constants
SINK_NAME
: A static string representing the name of the sink.
§Functions
from_btreemap
: Automatically parse the required parameters from the input create sink statement.new_operator
: Creates a new operator using the provided backend properties.get_path
: Returns the path of the sink file specified by the user’s create sink statement.
Required Associated Constants§
Required Associated Types§
type Properties: TryFromBTreeMap + Send + Sync + Clone + WithOptions
Required Methods§
fn from_btreemap( btree_map: BTreeMap<String, String>, ) -> Result<Self::Properties>
fn new_operator(properties: Self::Properties) -> Result<Operator>
fn get_path(properties: Self::Properties) -> String
fn get_engine_type() -> EngineType
fn get_batching_strategy(properties: Self::Properties) -> BatchingStrategy
Object Safety§
This trait is not object safe.