Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    sahilsethi12
    @sahilsethi12
    Attaching Both the working as well as Not Working XSD
    1 reply
    Likai He
    @likai.he_gitlab
    Hi there we just update to use the atlasmap to version 2.3.2, and got an issue when loading a new schema when there are unsaved changes in the current schema.
    The screen will hang there. and conse log:
    Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'docId')
        at Function.e.updateMappedFieldsFromDocuments (mapping-util.ts:85)
        at Function.e.updateMappingsFromDocuments (mapping-util.ts:44)
        at e.n.updateStatus (initialization.service.ts:367)
        at document.ts:215
        at <anonymous>
    8 replies
    shrishti
    @shrishti:matrix.org
    [m]
    Hi @igarashitm , I am facing one issue on runtime while doing transformation. I want to transform json to xml using atlasmap. I have created one mapping file which I am attaching for your reference.
    shrishti
    @shrishti:matrix.org
    [m]
    :point_up: Edit: Hi @igarashitm , I am facing one issue on runtime while doing transformation. I want to transform json to xml using atlasmap. I have created one mapping file which I am attaching for your reference.
    There are two scenarios one positive and negative.
    1. positive scenario: When I give all all objects in JSON request it works fine as expected.
    2. negative scenarios: When I removed one of object say "paramBoolean" or "paramDatetime" object then I am getting an error for which I have attached "error1.png" and "error2.png" in error folder of zip file.
      I have also attached JSON requst for this error in error folder.
    2 replies
    shrishti
    @shrishti:matrix.org
    [m]
    I also have one query also for exporting mapping spec. Is there any way that without exporting mapping file from GUI we can put it into linux server where Atlasmap is running from a temp location where Atlasmap saves all files or something else. Thanks
    8 replies
    Likai He
    @likai.he_gitlab
    image.png
    Hi Guys. I have an use case for one to many mappings, not sure if current atalsmap has a solution for it. I am mapping an item (in this case is a property), to a target that is a collection. I want the one to many to repeat the size of the output.

    I want to map this value

    {
        "properties": {
            "Name": "Sam"
        },
        "ItemsAR": {
            "name": "name",
            "items": [
                {
                    "firstName": "first1"
                },
                {
                    "firstName": "first2"
                }
            ]
        }
    }

    Because the size of items is 2(this will be dynamic), I want the Name Sam get repeat 2 times in the outcome

    Tomohisa Igarashi
    @igarashitm
    @likai.he_gitlab that is atlasmap/atlasmap#2276, you'd need to use conditional mapping with expression, with repeat() to repeat the value and count() to count the number of a collection, here is an example in the mapping definition - https://github.com/atlasmap/atlasmap/pull/2287/files#diff-34ea1022db8cf5bd2a7334bbfe1229a7ee53dc9769b6ad7192a20d2322604edeR22
    Pranavjeet
    @pranavjeet123
    Hi Guys , Any input how I can transform atlasmap into a webcomponent ? I have to integrate Atlasmap version 12.2.3 into Angular app .
    1 reply
    Anurag Mittal
    @anuragmittal1598:matrix.org
    [m]

    Hi @igarashitm
    I have tried conditional mapping in 2.3.4 version of atlasmap. The conditional mapping is working fine when element is not collection

    Expression for conditional mapping for 1 to 1:
    Expression (IF(${request-e05a8880-d489-4f70-b1fc-ce4757fa30f3:/order/Boolean},${DOC.Constants.471177:/TrueValue},${DOC.Constants.471177:/FalseValue}))

    Expression for collection i.e. for each
    Expression (IF(${request-3e03903d-c096-47d7-bcd9-46d84052bca0:/order/Boolean<>},${DOC.Constants.216526:/TrueValue},${DOC.Constants.216526:/FalseValue}))

    Both expressions are same but in case of collection, I am getting the following error:
    io.atlasmap.api.AtlasException: Errors: [Expression processing error [IF(${request-3e03903d-c096-47d7-bcd9-46d84052bca0:/order/Boolean<>},${DOC.Constants.216526:/TrueValue},${DOC.Constants.216526:/FalseValue})]: null: Document='null(ID:IF(${request-3e03903d-c096-47d7-bcd9-46d84052bca0:/order/Boolean<>},${DOC.Constants.216526:/TrueValue},${DOC.Constants.216526:/FalseValue}))', path='null'],

    How can I define conditional mapping in case of collections?

    2 replies
    Shrishti1234
    @Shrishti1234

    Hi @igarashitm, I have one use case in which I have to use multiple source document. Both source documents have one collection which is mapped to same collection in target document. When I tried same in atlasmap only one collection is mapped to target document.
    For eg. first-collection-> attrs:[{
    "abc" :1
    }]

    second-collection-> attrs:[{
    "def" :2
    }]

    output-json of atlasmap
    -> attrs:[{
    "abc" :1
    }]

    expected -output
    -> attrs:[
    {
    "abc" :1
    },
    {
    "def" :2
    }
    ]

    image.png
    4 replies
    Kurukshetran
    @Kurukshetran
    Hi Team, is it possible to import in sts?
    1 reply
    stn1slv
    @stn1slv
    Hi Team,
    Could you please suggest how to use transformations with Input Type = None?
    For example, GenerateUUID or CurrentDate
    6 replies
    stn1slv
    @stn1slv

    Question about Format transformation function.

    I'm implementing data mapping with a source field containing timestamp (example of the value: 2020-05-31T11:16:09Z), and I need to map this value in yyyymmdd format to a target field.
    How can I use Format transformation function?

    I don't see this function in the list of available transformations for source or target in the mapping details screen.

    image.png
    6 replies
    SiebePeeters
    @SiebePeetersPXL
    Hi, Atlas Map is new for me and I got stuck on a part so i was wondering if it's possible to map a Java String value to a Java Enum value? Kind Regards.
    1 reply
    SiebePeeters
    @SiebePeetersPXL
    And is it possible to generate the adm files ourself without the user interface?
    1 reply
    Matt Farabaugh
    @mattfara
    I'm stuck at the bare basics.
    image.png

    I have a test xml file:

    <test>
    <id>3</id>
    </test>

    I have a camel route:

    @Component
    public class ImportRoute extends RouteBuilder {

    @Override
    public void configure() throws Exception {
    
        from(file("/edi/test/test_file_origin/").include("^.*\\.xml$"))
                .autoStartup(true)
                .to(
                        atlasmap("mapping/xml_to_json.adm")
                )
                .to(log("Done"));
    }

    }

    I get this exception:
    io.atlasmap.api.AtlasException: com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException: Unrecognized field "id" (class io.atlasmap.v2.DataSourceMetadata), not marked as ignorable (8 known properties: "documentType", "documentId", "name", "inspectionType", "dataSourceType", "isSource", "source", "inspectionParameters"])
     at [Source: (GZIPInputStream); line: 1, column: 2083] (through reference chain: io.atlasmap.v2.ADMDigest["exportMeta"]->java.lang.Object[][0]->io.atlasmap.v2.DataSourceMetadata["id"])
        at io.atlasmap.core.ADMArchiveHandler.getDataSourceMetadataMap(ADMArchiveHandler.java:327)
        at io.atlasmap.core.DefaultAtlasContext.<init>(DefaultAtlasContext.java:119)
        at io.atlasmap.core.DefaultAtlasContextFactory.createContext(DefaultAtlasContextFactory.java:191)
        at org.apache.camel.component.atlasmap.AtlasMapEndpoint.getOrCreateAtlasContext(AtlasMapEndpoint.java:253)
        at org.apache.camel.component.atlasmap.AtlasMapEndpoint.onExchange(AtlasMapEndpoint.java:198)
        at org.apache.camel.support.ProcessorEndpoint$1.process(ProcessorEndpoint.java:61)
        at org.apache.camel.support.AsyncProcessorConverterHelper$ProcessorToAsyncProcessorBridge.process(AsyncProcessorConverterHelper.java:66)
        at org.apache.camel.processor.SendProcessor.process(SendProcessor.java:169)
        at org.apache.camel.processor.errorhandler.RedeliveryErrorHandler$SimpleTask.run(RedeliveryErrorHandler.java:395)
        at org.apache.camel.impl.engine.DefaultReactiveExecutor$Worker.schedule(DefaultReactiveExecutor.java:148)
        at org.apache.camel.impl.engine.DefaultReactiveExecutor.scheduleMain(DefaultReactiveExecutor.java:60)
        at org.apache.camel.processor.Pipeline.process(Pipeline.java:147)
        at org.apache.camel.impl.engine.CamelInternalProcessor.process(CamelInternalProcessor.java:312)
        at org.apache.camel.component.file.GenericFileConsumer.processExchange(GenericFileConsumer.java:483)
        at org.apache.camel.component.file.GenericFileConsumer.processBatch(GenericFileConsumer.java:237)
        at org.apache.camel.component.file.GenericFileConsumer.poll(GenericFileConsumer.java:198)
        at org.apache.camel.support.ScheduledPollConsumer.doRun(ScheduledPollConsumer.java:190)
        at org.apache.camel.support.ScheduledPollConsumer.run(ScheduledPollConsumer.java:107)
        at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
        at java.base/java.util.concurrent.FutureTask.runAndReset(FutureTask.java:305)
        at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:305)
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130)
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630)
        at java.base/java.lang.Thread.run(Thread.java:831)
    Caused by: com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException: Unrecognized field "id" (class io.atlasmap.v2.DataSourceMetadata), not marked as ignorable (8 known properties: "documentType", "documentId", "name", "inspectionType", "dataSourceType", "isSource", "source", "inspectionParameters"])
     at [Source: (GZIPInputStream); line: 1, column: 2083] (through reference chain: io.atlasmap.v2.ADMDigest["exportMeta"]->java.lang.Object[][0]->io.atlasmap.v2.DataSourceMetadata["id"])
        at com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException.from(UnrecognizedPropertyException.java:61)
        at com.fasterxml.jackson.databind.DeserializationContext.handleUnknownProperty(DeserializationContext.java:855)
        at com.fasterxml.jackson.databind.deser.std.StdDeserializer.handleUnknownProperty(StdDeserializer.java:1212)
        at com.fasterxml.jackson.databind.deser.BeanDeserializerBase.handleUnknownProperty(BeanDeserializerBase.java:1604)
        at com.fasterxml.jackson.databind.deser.BeanDeserializerBase.handleUnknownVanilla(BeanDeserializerBase.java:1582)
        at com.fasterxml.jackson.databind.deser.BeanDeserializer.vanillaDeserialize(BeanDeserializer.java:299)
        at com.fasterxml.jackson.databin
    I also posted this on stack overflow if anyone wants to get points: https://stackoverflow.com/questions/71033630/camel-atlasmap-unrecognizedpropertyexception
    I should mention that originally I had a different property mapping set up, not for "id", but I still got the same exception.
    21 replies
    Matt Farabaugh
    @mattfara
    image.png
    9 replies
    Zoran Regvart
    @zregvart
    Would it be okay to backport atlasmap/atlasmap#3745 to 2.3.x and cut another 2.3.x release, or is that too much at this time? (I can create a PR for 2.3.x)
    Tomohisa Igarashi
    @igarashitm
    @zregvart yep I'll make it today
    11 replies
    Matt Farabaugh
    @mattfara
    I have an XSD which allows for one ore more FOOs. I want each FOO in the XML to map to a single Java object. In Camel, I know that I can split the XML into multiple FOOs before reaching the atlasmap component, but I'm wondering if I can do this in atlasmap completely - iow, have the output of the atlasmap component be a List of the Java object.
    2 replies
    Matt Farabaugh
    @mattfara
    I'm looking over the functions available in atlasmap. I don't see anything immediately obvious for checking whether a value is numeric. What would you suggest?
    3 replies
    Matt Farabaugh
    @mattfara
    I notice that JAR files I've loaded into AtlasMap persist between sessions, nor do they get pulled out of the "Load Java Document From Custom Class" dropdown, even after Reset all mappings and clear import documents". How can I clear out the JARs when needed?
    12 replies
    Yougal Bisht
    @YougalBisht_twitter
    I am stuck at the basic of mapping csv to java obj. Trying to creating one to many split. Problem is I am not seeing split function on dropdown. It shows me functiona like concat, count. Not the split. Could you guys help me.
    Paul Leacu
    @pleacu
    Hi Yougal - once you select a second field in the Target panel you'll notice the Split mapping appear at the top of the Details section.
    Yougal Bisht
    @YougalBisht_twitter
    Screen Shot 2022-02-24 at 9.11.38 AM.png
    1 reply
    Paul Leacu
    @pleacu
    sc0.png
    5 replies
    Yougal
    @Yougal
    @igarashitm Is there a way to copy unmapped properties to target in csv?
    12 replies
    Yougal
    @Yougal
    Hello...Can we lookup value from another csv? Eg...Let say we have a key in one csv source and (key,value) in another mapping csv file and need to map the value to target csv.
    13 replies
    muratyildiz1976
    @muratyildiz1976
    Hello everyone, in case others may have the same question: the AtlasMap Data Mapper is not capable to import XSD which has include or import statements right ?
    3 replies
    Yougal
    @Yougal
    Hello... Can I map source csv column index to target csv column name... If name in json(Field) is populate with "0" and column as 0, the code take name="0" and break saying java.lang.IllegalStateException: No header mapping was specified, the record values can't be accessed by name
    at org.apache.commons.csv.CSVRecord.get(CSVRecord.java:116)
    Screen Shot 2022-03-21 at 9.40.32 PM.png
    1 reply
    jawad-r3
    @jawad-r3

    Hello Everyone.

    I am trying to import Json Schema file for FHIR R4 specifications. Schema is given here : https://www.hl7.org/fhir/downloads.html

    When i try to import it to VS Code, it does nothing and none of specs get loaded.

    This schema provided is for all FHIR API specs. I will just be mapping Patient data from this. Not sure whats the issue. I tried loading Jar as well and that doesn't work either.
    image.png
    21 replies
    Shrishti1234
    @Shrishti1234
    HI @igarashitm , I just have one query for performance tuning in camel atlasmap. Are there any query parameters or atlasmap properties for tuning in camel 2.3.17 version.
    1 reply
    muratyildiz1976
    @muratyildiz1976
    This message was deleted
    1 reply
    Dietrich Schulten
    @dschulten
    I have created a SchemaSet which contains Elements of type xs:token. AtlasMap displays them greyed out with a label UNSUPPORTED. Why is xs:token unsupported, and what can I do about it?
    https://www.oreilly.com/library/view/xml-schema/0596002521/re95.html