Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.8k views
in Technique[技术] by (71.8m points)

azure - Removing commas from ADF Sink Text File in my Pipeline

I have a sink file (same as a report) as an output from an ADF Copy Activity in a Pipeline where the formatting has to be "perfect" to meet a 3rd Party Vendors requirements. The following shows the first line; it is all perfectly correct, BUT I need ALL the commas removed as the last step in my ADF Pipeline . I could not get ADF to create this without delimiters.

Can anyone please suggest a possible solution? I need this for Production. Thanks! Mike Kiser

05, ,2021-01-21, ,BMECOL, ,,,,,,, ,0000000000,0000000000,0000000000,000000000000000,+,00000000000,+,000000000000000000000,10,E,2007-10-09 00:00:00.0000000,XXXXXXXXX06,BMECOL, , , , ,00,,Henry,W, ,Loescherkisertest3,,M,1960-01-01 00:00:00.0000000, ,USA,,,,XXXXXXXXX06,,,,,,,S,Single,,010004,,,,,,,,,,15,1,,XXXXXXXXX06,BMECOL , , , , ,0 ,Address 1,Address 2,Address 3, ,City,OH, ,United States,12345,Home, ,541/981-1818, ,, ,[email protected],20, ,,XXXXXXXXX06,BMECOL , , , , ,00,,5,HIS, , , ,25, ,,XXXXXXXXX06,BMECOL , , , , ,00,0000,C4029O,Professional,000000,000000 ,S,5200,M ,CO0001,BE CS Boulder HQ Ops,D22,NO ,REGULAR , ,,BCO , , ,40,0000000000 ,0000000000 ,1900-01-01 00:00:00.0000000,1900-01-01 00:00:00.0000000

question from:https://stackoverflow.com/questions/65837927/removing-commas-from-adf-sink-text-file-in-my-pipeline

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

I think you can use column-patterns in dataflow to replace the commas.
I've created a simple test.

  1. I saved the sample data as a row in txt file. enter image description here And select No delimiter at Column delimiter. enter image description here The data preview like this: enter image description here
  2. In DerivedColumn1 activity, we can use replace($$,',','') to remove the commas. enter image description here
  3. Sink preview like this: enter image description here

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...