Skip to main content

Handle uncommon JSON formats in Extraction Builder

 

Hi all,

 

We are working with the Extraction Builder, but unfortunately the API we are using returns slightly adjusted JSON-formats.

 

Format 1 is Newline delimited JSON (application/x-ndjson), where entries are delimited with a newline (\\n) character.

Format 2 is a multipart results, with a combination of plain-text and JSON, see example below

 

Is there a way to handle such results in Celonis, without creating parser using Python in the Machine Learning Workbench?

Thanks in advance!

 

Jan-peter

 

----

Multipart response example:

`

--Boundary_1141620_1164068888_1623858255903

Content-Encoding: identity

dl_compression_type: deflated

dl_document_date: 2021-02-11T15: 13: 52.988Z

dl_corrupt: false

dl_size: 1024

dl_encoding: UTF-8

dl_document_data_type: JSON

 

{

  "compnr": 8010,

  "orderno": "XX0000024",

  "buspart": "P00000001",

...

...

}

`

Hi @janpeter.van.d,

 

Unfortunately, I see no other way than using a Python script. Did you already find an alternativ solution?

 

Best,

 

Justin


Hi Justin,

 

Thanks for your reply! We created a Python script to do the extraction via API, but that was less robust than hoped for. Using the Celoxtractor method, we now implemented a custom JDBC connection that does the job.

 

Best regards,

Jan-peter


Hi @janpeter.van.d,

 

great to hear!

 

If you have further questions please feel free to reach out to our community!

 

Best,

 

Justin


Will do, thanks for your support!


Reply