Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/airbytehq/airbyte into to…
Browse files Browse the repository at this point in the history
…pe/alpha-vantage/migrate-manifest-only
  • Loading branch information
topefolorunso committed Jan 7, 2025
2 parents e72c560 + ac054a6 commit 53f2bd8
Show file tree
Hide file tree
Showing 12 changed files with 218 additions and 459 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,41 +7,40 @@ package io.airbyte.cdk.read.cdc
import io.debezium.spi.converter.CustomConverter
import io.debezium.spi.converter.RelationalColumn
import java.util.Properties
import org.apache.kafka.connect.data.Schema
import org.apache.kafka.connect.data.SchemaBuilder

/** Used by Debezium to transform record values into their expected format. */
interface RelationalColumnCustomConverter : CustomConverter<Schema, RelationalColumn> {
interface RelationalColumnCustomConverter : CustomConverter<SchemaBuilder, RelationalColumn> {

/** A nice name for use in Debezium properties. */
val debeziumPropertiesKey: String

/** Fall-through list of handlers to try to match and register for each column. */
val handlers: List<Handler>

data class Handler(
interface Handler {
/** Predicate to match the column by. */
val predicate: (RelationalColumn) -> Boolean,
fun matches(column: RelationalColumn): Boolean

/** Schema of the output values. */
val outputSchema: Schema,
fun outputSchemaBuilder(): SchemaBuilder

/** Partial conversion functions, applied in sequence until conversion occurs. */
val partialConverters: List<PartialConverter>
)
}

override fun configure(props: Properties?) {}

override fun converterFor(
column: RelationalColumn?,
registration: CustomConverter.ConverterRegistration<Schema>?
registration: CustomConverter.ConverterRegistration<SchemaBuilder>?
) {
if (column == null || registration == null) {
return
}
for (handler in handlers) {
if (!handler.predicate(column)) continue
val converter: CustomConverter.Converter =
ConverterFactory(javaClass).build(column, handler.partialConverters)
registration.register(handler.outputSchema, converter)
return
}
val handler: Handler = handlers.find { it.matches(column) } ?: return
val converter: CustomConverter.Converter =
ConverterFactory(javaClass).build(column, handler.partialConverters)
registration.register(handler.outputSchemaBuilder(), converter)
}
}

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,4 @@ class DevNullBasicFunctionalityIntegrationTest :
}

@Test @Disabled("File transfer is not supported") override fun testBasicWriteFile() {}

@Test @Disabled("DevNull does not support Unknown types") override fun testUnknownTypes() {}
}
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,6 @@ class IcebergGlueWriteTest :
)
)
) {
@Test
@Disabled("dest iceberge-v2 doesn't support unknown types")
override fun testUnknownTypes() {}

@Test
override fun testBasicWrite() {
Expand Down
2 changes: 1 addition & 1 deletion airbyte-integrations/connectors/source-mysql/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ application {
airbyteBulkConnector {
core = 'extract'
toolkits = ['extract-jdbc', 'extract-cdc']
cdk = '0.249'
cdk = '0.255'
}

dependencies {
Expand Down
4 changes: 3 additions & 1 deletion airbyte-integrations/connectors/source-mysql/metadata.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,16 @@ data:
connectorSubtype: database
connectorType: source
definitionId: 435bb9a5-7887-4809-aa58-28c27df0d7ad
dockerImageTag: 3.10.0-rc.5
dockerImageTag: 3.10.0-rc.8
dockerRepository: airbyte/source-mysql
documentationUrl: https://docs.airbyte.com/integrations/sources/mysql
githubIssueLabel: source-mysql
icon: mysql.svg
license: ELv2
maxSecondsBetweenMessages: 7200
name: MySQL
connectorBuildOptions:
baseImage: docker.io/airbyte/java-connector-base:1.0.0@sha256:be86e5684e1e6d9280512d3d8071b47153698fe08ad990949c8eeff02803201a
registryOverrides:
cloud:
enabled: true
Expand Down
Loading

0 comments on commit 53f2bd8

Please sign in to comment.