Get Inspire insights from former attendees in our AMA discussion thread on Inspire Buzz. ACEs and other community members are on call all week to answer!

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.

Block Until Done - BUD

suby
11 - Bolide

Hi All,

 

I'm struggling to use the Block Until Done and looking for some help.

Thanks

 

suby_1-1660254407497.png

 

 

8 REPLIES 8
DanielG
12 - Quasar

@suby -- use the Blob input and blob output to move/rename files.  Oddly enough, I just dropped this into another thread about an excel file scenario.   Create fields with the OriginalPath and NewPath and use then in the Blob tools.  They are so simple it really suprised me when I first learned about them.  :)

DanielG_0-1660259858431.png

 

suby
11 - Bolide

Hi,

 

Thanks for sharing and could you please confirm why we need  OriginalPath and NewPath could you please elaborate on this.

 

Thanks

DanielG
12 - Quasar

@suby   The Blob Input Tool need to know which file (the template) to pick up, convert to a BLOB and then the Blob Output Tool needs the location/file name to convert the Blob back into Excel.  This is the easiest way to have a template file that doesn't actually get populated and "ruined".  It preserves the template (which is the OriginalPath) and makes copies in another location.  (Or you can have it in same location, and just change the file name).

 

Hopefully that helps.  I cant explain too much about what it actually does under the covers because I honestly have no idea what it does, but I know it works, as I use it in a few production processes.  😄 

 

The files that I do this with are heavily customized Excel XLSM files and the structure is preserved exactly in the Excel to Blob to Excel conversion.

suby
11 - Bolide

Hi,

 

As i mentioned in my previous posts.. the first run command runs ok and the file is copied from folder A to Folder B but if you look at the block until done tool i want to control once the file 1 is copied from folder A to folder B then all my transformations will overwrite the file 1 in  folder b which works fine  fine but i want a copy script from folder b to folder C once the overwrite file 1 is complete in folder B is where i am struggling to implement.

 

suby_0-1660315856562.png

 

 

 

DanielG
12 - Quasar

@suby If you want external code to run, why not just make a .bat file that is identical to the first except for the file locations being B/C instead of A/B?  Then attach a Run Command Tool off the 3rd output of the Block Until Done Tool with the second BAT file?  The rename can be done in the .bat file.

 

I referenced the Blob Tools because it is much simpler than maintaining .bat files and dealing with Run Command Tool.

suby
11 - Bolide

Hi Daniel,

 

Thanks for your reply and the Issue is on my screen shot i showed you only two sheets where transformations are happening but in real i have 15 sheets in total.

 

Two things I'm looking at 

 

- the real issue is when i tried running the second .bat file from folder b/c its not taking the file from folder B instead it takes the files from folder A and copies in to Folder C.

 

what i  want to implement is a solution where file 1 is completely overwritten in folder b and once this process is complete then take that file from folder b to c.

DanielG
12 - Quasar

@suby -- I dont know why it would grab from A instead of B.  That is likely an issue with the .bat code.  Alteryx isnt choosing the files at that point, so I cant imagine Alteryx is causing that problem.  Anyone else reading this please feel free to provide additional detail if I am wrong on that.  😀

Sorry for the hard sell on the Blob tools, but I think your life will be alot easier with them.  This screenshot below isn't functional so I didnt attach it, but you can just use the concept to build at the end a blob input/output to take fileB and save it as fileC.  The recordcount tool just drops all data and creates one row.  then the formula tool creates the file names. 

 

Side note: you can pass more data through instead of the recordcount if you have multiple files and need the file names to be a bit more dynamic. For simplicity sake, and if your file names are pretty static its the easiest way to drop all the noise of the data that you no longer actually need.

 

In the formula tool create the file paths which are then used to pass into the Blob Input/Ouput.  This will handle the movement of the file from B to C.  No .bat files required at all if you also do it for the movement of file from A to B. 

 

That's it for my Blob Tool Informerical.  :)  Hopefully this helps.  Good luck.  I am away on vacation after today, so if any other questions pop up hopefully someone can just in and assist.  

 

DanielG_3-1660319961136.png

DanielG_4-1660320200580.pngDanielG_5-1660320212617.png

 

 

suby
11 - Bolide

Hi Daniel,

 

That's great will explore the BLOB tool.

 

You have a Great Vacation...

 

Thanks

Labels