Hi, I thought I should share the attached macros and hopefully others can make use of them.
All have been tested and productionised in our environment, except for the "toSFTP" macro. This is because it hasnt been fully tested as our AWS/Alteryx environment has FTP traffic disabled, but it should work :)
I was getting an error "the contents of the attachment doesn't match its file type" when trying to attach files using IE11. Using Chrome instead was the workaround.
The following outlines the functionality and dependencies of each tool:
toCSV
Functionality
Dependencies
Dependencies
Functionality
Dependencies
**Make sure to change the text "\\\\servername\\driveletter\\foldername\\WINSCP\\WINSCP.COM" inside the R tool to represent where your WINSCP.com file is located
Functionality
Dependencies
As a BI developer, I want to be able to:
Reasons why custom macros were required
Alteryx has a robust tool that allows you to output an incoming data stream to a long list of file types, but not to a compressed file
Alteryx also has a great "s3 upload" tool that allows you to output an incoming data stream to a file on Amazon s3, in formats .yxdb, .arvo, .csv and .json, but not to a compressed file
Solved! Go to Solution.
Thanks for sharing these! I see a lot of interesting problems that you tackled through the series of macros. Hopefully SFTP becomes a standard output feature in Alteryx.
Since it looks like your one macro requires it, here's the link to the WinSCP program: https://winscp.net/eng/download.php
This is awesome. I didn't know you could use R this way. When I try the zip portion, I get an status 127 error. The solution I have found on the internet suggests adding the R bin path to the environmental variables is the way to fix this error, but that did not work for me. Did you have to do anything special to get the zip function in R to work?
Hi Felice,
Just checking have these been done on the computer you are running it on?
That fixed it. Thank you.
Hi,
I'm using the: CSVtoZiptoSFTP macro, however, I'm getting the: 'had status 127' error.
Here's the entire message (specific machine/site details removed):
Warning: toCSVtoZIPtoSFTP (2): Tool #19: running command '\DELL--dmin$\WinSCP\WINSCP.COM /command "option batch on" "option confirm off" "option transfer binary" "open sftp://----:--@----" "put ""\----"" ""//upload/Address_Test.zip""" "close" "exit" test' had status 127
Any suggestions?
If you run the same command using WINSCP.COM without Alteryx, does it work?
If it does, then it could be Rtools not installed and relevant files not copied to Atleryx directories? (see above)
If it doesn't, then you'll need to change the macro to use the same command you usually use with WINSCP.
Hi Ryan,
I've downloaded R-tools as mentioned, however I have two problems:
1) I can't find the C:\program files\alteryx\ path, the only files I have are in appdata (I imagine this is actually be being dumb but maybe you can assist)
2) The error (which I imagine is related to the above) I get from a couple of tools is "Can't find plugin "AlterysRPluginEngine.dll" - could you shed any light on this? I have a similar business requirement to the above so this would be massively helpful.
Cheers,
Alex
@RyanNewsome Thanks for sharing! The ability to use the R tool to zip up output files is great.
Hi Alex,
1.) Replace c:\program files with whatever the nominated install directory was. It could even be on a totally different drive. Check with whoever installed it, or maybe just do a Windows file/folder search for Alteryx or check where the Alteryx shortcut is pointing to. As long as the directory you find has the R-3.1.2 sub directory, then you know you have found the right one :) . Which leads to......
2) Make sure the R package for Alteryx has been installed. http://downloads.alteryx.com/Latest_RInstaller.htm
If you can't see the "R" tool inside Alteryx then this would definitely be the case.
I recently created a cleaner and more flexible version of these macros. It allows much more flexibility of the output format of the file, and the toSFTP macro is fixed (we now have SFTP access from our AWS environment yay).
Please note the above ToSFTP version doesn't work due to an incorrect "update values" formula and it also doesn't allow you to specify things such as SFTP host key and port number ..sometimes people don't like using the default port 22)
Currently I only have it built as ToFileToSFTP (with a tick box inside allowing you to opt whether to delete local file after it has been sent to SFTP server... so it's missing the zip functionality.
I'll post it on the forums once the ToZip part is built, but PM me if you want a copy of it at its current state.
Hope this helps,
Ryan