Home Forums Kamanja Forums Data Science & Models calling message field in pmml should be in lowercase otherwise i get compilation

This topic contains 3 replies, has 4 voices, and was last updated by  Archived_User28 1 year, 6 months ago.

  • Author
    Posts
  • #13258 Reply

    Archived_User57
    Participant

    Hi All,

    In my message I have this field

    {
    “Name”: “reportId”,
    “Type”: “System.String”
    }

    where the (Id) is capital letter.
    when I call it in my model like this <FieldRef field=”msg.reportId”/> i got compilation error

    error: value reportId is not a member of com.ligadata.messagescontainers.System_ISightIndicator_1000000_1435350341481
    def setField : Boolean = { Ind.reportid = msg.reportId; true }

    but if I use lowercase in the pmml like this <FieldRef field=”msg.reportid”/> it’s compiled successfully .

    Thanks,
    Ahmed

  • #13259 Reply

    Archived_User79
    Participant

    This is a known issue. It should be documented somewhere. I don’t believe we’re looking to fix it soon though. Low-value to work required ratio as I understand it.

  • #13262 Reply

    Archived_User19
    Participant

    for the records, this issue is resulting another (minor) issue in the scala hello world example. the output should print the (country) name as code implies:

    Array[Result](new Result(“Id”,helloWorld.id),
    new Result(“Name”,helloWorld.Name),
    new Result(“Score”,helloWorld.score))

    it is using Name (with capital N) which is actually the type of the message not its name and so the output now looks like this

    {“ModelsResult”:[{“ModelName”:”HelloWorldModel”,”ModelVersion”:”0.0.1″,”uniqKey”:”{\”Version\”:1,\”Type\”:\”Kafka\”,\”Name\”:\”testin_1\”,\”TopicName\”:\”testin_1\”,\”PartitionId\”:0}”,”uniqVal”:”{\”Version\”:1,\”Offset\”:5}”,”xformedMsgCntr”:1,”totalXformedMsgs”:1,
    “output”:[{“Name”:”Score”,”Value”:”1″},{“Name”:”Id”,”Value”:”1″},{“Name”:”Name”,”Value”:”msg1″}]}]}

    {“ModelsResult”:[{“ModelName”:”HelloWorldModel”,”ModelVersion”:”0.0.1″,”uniqKey”:”{\”Version\”:1,\”Type\”:\”Kafka\”,\”Name\”:\”testin_1\”,\”TopicName\”:\”testin_1\”,\”PartitionId\”:0}”,”uniqVal”:”{\”Version\”:1,\”Offset\”:5}”,”xformedMsgCntr”:1,”totalXformedMsgs”:1,
    “output”:[{“Name”:”Score”,”Value”:”1″},{“Name”:”Id”,”Value”:”50″},{“Name”:”Name”,”Value”:”msg1″}]}]}

  • #13263 Reply

    Archived_User28
    Participant

    In the near future, you will be able to choose if you want “case sensitivity” for your field names. This is in a branch and not available yet. Until that time, continue to use the lower case.

    There will be release notes and documentation that describes the behavior when it does get released. Watch for that.

Reply To: calling message field in pmml should be in lowercase otherwise i get compilation
Your information: