question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Regression] [Separate] Conversion from 'STRING' to 'DOUBLE' is required but no converter is available

See original GitHub issue

Picking converters doesn’t work when using Separate. Source and target are java objects. I’ve tried with latest master and also atlasmap-1.40.0.fuse-740009.
screenshot_20190610_215618

Mapping.json:

{
  "AtlasMapping" : {
    "jsonType" : "io.atlasmap.v2.AtlasMapping",
    "dataSource" : [ {
      "jsonType" : "io.atlasmap.v2.DataSource",
      "id" : "io.atlasmap.qe.test.SourceMappingTestClass",
      "uri" : "atlas:java?className=io.atlasmap.qe.test.SourceMappingTestClass",
      "dataSourceType" : "SOURCE"
    }, {
      "jsonType" : "io.atlasmap.v2.DataSource",
      "id" : "io.atlasmap.qe.test.DatesObject",
      "uri" : "atlas:java?className=io.atlasmap.qe.test.DatesObject",
      "dataSourceType" : "SOURCE"
    }, {
      "jsonType" : "io.atlasmap.v2.DataSource",
      "id" : "io.atlasmap.qe.test.SourceListsClass",
      "uri" : "atlas:java?className=io.atlasmap.qe.test.SourceListsClass",
      "dataSourceType" : "SOURCE"
    }, {
      "jsonType" : "io.atlasmap.v2.DataSource",
      "id" : "io.atlasmap.qe.test.SmallMappingTestClass",
      "uri" : "atlas:java?className=io.atlasmap.qe.test.SmallMappingTestClass",
      "dataSourceType" : "SOURCE"
    }, {
      "jsonType" : "io.atlasmap.json.v2.JsonDataSource",
      "id" : "sourceArrays",
      "uri" : "atlas:json:sourceArrays",
      "dataSourceType" : "SOURCE"
    }, {
      "jsonType" : "io.atlasmap.json.v2.JsonDataSource",
      "id" : "sourceJsonArray",
      "uri" : "atlas:json:sourceJsonArray",
      "dataSourceType" : "SOURCE"
    }, {
      "jsonType" : "io.atlasmap.json.v2.JsonDataSource",
      "id" : "sourceJson",
      "uri" : "atlas:json:sourceJson",
      "dataSourceType" : "SOURCE"
    }, {
      "jsonType" : "io.atlasmap.xml.v2.XmlDataSource",
      "id" : "sourceXmlInstance",
      "uri" : "atlas:xml:sourceXmlInstance",
      "dataSourceType" : "SOURCE",
      "xmlNamespaces" : {
        "xmlNamespace" : [ ]
      }
    }, {
      "jsonType" : "io.atlasmap.v2.DataSource",
      "id" : "sourceXMLSchema",
      "uri" : "atlas:xml:sourceXMLSchema",
      "dataSourceType" : "SOURCE"
    }, {
      "jsonType" : "io.atlasmap.v2.DataSource",
      "id" : "io.atlasmap.qe.test.TargetMappingTestClass",
      "uri" : "atlas:java?className=io.atlasmap.qe.test.TargetMappingTestClass",
      "dataSourceType" : "TARGET"
    }, {
      "jsonType" : "io.atlasmap.v2.DataSource",
      "id" : "io.atlasmap.qe.test.StringObject",
      "uri" : "atlas:java?className=io.atlasmap.qe.test.StringObject",
      "dataSourceType" : "TARGET"
    }, {
      "jsonType" : "io.atlasmap.v2.DataSource",
      "id" : "io.atlasmap.qe.test.TargetListsClass",
      "uri" : "atlas:java?className=io.atlasmap.qe.test.TargetListsClass",
      "dataSourceType" : "TARGET"
    }, {
      "jsonType" : "io.atlasmap.json.v2.JsonDataSource",
      "id" : "targetArrays",
      "uri" : "atlas:json:targetArrays",
      "dataSourceType" : "TARGET"
    }, {
      "jsonType" : "io.atlasmap.json.v2.JsonDataSource",
      "id" : "targetJsonArray",
      "uri" : "atlas:json:targetJsonArray",
      "dataSourceType" : "TARGET"
    }, {
      "jsonType" : "io.atlasmap.json.v2.JsonDataSource",
      "id" : "targetJson",
      "uri" : "atlas:json:targetJson",
      "dataSourceType" : "TARGET"
    }, {
      "jsonType" : "io.atlasmap.v2.DataSource",
      "id" : "targetXMLSchema",
      "uri" : "atlas:xml:targetXMLSchema",
      "dataSourceType" : "TARGET"
    } ],
    "mappings" : {
      "mapping" : [ {
        "jsonType" : "io.atlasmap.v2.Mapping",
        "inputField" : [ {
          "jsonType" : "io.atlasmap.java.v2.JavaField",
          "actions" : [ {
            "delimiter" : " ",
            "@type" : "Split"
          } ],
          "docId" : "io.atlasmap.qe.test.SourceMappingTestClass",
          "path" : "/sourceString",
          "fieldType" : "STRING",
          "name" : "sourceString"
        } ],
        "outputField" : [ {
          "jsonType" : "io.atlasmap.java.v2.JavaField",
          "docId" : "io.atlasmap.qe.test.TargetMappingTestClass",
          "index" : 0,
          "path" : "/targetDouble",
          "fieldType" : "DOUBLE",
          "name" : "targetDouble"
        }, {
          "jsonType" : "io.atlasmap.java.v2.JavaField",
          "docId" : "io.atlasmap.qe.test.TargetMappingTestClass",
          "index" : 1,
          "path" : "/targetCombineString",
          "fieldType" : "STRING",
          "name" : "targetCombineString"
        } ],
        "id" : "mapping.398777"
      } ]
    },
    "lookupTables" : {
      "lookupTable" : [ ]
    },
    "constants" : {
      "constant" : [ ]
    },
    "properties" : {
      "property" : [ ]
    },
    "name" : "UI.491830"
  }
}

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:8 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
mmelkocommented, Jun 13, 2019
0reactions
igarashitmcommented, Jun 13, 2019

So can you file a separate issue, having different field types at target side of split case?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Methods To Convert Java String To Double [With Examples]
In this tutorial, we will learn to convert Java string to double data type using four different methods along with programming examples.
Read more >
sklearn-LinearRegression: could not convert string to float
A quick solution would involve using pd.to_numeric to convert whatever strings your data might contain to numeric values.
Read more >
How can I quickly convert many string variables to numeric ...
Then we will address the case where the string variables actually contain strings, and the goal is to assign each value the string...
Read more >
How to convert a string variable to a numeric variable - YouTube
Watch how to convert a string variable to a numeric variable. Copyright 2011-2019 StataCorp LLC. All rights reserved.
Read more >
Convert String to Double in Python (3 Easy Methods) - FavTutor
Learn how to convert string to double in python. This includes float(), decimal(), and tonumeric() methods.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found