|
Rank: Newbie
Joined: 9/4/2014 Posts: 6 Location: Maleny
|
We are using multiple data sources with a URL to each of them. Each is an endpoint for our API.
One parameter will change for each of the mapping transforms, i.e. the same parameter for each of the URLs. That is, our "Migration ID" to identify which data set is to be transformed.
Our intention is to use generated Java and the command line input to perform these ongoing transforms.
Whilst we could use the dynamic filename system, the number of URLs and their length would make this a "messy" option. Whereas, a simple wildcard with the "Migration ID" as a command line input would be very nice :)
Any clues on how this could be achieved?
Thank you.
Garry
|
|
Rank: Advanced Member
Joined: 8/29/2012 Posts: 146 Location: atlanta
|
Well, if you use an input parameter, you can supply a directory and simply wild card the contents. the downside is that mapforce will suck in all the files and process at once. if you have a significantly large map and even small files, you may run in to memory issues.
if you use java generated code, you can simply make an alternate run() method of your designed to pass in a file name generated from an external call. i designed a program that modifies the java generated code prior to compilation to add numerous extra interfaces to the maps.
garrycl wrote:We are using multiple data sources with a URL to each of them. Each is an endpoint for our API.
One parameter will change for each of the mapping transforms, i.e. the same parameter for each of the URLs. That is, our "Migration ID" to identify which data set is to be transformed.
Our intention is to use generated Java and the command line input to perform these ongoing transforms.
Whilst we could use the dynamic filename system, the number of URLs and their length would make this a "messy" option. Whereas, a simple wildcard with the "Migration ID" as a command line input would be very nice :)
Any clues on how this could be achieved?
Thank you.
Garry
|
|
Rank: Newbie
Joined: 9/4/2014 Posts: 6 Location: Maleny
|
Thanks for that.
However, these are URL's to an API.
E.G.: http://branches.xxxxx.com/api/app/api/rest/accounts/get/xml/?data=<Accounts><JID>1645.bzo7fdts23551ex4e88uo791p44c3a9ca56a02ca599c0855</JID><SourceOrTarget>Source</SourceOrTarget><System>1</System></Accounts>
The JID is what will need to be replaced for each job.
All the best.
Garry
|
|
Rank: Advanced Member
Joined: 6/16/2006 Posts: 486 Location: AT
|
Looks like you could use "concat" to build your URL from two constants and the JID value and map the result to the filename node. The JID value can come from an input parameter component, an XML file, a text file, etc.
|
|
Rank: Newbie
Joined: 9/4/2014 Posts: 6 Location: Maleny
|
Fantastic, the "concat" did the job :)
The command line now has only one arg, e.g: /JID 1645.bzo7fdts23551ex4e88uo791p44c3a9ca56a02ca599c0855
Thank you.
Garry
|
|
guest |