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

NDJSON format not recognized #82

Open
adobni opened this issue May 23, 2023 · 1 comment
Open

NDJSON format not recognized #82

adobni opened this issue May 23, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@adobni
Copy link

adobni commented May 23, 2023

Describe the bug
Format NDJSON is not recognized.

To Reproduce

  1. Installed with brew.
  2. Execute a transformation with input payload format application/x-ndjson
$ dw run -i payload=in.ndjson "%dw 2.0  output application/json  input payload  application/x-ndjson  --- payload"
[ERROR] Error while executing the script:
[ERROR] Unknown content type `application/x-ndjson`. Supported content types are: `application/dw`, `application/csv`, `application/json`, `multipart/form-data`, `application/octet-stream`, `text/x-java-properties`, `text/plain`, `application/x-www-form-urlencoded`, `application/xml`, `application/yaml`

1| %dw 2.0  output application/json  input payload  application/x-ndjson  --- payload
                                                    ^^^^^^^^^^^^^^^^^^^^
Trace:
  at anonymous::main (line: 1, column: 50) at:

1| %dw 2.0  output application/json  input payload  application/x-ndjson  --- payload
                                                    ^^^^^^^^^^^^^^^^^^^^

Expected behavior
The readme file indicates that the format is supported,.

Screenshots
N/A

Desktop (please complete the following information):

  • OS: macOS 13.3.1. Also happens in Windows.
dw --version
Command Line : V1.0.34
Runtime : V2.6.0-SNAPSHOT

Additional context
Issue originally mentioned in Stackoverflow question: https://stackoverflow.com/questions/76292778/dataweave-in-windows-to-process-ndjson-files-x-ndjson-does-not-work

@adobni adobni added the bug Something isn't working label May 23, 2023
@cwarden
Copy link

cwarden commented May 23, 2023

You can enable the ndjson module in the build.gradle file: 3f1d097

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants