IMPORTANT:
this is not a Support Forum! Experienced users might answer from time to time questions posted here. If you need a professional and reliable answer, or if you want to report a bug, please contact Altova Support instead.

Data Source URL Wildcards Options · View
garrycl
Posted: Wednesday, October 22, 2014 3:47:34 AM
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
pfisher44
Posted: Wednesday, October 22, 2014 2:19:10 PM
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
garrycl
Posted: Thursday, October 23, 2014 6:25:47 AM
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
that
Posted: Thursday, October 23, 2014 9:32:53 AM
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.
garrycl
Posted: Friday, October 24, 2014 4:14:03 AM
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
Users browsing this topic
guest

Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Use of the Altova User Forum(s) is governed by the Altova Terms of Use.