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

maybe I did something wrong or maybe there is regression? #74

Closed
minnieshi opened this issue Sep 9, 2020 · 6 comments
Closed

maybe I did something wrong or maybe there is regression? #74

minnieshi opened this issue Sep 9, 2020 · 6 comments

Comments

@minnieshi
Copy link

minnieshi commented Sep 9, 2020

Main question/issue I have here is:

using 1.5.2 verrsion, reading xml file like this.

<data>
    <oneField>SomeValue</oneField>
    <anotherTagOrTag>
        <value unit="string1-I-want-to-keep">123</value>
        <value unit="string2-I-want-to-keep">456</value>
    </anotherTagOrTag>
    <lastField>1999-01-01T18:02:00</lastField>
</data>

with configuration like this

task.reader.class=io.streamthoughts.kafka.connect.filepulse.reader.XMLFileInputReader
force.array.on.fields=anotherTagOrTag

the message got read into kafka does not have the unit attribute

the payload part is like this

    "data": {
      "oneField": "SomeValue",
      "anotherTagOrTag": [
        {
          "value": [
            "123",
            "456"
          ]
        }
      ],
      "lastField": "1999-01-01T18:02:00"
    }
  }

I've also posted the question here:
https://stackoverflow.com/questions/63809219/kafka-connect-file-pulse-xml-attribute-extraction

@fhussonnois
Copy link
Member

Hi @minnieshi, currently the reader doesn't read the attributes of a text-node. I will provide a fix for this.

@minnieshi
Copy link
Author

Hi @fhussonnois
I thought I did something wrong, or I am using the different version as the one you used here: https://medium.com/streamthoughts/streaming-data-into-kafka-s01-e02-loading-xml-file-21b5e69c645 the playlist does have 'name' attribute' and it was not lost.

Thank you very much for the quick response.

Ps Please also let me know if I should not post the "same" question on stack Overflow.

@minnieshi
Copy link
Author

Hi @fhussonnois I'd like to understand (sorry if this should have been common knowledge): Would the issue be fixed after all other ones are done? Or would it be fixed very soon?
I need to know roughly the timeline, to decide whether I have time to wait for the fix, or I should consider other options.

Best regards
Min

@fhussonnois
Copy link
Member

@minnieshi
Copy link
Author

Great. Thank you very much. I will have a quick test today.

@minnieshi
Copy link
Author

I confirm, my testing shows it fix the issue, and now i can see 2 records. split and kept the info.

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

2 participants