Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a Struct Column Containing All Message Fields #325

Open
aaronphilip opened this issue Jan 21, 2025 · 0 comments
Open

Add a Struct Column Containing All Message Fields #325

aaronphilip opened this issue Jan 21, 2025 · 0 comments

Comments

@aaronphilip
Copy link

Is it possible to configure the connector so that it adds an additional struct type column that contains the entirety of the kafka message? For example, a message with the following JSON schema

{
  "$id": "https://example.com/address.schema.json",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "description": "An address similar to http://microformats.org/wiki/h-card",
  "type": "object",
  "properties": {
    "postOfficeBox": {
      "type": "string"
    },
    "extendedAddress": {
      "type": "string"
    },
    "streetAddress": {
      "type": "string"
    },
    "locality": {
      "type": "string"
    },
    "region": {
      "type": "string"
    },
    "postalCode": {
      "type": "string"
    },
    "countryName": {
      "type": "string"
    }
  },
  "required": [ "locality", "region", "countryName" ],
  "dependentRequired": {
    "postOfficeBox": [ "streetAddress" ],
    "extendedAddress": [ "streetAddress" ]
  }
}

would have the following columns where recordContent contains the whole message.

postOfficeBox: string
extendedAddress: string
streetAddress: string
locality: string
region: string
postalCode: string
countryName: string
recordContent: struct<...>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant