Skip to content

Commit 2f0c2df

Browse files
author
Marius Posta
committed
bulk-core-toolkit-extract-jdbc: simplify JdbcPartitionReader
1 parent b3103b3 commit 2f0c2df

File tree

1 file changed

+4
-10
lines changed

1 file changed

+4
-10
lines changed

airbyte-cdk/bulk/toolkits/extract-jdbc/src/main/kotlin/io/airbyte/cdk/read/JdbcPartitionReader.kt

+4-10
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import com.fasterxml.jackson.databind.node.ObjectNode
66
import io.airbyte.cdk.command.OpaqueStateValue
77
import io.airbyte.cdk.output.OutputConsumer
88
import io.airbyte.cdk.util.Jsons
9-
import io.airbyte.protocol.models.v0.AirbyteMessage
109
import io.airbyte.protocol.models.v0.AirbyteRecordMessage
1110
import java.util.concurrent.atomic.AtomicBoolean
1211
import java.util.concurrent.atomic.AtomicLong
@@ -48,15 +47,10 @@ sealed class JdbcPartitionReader<P : JdbcPartition<*>>(
4847
private val outData: ObjectNode = Jsons.objectNode()
4948

5049
private val msg =
51-
AirbyteMessage()
52-
.withType(AirbyteMessage.Type.RECORD)
53-
.withRecord(
54-
AirbyteRecordMessage()
55-
.withEmittedAt(outputConsumer.emittedAt.toEpochMilli())
56-
.withStream(stream.name)
57-
.withNamespace(stream.namespace)
58-
.withData(outData)
59-
)
50+
AirbyteRecordMessage()
51+
.withStream(stream.name)
52+
.withNamespace(stream.namespace)
53+
.withData(outData)
6054

6155
val streamFieldNames: List<String> = stream.fields.map { it.id }
6256

0 commit comments

Comments
 (0)