Free Trial

Alteryx Designer Desktop Discussions

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

Issue with the macro to download data

Annoushka
7 - Meteor

I'm struggling with the Macro I built for the challenge 101 https://community.alteryx.com/t5/Weekly-Challenge/Challenge-101-The-Search-for-Powder/td-p/119201. I compared it with the one provided in the solution, from my perspective they both work the same way. But mine gives just one row instead of populating all side codes. Any ideas why this is happening? 

 

6 REPLIES 6
IraWatt
17 - Castor
17 - Castor

That's really strange, I took your macro onto a new canvas and it ran through all the iterations: 

IraWatt_0-1656402706655.png

 

oly
Alteryx Alumni (Retired)

Hi @Annoushka ,

That was a fun one!

 

What I did first - is to use Interface Designer configuration: All iterations ill have the same output. It's really just a good higyene practice to control field types.

When I tried to run the workflow, I saw immediately that some records were creating errors on type match.

Inside your marco you parse all the fields and the column types can be sporadic.. So I used one of your existing tools to change type for the Date field and the Precipitations. Now it works perfectly!

 

To Summarize two changes

1. Interface Designer configuration: All iterations

2. Select change  type for the Date field to Date and the Precipitations to Double

 

oly_0-1656423323900.png

 

Best,

Oly

oly
Alteryx Alumni (Retired)

@IraWatt Solution - was a "baked" solution that works. The one that didn't was the "macro_issue" file.

IraWatt
17 - Castor
17 - Castor

Nice spot @oly !  So it worked in a separate workflow because in my workflow it came through as an integer not a string ?

IraWatt_0-1656424047375.png

 

oly
Alteryx Alumni (Retired)

@IraWatt , you were just running the correct workflow with the correct Macro that was posted for comparison. The WRONG workflow would only produce one record for 303 as station while 1030 as the second record had an issues of field types matching.

 

Inside the Macro for each station we are accessing the precipitation report (here for 303)

https://wcc.sc.egov.usda.gov/reportGenerator/view_csv/customSingleStationReport/daily/303:CO:SNTL%7C...

 

And than parsing it produces like 10 fields and typically they are strings, but could be different length etc....

 

Best,

Oly

Annoushka
7 - Meteor

@oly Thanks for checking my macro! You are right, when I fixed field types it started loading the data for each sensor site instead of just one. I also had to align the type and size of the Site Code field in my workflow to make it the same as in the macro unless some records were skipped because of a type mismatch between iterations. Thanks a lot :) 

Labels
Top Solution Authors