Skip to main content

DynamoDbSourceConfig

Struct DynamoDbSourceConfig 

Source
pub struct DynamoDbSourceConfig {
Show 29 fields pub table_name: String, pub region: Option<String>, pub endpoint_url: Option<String>, pub credentials: DynamoDbCredentials, pub mode: ReadMode, pub segments: u32, pub max_concurrency: usize, pub index_name: Option<String>, pub projection: Option<String>, pub filter_expression: Option<String>, pub key_condition_expression: Option<String>, pub expression_attribute_names: BTreeMap<String, String>, pub expression_attribute_values: BTreeMap<String, Value>, pub consistent_read: bool, pub scan_index_forward: bool, pub page_limit: Option<u32>, pub stream_arn: Option<String>, pub start_position: StreamStart, pub on_gap: OnGap, pub resnapshot_deletes: bool, pub resnapshot_max_keys: usize, pub poll_interval_ms: u64, pub records_per_request: u32, pub shard_concurrency: usize, pub idle_termination_secs: Option<u64>, pub max_messages: Option<usize>, pub retry: RetryPolicy, pub batch_size: usize, pub value_format: ValueFormat,
}
Expand description

Configuration for DynamoDbSource.

Fields§

§table_name: String

Table name.

§region: Option<String>

AWS region. None uses the SDK default chain (env, profile, IMDS).

§endpoint_url: Option<String>

Custom endpoint URL (DynamoDB Local, LocalStack, VPC endpoints).

§credentials: DynamoDbCredentials

AWS credentials. Defaults to the SDK default provider chain.

§mode: ReadMode

scan (default), query, or streams.

§segments: u32

Parallel scan segments (TotalSegments), 1–1000000. Scan only.

§max_concurrency: usize

Segments read concurrently. Default 8.

§index_name: Option<String>

Secondary index to scan or query.

§projection: Option<String>

ProjectionExpression — the attributes to return.

§filter_expression: Option<String>

FilterExpression applied server-side after the read.

§key_condition_expression: Option<String>

KeyConditionExpression. Required for query, rejected otherwise.

§expression_attribute_names: BTreeMap<String, String>

ExpressionAttributeNames (#name → attribute).

§expression_attribute_values: BTreeMap<String, Value>

ExpressionAttributeValues (:value → plain JSON value).

§consistent_read: bool

Strongly consistent reads (table and local secondary indexes only).

§scan_index_forward: bool

Query order: ascending sort key when true (default).

§page_limit: Option<u32>

Limit per Scan/Query request (items evaluated per call).

§stream_arn: Option<String>

Stream ARN. Defaults to the table’s LatestStreamArn. Streams only.

§start_position: StreamStart

Start for shards with no bookmark and no parent that was read.

§on_gap: OnGap

Reaction to a bookmark older than the trim horizon.

§resnapshot_deletes: bool

on_gap: resnapshot: after the re-read, delete the destination rows of items it did not see (default true; the sink must support cleanup). false keeps the resnapshot for any sink but leaves the destination rows of items deleted while their stream records were trimmed.

§resnapshot_max_keys: usize

on_gap: resnapshot: the most distinct keys the re-read tracks for its delete (default 1,000,000; memory grows with it). A table with more items fails that run once with nothing deleted; its position is saved, so the next run resumes streaming.

§poll_interval_ms: u64

Base wait between GetRecords calls per shard, in ms (floored at 200).

§records_per_request: u32

GetRecords Limit per request (1–1000). Default 1000.

§shard_concurrency: usize

Shards read concurrently. Default 4.

§idle_termination_secs: Option<u64>

Streams: stop after this many seconds without a new record. At least one of idle_termination_secs / max_messages is required in streams mode.

§max_messages: Option<usize>

Streams: stop after this many change records.

§retry: RetryPolicy

Throttle / transient-failure retry policy.

§batch_size: usize

Records per emitted page. 0 is the “no batching” sentinel. Default 1000.

§value_format: ValueFormat

How attribute values appear in records: plain JSON (default; sets become arrays, binaries base64 strings, imprecise numbers decimal strings) or typed DynamoDB attribute JSON ({"S": "a"}, {"SS": ["x"]}, {"B": "<base64>"}) that a value_format: typed DynamoDB sink writes back losslessly. Applies to scan/query items and to Streams key / before / after images.

Implementations§

Source§

impl DynamoDbSourceConfig

Source

pub fn new(table_name: impl Into<String>) -> Self

Scan config with defaults for everything but the table name.

Source

pub fn validate(&self) -> Result<(), FaucetError>

Fail-fast validation, called from DynamoDbSource::new.

Source

pub fn poll_interval(&self) -> Duration

Effective per-shard poll interval (floored at 200 ms).

Trait Implementations§

Source§

impl Clone for DynamoDbSourceConfig

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for DynamoDbSourceConfig

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for DynamoDbSourceConfig

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl JsonSchema for DynamoDbSourceConfig

Source§

fn schema_name() -> Cow<'static, str>

The name of the generated JSON Schema. Read more
Source§

fn schema_id() -> Cow<'static, str>

Returns a string that uniquely identifies the schema produced by this type. Read more
Source§

fn json_schema(generator: &mut SchemaGenerator) -> Schema

Generates a JSON Schema for this type. Read more
Source§

fn inline_schema() -> bool

Whether JSON Schemas generated for this type should be included directly in parent schemas, rather than being re-used where possible using the $ref keyword. Read more
Source§

impl Serialize for DynamoDbSourceConfig

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> DynClone for T
where T: Clone,

Source§

fn __clone_box(&self, _: Private) -> *mut ()

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<Unshared, Shared> IntoShared<Shared> for Unshared
where Shared: FromUnshared<Unshared>,

Source§

fn into_shared(self) -> Shared

Creates a shared type from an unshared type.
Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more