Skip to main content
Solved

Need help in removing special character


MohammedSohail
Roadie

[
{
"domain":"{\n\t\t\"id\": \"7330-2ade99\"\n\t\t\n}"
}
]

 

 

How to remove “\n\t\t”

Best answer by Rishi

@MohammedSohail , I did export from DataCollector, and hence when you are trying to import in control hub it’s failing. I am attaching the export for SCH. Please try new attached pipeline to import.

View original
Did this topic help you find an answer to your question?

6 replies

Rishi
StreamSets Employee
Forum|alt.badge.img
  • StreamSets Employee
  • 96 replies
  • June 16, 2022

Hii @MohammedSohail , How does the output record should look like ? is it as below or something else ?

domain : { "id": "7330-2ade99" }

 


MohammedSohail
Roadie

@Rishi you are correct I need same :   domain : { "id": "7330-2ade99" }


MohammedSohail
Roadie
Rishi wrote:

Hii @MohammedSohail , How does the output record should look like ? is it as below or something else ?

domain : { "id": "7330-2ade99" }

 

yes the same


Rishi
StreamSets Employee
Forum|alt.badge.img
  • StreamSets Employee
  • 96 replies
  • June 16, 2022

Hello @MohammedSohail , Can you try as below , Please find attached pipeline json for your reference.

 

Input Flile

❯ cat /tmp/test.json                                                                                                                                             
   1   │ [
   2   │ {
   3"domain":"{\n\t\t\"id\": \"7330-2ade99\"\n\t\t\n}"
   4   │ }
   5   │ ]

 

Output file

 $cat sdc-32eca88c-c316-11ec-a3e9-d3b91a74f13a_c52862ca-c016-483f-b380-9077c3019fdb    

   1   │ {"domain":{"id":"7330-2ade99"}}

 


MohammedSohail
Roadie
Rishi wrote:

Hello @MohammedSohail , Can you try as below , Please find attached pipeline json for your reference.

 

Input Flile

❯ cat /tmp/test.json                                                                                                                                             
   1   │ [
   2   │ {
   3"domain":"{\n\t\t\"id\": \"7330-2ade99\"\n\t\t\n}"
   4   │ }
   5   │ ]

 

Output file

 $cat sdc-32eca88c-c316-11ec-a3e9-d3b91a74f13a_c52862ca-c016-483f-b380-9077c3019fdb    

   1   │ {"domain":{"id":"7330-2ade99"}}

 

Sorry If i am doing wrong , as I am new to streamset  

 


Rishi
StreamSets Employee
Forum|alt.badge.img
  • StreamSets Employee
  • 96 replies
  • Answer
  • June 16, 2022

@MohammedSohail , I did export from DataCollector, and hence when you are trying to import in control hub it’s failing. I am attaching the export for SCH. Please try new attached pipeline to import.


Reply