I successfully created a workflow that downloads a file from SFTP. After processing the file I want to delete the version on the SFTP site. I copied my download workflow and changed the HTTP Action to DELETE. I add some screenshots of my workflow and some of the settings. When I run the workflow I get no error messages but the file is not deleted. I looked for a solution in the Community but can only find mentions of up- and download problems. Anyone solved this yet?
Solved! Go to Solution.
Are you downloading and deleting all in a single download tool?
No. I have a workflow for the download. Then some workflows in between to do some data work and loading to SQL and only then do I do the delete in a different workflow with a different download tool. I do this to make sure that the file is not broken after I have done all the other things.
What are the other configuration options you used in the Download tool that performs the DELETE?
The screenshots in my original post show all the configuration options I have changed. Everything else was left as is. I changed nothing in the Headers tab. I added my username and password in the Connection tab and left the Maximum Connections as 1 and Timeout as 0.
In the Input Tool I just specify the SFTP site and file.
Have you tried to uncheck the box "Encode URL Text"?
Tried it just now. It does nothing. These are the messages I get (I am just masking some things like servers etc.):
File_Output: Download (45): \\servername\folder\all_customers.txt | Data Downloaded to \\server\folder\all_customers.txt
End: Designer x64: Finished running Delete FTP File.yxmd in 1:22 minutes
I don't have an SFTP I can test with at the moment; so I admit this is just a guess... have you tried to change your output (tab one, basic configuration) to a string field instead of a file?
If that fails, then I'd be interested to know if there is a tool that you can successfully delete the file with.
If you can successfully delete the file with another tool (and therefore not a permissions issue); I would do that with Fiddler open and confirm you have all of the elements set up the same way in Alteryx.
So I figured out how to use Fiddler :-). This is the error message I get:
DELETE /Folder/all_customers_201510.txt?sftp://sftp.intranet/Folder/all_customers_201510.txt HTTP/1.1
The URL I supply looks like this:
sftp://sftp.intranet/Folder/all_customers_201510.txt
It looks like Alteryx adds the first bit and then the SFTP site does not understand it. I am no expert but I think it should read:
DELETE sftp://sftp.intranet/Folder/all_customers_201510.txt
Tried various ways to get Alteryx to read it as such but I am not successful.
Try this:
Only pass the URL field to the Download tool.
In the Download tool
Option tab one (Basic)
URL field: URL (Check box to encode URL)
Output to a Field: String
Option tab two (Headers)
No changes
Option tab three (Payload)
HTTP Action: Delete
Radio button should be selecting "Compose Query String/Body" with no other options set.
Option tab four (Connection)
Enter credentials if you need to
That should set the request up the way you need it.