Forum Discussion
@acesario, take a look at the XML Generator snap. Paste your XML + Velocity in its Edit XML template, create an input view, and feed your Mapper into the XML Generator. It will output your XML as a string value to the $xml key.
This is a good descriptio of the XML Generator usage.
I have found it good practice when working with SOAP Services that once you have the Request Template generated, copy the template over to an XML Generator Snap. This helps with building the request before making repeated failed calls to the service and helps with triage of failed requests and/or errors that may pop-up after deployment.
If you generate a separate Avro schema for each data file, you could save the schema to a file on sldb, then invoke a child pipeline using Pipe Exec, setting a pipeline parameter to specify the Avro schema file’s path. In the Avro Formatter in the child pipeline, the schema setting would be an expression you’d set to the value of the pipeline parameter.
Thank You @ptaylor … I am looking directions on ways to generate Avro schema dynamically using data file or copybook structure. Once the schema is generated and created in sldb I can sue above method to pass that to child pipeline so that Avro formatter can use it while creating Avro target file in S3.