Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Dear community,
I'm trying to export a number to csv than I use Web Connector(FTP/sFTP Connector ) to upload this csv to the sFTP server.
When I open the csv there are a lot of code ( I guess it is HTML /Xml code) which you can see below screen shot.
I want to put only the revenue number to the csv not any code.
My code block:
------------------------------------------
Let TotalRevenue = '$(ForeCastRevenue)' + '$(AirRmRevenue)' + '$(AncillaryRevenue)' - 635000000;
sFTP:
Load '$(TotalRevenue)' as Revenue
AutoGenerate(1);
Store Revenue from sFTP Into [lib://FLD_CBI/BoostOurBusiness/$(vToday).txt];
FileTransferConnector_SFTPUploadFile:
LOAD
Status as SFTPUploadFile_Status
FROM
[https://..]
(qvx);
------------------------------------------
My csv output from sFTP server is below:
I just wanted to put the revenue number which I marked yellow to csv. How I can delete XML code except -118145051,67957 (Revenue) ?
Many thanks in advance.
What if you do
Store Revenue from sFTP Into [lib://FLD_CBI/BoostOurBusiness/$(vToday).txt] (txt) ;
Try by adding (txt) at the end of the store statement.
Store Revenue from sFTP Into [lib://FLD_CBI/BoostOurBusiness/$(vToday).txt] (txt);
What if you do
Store Revenue from sFTP Into [lib://FLD_CBI/BoostOurBusiness/$(vToday).txt] (txt) ;
Try by adding (txt) at the end of the store statement.
Store Revenue from sFTP Into [lib://FLD_CBI/BoostOurBusiness/$(vToday).txt] (txt);
Thank you very much, Steve, it worked!
Thanks a lot, Sunny. I also learned a lot of things from your answers to other topics.
You are the best 🙂
Have a good day.
I am glad I have been able to help you learn 🙂
Sunny, I need help with one more step in this process.
How can I delete double quotes on the number that I put into txt file.
Many thanks.
My Code Block:
-------
Let TotalRevenue = num('$(ForeCastRevenue)') + num('$(AirRmRevenue)') + num('$(AncillaryRevenue)') - 635000000;
sFTP:
Load Null() as '$(TotalRevenue)'
AutoGenerate(0) ;
Store '$(TotalRevenue)' from sFTP Into [lib://FLD_CBI/BoostOurBusiness/$(vToday).txt](txt);
FileTransferConnector_SFTPUploadFile:
LOAD
Status as SFTPUploadFile_Status
FROM
[https://...]
(qvx);
-------
Looks like the double quotes show up because of comma, can you store your number using a decimal instead of comma?
Yes, it worked. Thanks a lot, Sunny.
Have a wonderful day.