Hello,
I would like to share the following macros, which are improved versions of the macros I posted here - http://community.alteryx.com/t5/Data-Preparation-Blending/output-to-CSV-ZIP-S3-bucket-SFTP-macros-at...
It is awesome that Alteryx has allowed SFTP upload in version 10.5 by using the download tool, but hopefully in future versions the process will be made much simpler i.e. only having to use 1 tool. The following knowledge base article shows how to do it if you are interested - http://community.alteryx.com/t5/Alteryx-Knowledge-Base/Upload-to-SFTP-FTP-More-Examples-with-Alteryx...
There is also a SFTP upload macro that @danielbrun kindly shared, which can be found here - http://community.alteryx.com/t5/Data-Sources/SFTP-macro-for-Alteryx-upload-directly-to-SFTP/m-p/2135... - This is a nice simple one to use and may meet most peoples needs.
The biggest benefits of the following macros compared to the previous versions I posted are:
IMPORTANT: Ensure to refer to Dependencies listed for each macro
toFile
Functionality
If any mandatory fields are left blank, the macro will show an error and will not execute and cause your workflow to fail e.g.
Dependencies
toFileToZIP
Functionality
If any mandatory fields are left blank, the macro will show an error and will not execute and cause your workflow to fail e.g.
Dependencies
toFileToSFTP
IMPORTANT:
Some users may get an error code status 127 returned from WINSCP (turn on "show macro messages" to see this).
Functionality
If any mandatory fields are left blank, the macro will show an error and will not execute and cause your workflow to fail e.g.
Please note, the first time you configure the macro in your workflow, it will show the following error message:
Ignore this error message. Once you have run the workflow and save it after a successful run, the error message will no longer appear
It is highly recommended to always enable "show all macro messages" in the Runtime tab in Alteryx when using this macro, for troubleshooting purposes, especially when using it as part of a workflow that has been deployed to Alteryx scheduler
Dependencies
toFileToZipToSFTP
IMPORTANT:
Some users may get an error code status 127 returned from WINSCP (turn on "show macro messages" to see this).
Functionality
If any mandatory fields are left blank, the macro will show an error and will not execute and cause your workflow to fail e.g.
Please note, the first time you configure the macro in your workflow, it will show the following error message:
Ignore this error message. Once you run the workflow and save it after a successful run, the error message will no longer appear
It is highly recommended to always enable "show all macro messages" in the Runtime tab in Alteryx when using this macro, for troubleshooting purposes, especially when using it as part of a workflow that has been deployed to Alteryx scheduler
Dependencies
Solved! Go to Solution.
I noticed that if you are dealing with a large amount of data, the ToFileToZip, ToFileToSFTP and ToFileToZipToSFTP macros run really slow and will also return the following error most times:
The R.exe exit code (4294967295) indicated an error.
I got this when inputting 6GB worth of data.
Thanks to @KaneG's response on the following post: http://community.alteryx.com/t5/Advanced-Analytics/Boosted-Model-Error/td-p/5509 which pointed me in the right direction to realise it is memory overload related issue (even though I am using R 64 bit and the machine I am using has 64GB of ram?)
The reason why this happens with the macros posted, is because the ToFile macro pushes out the whole data set to its macro output, which then is read into the R tool as a data frame inside the ToFileToZip, ToFileToSFTP and ToFileToZipToSFTP macros.
I experimented with using the as Data Frame:Chunked: option highlighted on this page: https://help.alteryx.com/9.5/R.htm , but it did not help for me.
If you get this issue, please use the attached replacement for the ToFile macro, which instead of outputting all the incoming data, it outputs the FileCreateCompletionTime (1 row of data)
If anyone has experienced this and has succesfully managed to read in a large amount of data as a data frame to the R tool, please could you share how you did it?
Below shows the changes made for the alternative version of ToFile.yxmc attached to this post.
If you are pushing in smaller amounts of data to these macros, you should not have to worry about this.
ryan
Hi,
Thank you for this - very useful. Is it possible to quote the output when it is saved to file? At the mo it exports as follows a,b,c whereas I would like to get it to output as "a","b","c"
Thanks
Hi,
Has anyone else received a "the entry point is invalid" and were you able to get it fixed?