-
Notifications
You must be signed in to change notification settings - Fork 23
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
Field '__messageProperties' not found; typically this occurs with arrays which are not mapped as single value. #292
Comments
Would you be up for trying to add a breaking test to the client? |
Sure, would love to contribute to that. Would require some direction and guidance that where can I do this. |
Hi, @wbeckler any update on this? |
Hi @akshayjain3450, you would need to set the option |
Hi @harshavamsi, I did try this option and still face the same issue. Complete Stack Trace: |
What is the bug?
Field '__messageProperties' not found; typically this occurs with arrays which are not mapped as single value. Though this field actually exists in the reader data.
How can one reproduce the bug?
This is my sample Scala program using Spark:
def read(): Unit = {
var df = spark.read.format("opensearch")
.option("opensearch.nodes", "host")
.option("opensearch.port", "9200")
.option("opensearch.nodes.wan.only", "true")
.option("opensearch.resource", "index")
.option("opensearch.net.http.auth.user", "admin")
.option("opensearch.net.http.auth.pass", "admin")
.load()
df.printSchema()
df.show(10)
}
What is your host/environment?
Spark: 3.3.1, Opensearch-Hadoop 1.1.0
Do you have any additional context?
The Spark Schema:
root
|-- __eventTime: long (nullable = true)
|-- __messageId: string (nullable = true)
|-- __messageProperties: struct (nullable = true)
|-- __metadata: struct (nullable = true)
| |-- _dataos_run_mapper_id: string (nullable = true)
| |-- id: string (nullable = true)
|-- __publishTime: long (nullable = true)
|-- __topic: string (nullable = true)
|-- age: string (nullable = true)
|-- city: string (nullable = true)
|-- country: string (nullable = true)
|-- email: string (nullable = true)
|-- first_name: string (nullable = true)
|-- gender: string (nullable = true)
|-- id: string (nullable = true)
|-- last_name: string (nullable = true)
|-- phone: string (nullable = true)
|-- postcode: string (nullable = true)
|-- state: string (nullable = true)
|-- title: string (nullable = true)
Also, if you notice I have two struct fields, one gets mapped properly, and the other throws this issue. I am looking for a solution to this. Do let me know if you need any more details on this.
The text was updated successfully, but these errors were encountered: