Optimisation suggestions welcome

I wonder if an experienced user might be interested in taking a look at this flow to see if / where it could be optimised. I am on day 3 of my trial and although i can get the desired end result it feels like i am taking a more convoluted route than necessary. Has been a really good example though to learning about EDT and what it can do (other new users may find it useful to dig into).

Basically i have a test file which is the json response of an API query to setlist.fm. From that i want to extract all the song names to create an ordered markdown list. This on its own is straightforward. In addition to this though (and the bit in the flow that i think is a bit clunky) is that i also want to extract any notes about a song (contained in a node ending with .info) and the band covered (contained in a node called ending cover.name) for songs that were a cover version. Obviously not all songs have these components.

The end result i want is a single column with: [Song info] Song name (Cover band) for each song in the setlist. And obviously the notes and cover band info should only appear for songs that have that have either / or those components in the original json.

Have attached the json file and my test flow. Look forward to hearing where i might be able to improve this.

Edit: as a new user i can’t attach the relevant files. Oh well…

I you email the data to our support email I will post it here. Ideally a simplified sub-set of the real data you are inputting and the corresponding data you want to output.

Thanks. Emailed now. The flow works as intended so the desired output can be seen in the example. It just feels a bit convoluted on the upper branch.

Files:

rhcp-setlist.json (3.4 KB)

setlist_wMerge.transform (10.4 KB)

I got it from this:

To this:

I believe the output is identical.

setlist_wMerge-2.transform (13.3 KB)

Note that I input the JSON as long (not wide):

image

Generally it is best to avoid Transpose unless you really have to.

Excellent! Yes - that is far easier :rofl:

Still - i learned a lot hacking away at it the other way.

1 Like

Hi,

@Admin, Changed from

6648f340b34193f70274f4e7b5fa34594dff45be_2_690x59

to this (as in the original their is cover mentioned in brackets and also 2 outputs one for markdown and other one as plain text).

@oddballs, now it is same as your original transformation. I have set the output to disable, revert back to overwrite if you need the output files.

Transform file.
setlist_wMerge-3.transform (5.2 KB)

2 Likes

Many thanks @Anonymous . That’s perfect. I am learning a lot from the files that you and others share on the forum.

1 Like