Expand my Community achievements bar.

Query to Snowflake and Processing Data

Avatar

Level 4

Hello,

I have an easy question for the greater minds on here. I've created a simple https query to test snowflake environment. I'm trying to process the data I receive by iterating through it and I'm having some difficulty with that step.  

In detail - 
1. The returned results look like this - 

D____D_0-1742827080744.png

2. the data is captured into a module that looks like this 

D____D_1-1742827119825.png

3. Sample of data when passing through this get Data.data module

D____D_2-1742827143948.png

4. This is converted into an Array 

 
 

Screenshot 2025-03-24 at 10.30.42.png

 5. Then iterated ... 

Screenshot 2025-03-24 at 10.31.30.png

Question - If I only wanted to read the email column in the next module, how do I do that? 

 
 

 



Topics

Topics help categorize Community content and increase your ability to discover relevant content.

21 Replies

Avatar

Community Advisor

You can do

  • Iterator on Data.data
  • then grab the 4th array element: get( {the value from the iterator} ; 4 )

Avatar

Level 4

Okay that sound promising ... I just came across the get function but used in different way than this.  Let me give that a try.

Avatar

Level 4

Hmm no go. 

 

Can't "iterate" on {{#.Data.data}} because it's not an array
I have to use my created array 

D____D_0-1742847442566.png

.. when I try your idea 

D____D_1-1742847512286.png

Comes up empty ...

D____D_2-1742847571126.png
The issue seems to be that the iterator is putting the values outside of "Value" .. i have actually never seen this behavior before ... here's what I mean ... 

D____D_3-1742847674278.png

 




Avatar

Community Advisor

so if this is what the first module returns

SveniX_0-1742847915939.png

 

Then you should be able to put Data.data into the iterator - but skip the transform to JSON.  Iterator right after the snowflake module

Avatar

Level 4

I must be doing something wrongly or that just doesn't work ... 
simple scenario

D____D_0-1742849469777.png

results from snowflake

D____D_1-1742849486595.png

iterator on {{3.Data.data}}

D____D_2-1742849542877.png

 

returns nada  

D____D_3-1742849565870.png

I feel like I'm really missing something simple here 

Avatar

Community Advisor

sorry for the late response. I noticed that your {{3.Data.data}} is not solid blue. 
What does the picker show? It might be something silly like {{3.data.data}}... 

Avatar

Level 4

it's not solid blue because I hard coded the entry myself as {{3.Data.data}} ... but you have a point about it not eing solid, I'll try lower case in a bit and post here 

Avatar

Community Advisor

You should be able to select it in the UI/picker though. 

To test, do a setvalue (or multiple) and see what you can grab from the HTTP module

 

Avatar

Level 4

No go ... so I've tried iterating directly from the HTTPS Query since that's already doing parse ... the get ( ) function doesn't seem to work (unless if i'm doing it wrongly which I'm okay with because it' means that there's a way) ... I've also tried my method which involved converting it the {{3.data.data}} into an array 

D____D_0-1742909195492.png

I can see the results correctly (assuming it is correct) 

D____D_1-1742909269155.png

then passing that array into the iterator ...  which the hopes that I can just say return item 4

D____D_2-1742909314223.png

but when I look at the iteration ... what's odd is that nothing ends up in the Value section .. all the arrays appear "outside" the value ..something I haven't seen before which tells me that I'm probably doing something wrongly ... just not sure what 

D____D_3-1742909424940.png

 







Avatar

Community Advisor

can you click on the filter just after the HTTP module and show what it displays from the module

Avatar

Level 4

that's empty 

D____D_0-1742913794128.png

 

Avatar

Community Advisor

Of course. Please click into one of the condition fields and screencap what pops up

 

Avatar

Level 4

Sure ... 

D____D_0-1742918138808.png

 

Avatar

Community Advisor

weird that looks different from how the output bundle is described. 
Can you try putting the [1][] array into an iterator? Not by typing but by clicking it when you open the iterator

Avatar

Level 4

IKR - that's what I said! LOL  
Yea, I have never seen it pull the data like that before ... I'm starting to wonder if it's some kind of bug with OAuth2.0 Module ...or again just how I'm doing it. I had actually tried that some time ago .. 

D____D_0-1742932703197.png

but always ended up getting this ... 

D____D_1-1742932737726.png

 

 





Avatar

Community Advisor

Omg this is getting personal  
we could try not having the HTTP module parse it, and letting you parse the data? 

 

Sorry - I don't have snowflake otherwise I'd try myself instead of guessing

Avatar

Level 4

You can set up Snowflake for a 30-day trial, and I understand how you feel. 

 

I'm submitting a ticket to Adobe because I'm leaning on the side of "this shouldn't be this hard or work this way."  

I do appreciate your efforts and ideas!! If they provide a solution, I'll post it here.

Avatar

Community Advisor

Hey - if you're game - can you do this: 

  1. Turn off parsing in the HTTP module
  2. send me the module output 
    SveniX_0-1743017199096.png

     

I'm not enough of a dev to make my 30days with snowflake useful  

Avatar

Level 4

So it turns out that it was the approach, after all, and the iterator module. I don't think the Adobe rep can actually say that   but the solution presented does not even use an iterator but instead focuses on creating a repeater using the HTTP DATA module output only - not that far from what you suggested but with a slightly different approach.

 

- get the data

- use the number of rows value from data to set a repeater 

- compose a string to use in another string - depth

- compose a string within a get ( ) data function, like what you had suggested to get the value

D____D_0-1743029398046.png

 

repeater config

D____D_1-1743029478375.png

first compose string

D____D_2-1743029493386.png

final compose string (ignore the double quotes and "+" symbols)

D____D_3-1743029504376.png

actual configuration looks like this:

D____D_0-1743029717852.png

 

 

results

D____D_4-1743029515267.png

 

 

Avatar

Community Advisor

Bloody heck that's some serious gymnastics to get at the data you need. 
I'm still interested in noodling on this myself - if you DM me the raw HTTP output - but I understand if you'd rather not. 

Glad you got it working!