Dyan
Dyan

Reputation: 81

Masking Data of type Date doesn't work with Debezium SQL Server Source Connector

I'm trying to mask the "c_birthday" column in table "staff" with data type 'DATE' and "quantity" column of type 'BIGINT' in table "orders" of SQL Server. When checking the message in Kafka topics, I found neither "c_birthday" nor "quantity" are masked. Did I miss something ?

I tried to mask the "c_name" in "staff" with type nvarchar and it worked but for other types, Debezium do nothing. I did check the topic schema in Schema Registry and the result is all 3 of them were masked. But the messages in Kafka topics demonstrated quite opposite, none of the columns defined were masked but for "c_name"

Here's my configurations:

{
    "name": "customer-adhoc-5",
    "config": {
        "connector.class" : "io.debezium.connector.sqlserver.SqlServerConnector",
        "tasks.max" : "1",
        "topic.prefix" : "CDC",
        "database.hostname" : "sqlserver",
        "database.port" : "*****",
        "database.user" : "*****",
        "database.password" : "*****",
        "database.names" : "testDB",
        "schema.history.internal.kafka.bootstrap.servers" : "kafka:9092",
        "schema.history.internal.kafka.topic": "schema-changes.inventory",
        "include.schema.changes": "true",
    "snapshot.mode": "schema_only",
        "decimal.handling.mode": "double",
        "database.encrypt": "false",
    "table.include.list": "dbo.orders,dbo.staff",
        "column.mask.with.3.chars": "testDB.dbo.orders.quantity,testDB.dbo.staff.c_birthday,testDB.dbo.staff.c_name",
        "schema.history.internal.store.only.captured.tables.ddl": "true",
        "schema.history.internal.store.only.captured.databases.ddl": "true",
        "incremental.snapshot.allow.schema.changes" : "true" ,
        "schema.name.adjustment.mode": "avro",
        "value.converter": "io.confluent.connect.avro.AvroConverter",
        "key.converter": "io.confluent.connect.avro.AvroConverter",
        "value.converter.schema.registry.url": "****",
        "key.converter.schema.registry.url": "****"
    }
}

Upvotes: 4

Views: 229

Answers (0)

Related Questions