I don't really understand what you need to do.
Do you need to dynamically expose attributes? SchemaScanner should help with this.
Please give us some more detail. Where is the JSON coming from? A file, an attribute, HTTPCaller?
Hi, the json comes from a httpcaller and the attributes to expose should come from the user parameters.
the source of exposable attributes can only be manually created list or from the user parameters.
No way to dynamically insert a "{} " for an array attribute ...
Possibly there is another transformer to do this?
I think what you need to do in that case is a simple Choice parameter, where you show a list of the attributes to the user, but the actual value you return has the {} part applied.
Alternatively, you could use nested parameters. For example, create a choice or text parameter and then use the contents of that parameter inside a Scripted (Python) parameter to build the correct value.
It should be fairly straightforward, but let us know if you experience problems.
I tried doing this as part of my question-of-the-week video last week, and made a complete mess of it! So I went back and looked into the issue and how to properly solve it. I hope you find this useful:
https://youtu.be/Fvhqwrzd6IM
I think the key issue is why do you need to expose attributes? To get them in the output? In that case just using a dynamic writer is the best way and - as mentioned above - the SchemaScanner is a great way to manage that.
I don't really understand what you need to do.
Do you need to dynamically expose attributes? SchemaScanner should help with this.
Please give us some more detail. Where is the JSON coming from? A file, an attribute, HTTPCaller?
You know, I had a try at this and eventually realized that you were right all along and that a SchemaScanner is the best solution. If you want to check out how I used it, here's a link to the new video: https://youtu.be/Fvhqwrzd6IM
You know, I had a try at this and eventually realized that you were right all along and that a SchemaScanner is the best solution. If you want to check out how I used it, here's a link to the new video: https://youtu.be/Fvhqwrzd6IM
@mark2atsafe FME Community 1 - 1 Safers 😁
I checked out the solution, your thought process is good. Very nice of you to include some limitations.
I never got around on doing a follow-up.
You should upload your workspace for future reference on this solution.