diff --git a/destination/destination.go b/destination/destination.go index 0fbf441..200aca0 100644 --- a/destination/destination.go +++ b/destination/destination.go @@ -46,9 +46,12 @@ type Destination struct { } func NewDestination() sdk.Destination { - return sdk.DestinationWithMiddleware(&Destination{ - httpClient: &http.Client{}, - }, sdk.DefaultDestinationMiddleware()...) + return sdk.DestinationWithMiddleware( + &Destination{ + httpClient: &http.Client{}, + }, + sdk.DefaultDestinationMiddleware()..., + ) } func (d *Destination) Parameters() config.Parameters { diff --git a/source/source.go b/source/source.go index 6cd8248..62eeee6 100644 --- a/source/source.go +++ b/source/source.go @@ -23,6 +23,7 @@ import ( "github.com/aws/aws-sdk-go-v2/service/sqs/types" "github.com/conduitio-labs/conduit-connector-sqs/common" "github.com/conduitio/conduit-commons/config" + "github.com/conduitio/conduit-commons/lang" "github.com/conduitio/conduit-commons/opencdc" sdk "github.com/conduitio/conduit-connector-sdk" ) @@ -39,9 +40,18 @@ type Source struct { } func NewSource() sdk.Source { - return sdk.SourceWithMiddleware(&Source{ - httpClient: &http.Client{}, - }, sdk.DefaultSourceMiddleware()...) + return sdk.SourceWithMiddleware( + &Source{ + httpClient: &http.Client{}, + }, + sdk.DefaultSourceMiddleware( + // disable schema extraction by default, because the source produces raw data + sdk.SourceWithSchemaExtractionConfig{ + PayloadEnabled: lang.Ptr(false), + KeyEnabled: lang.Ptr(false), + }, + )..., + ) } func (s *Source) Parameters() config.Parameters {