Hello @Svetla ,
Thanks for the ask and using Microsoft Q&A platform .
As we understand the ask here is how to copy the records with new line & that here the source is Oracle and sink is ADLS gen2 . Please do let me know if that not accurate.
I was able to repro the issue using SQL as I do not have Oracle .
DECLARE @STRINPUT VARCHAR(100), @STRRESULT VARCHAR(100);
SET @STRINPUT = 'JOHN , HOPKINS ';
SET @STRRESULT = REPLACE(@STRINPUT, ',', CHAR(10));
--SELECT @STRRESULT AS 'STRING WITH LINE FEED';
INSERT INTO DBO.SVETLA( ID , NAME) VALUES ( 4,@STRRESULT)
Since the copy activity does not allow any tranformation , you have two options
- Use dataflow
- Query the data from Oracle so that we remove the char(10) using replace or simialr function.
I did tried the second option in SQL and I was able to do that using replace function , I am confident that Orable will also have some function like that .
SELECT id ,replace(name,CHAR(10),'') as Name from dbo.Svetla
The output in csv is
Please do let me if you have any queries .
Thanks
Himanshu
-------------------------------------------------------------------------------------------------------------------------
- Please don't forget to click on
or upvote
button whenever the information provided helps you. Original posters help the community find answers faster by identifying the correct answer. Here is how
- Want a reminder to come back and check responses? Here is how to subscribe to a notification
- If you are interested in joining the VM program and help shape the future of Q&A: Here is how you can be part of Q&A Volunteer Moderators
Hello @Svetla ,
Thanks for the reply and i think I understand the limitations which you are refering too .
I have a thought ,which may need some thinking from your side as you have access to the data .
The above issues comes because in the copy activty we have the newline is \n( default) and in the actual data also we have (CHR(10), CHR(13)) . This is what I suggest ,
SELECT *,'$' from SomeTableName
Please so share know if you find any better solution .
Please do let me if you have any queries .
Thanks
Himanshu
Hello @Svetla ,
We haven’t heard from you on the last response and was just checking back to see if you have a resolution yet .In case if you have any resolution please do share that same with the community as it can be helpful to others . Otherwise, will respond back with the more details and we will try to help .
Thanks
Himanshu
Hello @Svetla ,
We haven’t heard from you on the last response and was just checking back to see if you have a resolution yet .In case if you have any resolution please do share that same with the community as it can be helpful to others .
If you have any question relating to the current thread, please do let us know and we will try out best to help you.
Thanks
Himanshu
Hi @HimanshuSinha-msft
The proposed option of replacing the new line character in the Copy activity works, but it makes the output file a 1 line output, thus it's no longer human readable. Unfortunately so far I'm not able to achieve the desired solution, where chr(10) in the source can transfer as a line break in the target without breaking the scv schema.
Sign in to comment