Weekly Challenge

Solve the challenge, share your solution and summit the ranks of our Community!
IDEAS WANTED

We're actively looking for ideas on how to improve Weekly Challenges and would love to hear what you think!

Submit Feedback
We've recently made an accessibility improvement to the community and therefore posts without any content are no longer allowed. Please use the spoiler feature or add a short message in the message body in order to submit your weekly challenge.

Challenge #180: Thousand File Challenge

Highlighted
Alteryx Certified Partner

Another great challenge and another learning moment

 

My results:

Spoiler
Sum_num           Count Distinct Non Null_FileName
2.94538714461834           1000

My workflow:

Spoiler
180.png

 

My macro:

Spoiler
180 batchbatch.png
Highlighted
Alteryx
Alteryx

Capture.PNGCapture1.PNG

Highlighted
Alteryx Certified Partner

I think I missed why I would choose to use two Actions in my macro (one to update File Path and another to Update File Type).

 

Isn't that what the "Update Input Data Tool" action type is supposed to do for me? Seemed to work...

 

Spoiler
UpdateInputDataToolBatchMacro.PNG
Highlighted
Alteryx
Alteryx

Didn't fully read the challenge prompt, 

missed the hint,

rage quit,

finally wised up and read the prompt on my second attempt,

now we're here... 

 

Attached is my solution. 

 

Highlighted
11 - Bolide

Not elegant, but certainly fun. I learned a little about brining in files as well. Is there a list of all these codes somewhere?

Highlighted
11 - Bolide

At first, I didn't think this one would be too bad, but it took a few tries to get the correct fields returned!

 

@LordNeilLord, I had no idea that the FileGetExt function existed!

 

Spoiler
First, I unzipped the files using a RunCommand tool.

File input macro:
clipboard_image_0.png



Outer workflow:

clipboard_image_1.png


Result:
clipboard_image_2.png

 

Highlighted
Alteryx Certified Partner

@kelly_gilbert 

 

There's also FileGetFileName() & FileGetDir()!

Highlighted
17 - Castor
17 - Castor

Fun Challenge

 

Spoiler
MainMain

File Reader Macro

MacroMacro

Dan

Highlighted
8 - Asteroid
Spoiler
Keeping an eye on the XML really helped and saved me from having to use the data in the hint, although yxdb = 19 did probably help me realise what I was looking at. 

Main worflow.PNGmacro.PNG

Highlighted
Alteryx
Alteryx

That was a fun one! This is awesome practice for those getting started with Batch Macros!!