Join the Alteryx Community’s Maveryx Summer Cup event! Compete, network with others, and earn your gold through a series of challenges from July 24th to August 11th. Learn more about the event here.

Alteryx Designer Desktop Discussions

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

Standard workflow or macros

aparna0208
8 - Asteroid

Hi,

 

Need some thoughts/suggestions.

 

I am looking to build out a process using Alteryx but not sure if this is something that I can do using standard workflow or go for macros?

 

I have a folder as seen in the below image. We process files on daily/weekly/monthly basis where the output will be written to this path. There will be one folder for each month prefixed with the year(for example: 2019-01, 2021-05). The output files under this folder is used for inserting/updating records. The filename will be like Update_Contacts/Insert_Contacts along with the date. 

 

Now I'm trying to build a process where I can run the workflow on a weekly or monthly basis to get the total count of records updated/inserted every month. Say for example when I want to know the records inserted/updated for month of April, I want the workflow to read all .csv files under 2021-04 folder and look for the files with update_/insert_ and read the number of records and output the numbers. Need some inputs on this. Thank you in advance!

 

aparna0208_0-1621621945833.png

 

3 REPLIES 3
atcodedog05
22 - Nova
22 - Nova

Hi @aparna0208 

 

This blog might be helpful to you in reading the https://community.alteryx.com/t5/Alteryx-Designer-Knowledge-Base/The-Ultimate-Input-Data-Flowchart/t.... After reading the data you might be able to do necessary calculations.

 

Hope this helps 🙂

HomesickSurfer
12 - Quasar

Hi @aparna0208 

 

See attached.

 

Read the files with a Dir Tool

Identify the Year and Month

Update the Year and Month filters

Dynamic input records of each selected file

Group by filename and summarize non-Nulls

 

Capture.PNG

aparna0208
8 - Asteroid

Hi @HomesickSurfer 

 

Thanks a lot for your inputs. I was trying this based on my files and directory path. I see some issues that I'm not quite sure of and if I'm missing anything.

 

1) After the formula field to extract month and year, I see two filters which is hard coded to particular year and month. When I tried to update the macro with different year and month it is not getting passed on to the filter and by default it's showing year as 2021 and month as 01

 

2) The final output contains all .csv files like Insert, Update, Delete. But, I only need the files which starts as Insert_Contacts_/Update_Contacts_. Is there a way to do that?

 

3) Also, if I need to update the filter for year and month before each run then do I need a macro in this case? I was expecting a pop up message or something like that where I can type in the year or month. But looks like I have to update the filter every time before I run it.

 

aparna0208_0-1621635636732.png

Thank you!

Labels