Skip to main content

Handle uncommon JSON formats in Extraction Builder

  • June 21, 2021
  • 4 replies
  • 3 views

janpeter.van.d
Level 12
Forum|alt.badge.img+26

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",

...

...

}

`

4 replies

  • Level 0
  • November 19, 2021

Hi @janpeter.van.d,

 

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

 

Best,

 

Justin


janpeter.van.d
Level 12
Forum|alt.badge.img+26
  • Author
  • Level 12
  • November 19, 2021

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


  • Level 0
  • November 19, 2021

Hi @janpeter.van.d,

 

great to hear!

 

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

 

Best,

 

Justin


janpeter.van.d
Level 12
Forum|alt.badge.img+26
  • Author
  • Level 12
  • November 19, 2021

Will do, thanks for your support!