LAE

Welcome to the LAE community!  Please feel free to start a discussion in the discussion tab or join in a conversation.

Discussions

Members

Resources

Events

 View Only
  • 1.  X-Ref Join Node Error - Please Help

    Employee
    Posted 01-17-2010 13:01

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: Iain Sanders

    Hi There,

    Can somebody please help me with the following error on the x-ref join node:

    --------- Errlog for Join
    ERROR initializing expert output:
    Error finalizing output definition for output 2: 3 field definition errors occurred while initializing output, unable to continue.

    Iain


  • 2.  RE: X-Ref Join Node Error - Please Help

    Employee
    Posted 01-18-2010 03:47

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: michaelslowey

    Hi Iain.

    Are using the code...

    "
    emit 1:*
    emit 2:*
    "
    ...on the match section?

    if so, with the implicit definition of the fields to outputs ( ie. the *) you may be outputting fields from input 2 that are already output from input 1. There may be a clash.


  • 3.  RE: X-Ref Join Node Error - Please Help

    Employee
    Posted 01-18-2010 07:11

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: timonk

    Iain,

    Yes, it could be that you have a field in both inputs that has the same name. You need to disambiguate them, if that is the case.

    For example:

    emit 1:namefield, 2:namefield

    That defines the 2 "name" fields in terms of their inputs, so they don't clash.

    Regards
    Timon Koufopoulos
    MDA Support.


  • 4.  RE: X-Ref Join Node Error - Please Help

    Employee
    Posted 01-18-2010 07:33

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: stonysmith

    You can also do it this way:

    ...
    emit 1:*
    default emit 2:*
    ...

    You just have to understand that ANY field in input 2 that has the same column name as input 1 will be omitted.


  • 5.  RE: X-Ref Join Node Error - Please Help

    Employee
    Posted 01-18-2010 11:35

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: rboccuzzi

    Iain, others are all correct in their help, but I wanted to give you a little more complete a picture. In your initial post, you did not give the complete error log, so others are trying to surmise the problem. There is an issue with defining the output, but the next couple of lines will tell you the exact problem.

    Fundamentally, you are not allowed to put two fields out on the output with the same name. When you say emit * on an x-ref, you are trying to output all the fields from both inputs, and if there are any fields with the same name, that is where a collision will occur, and you will need to deal with it.

    There are a number of ways to fix this problem, and the above posts talk about some of them. Any of these might work...not outputting all the fields, so you avoid the ones with the same name; renaming the inputs either in a previous node (there is a Metadata Rename Fields Node that can help), or rename them on the output, or provide the default keyword, so you only get unique fields from the second input.

    I hope that provides a little context. Good luck
    Rich


  • 6.  RE: X-Ref Join Node Error - Please Help

    Employee
    Posted 01-18-2010 14:17

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: Iain Sanders

    Thank you everyone for your input.

    The full error code was as follows:

    ****** Errors in node XRef_4

    --------- Errlog for Join
    ERROR initializing expert output:
    Error finalizing output definition for output 2: 3 field definition errors occurred while initializing output, unable to continue.

    Installing log (01/18/2010 08:39:12) ...
    2010-01-18 08:39:13; Level: 2; Type: 0; Desc: "2 conflicting implicit definitions for field 'Meter' found: 1:Meter (line 7) 2:METER (line 7)"; File: "\src\brain_d\ra_dev\code\source\brain\ExprTableOu tput.cpp"; Line: 837; Context: "ExprTableOutput::finishFieldDefinition()"
    2010-01-18 08:39:13; Level: 2; Type: 0; Desc: "2 conflicting implicit definitions for field 'Meter1' found: 1:Meter1 (line 7) 2:METER1 (line 7)"; File: "\src\brain_d\ra_dev\code\source\brain\ExprTableOu tput.cpp"; Line: 837; Context: "ExprTableOutput::finishFieldDefinition()"
    2010-01-18 08:39:13; Level: 2; Type: 0; Desc: "2 conflicting implicit definitions for field 'Profile' found: 1:Profile (line 7) 2:Profile (line 7)"; File: "\src\brain_d\ra_dev\code\source\brain\ExprTableOu tput.cpp"; Line: 837; Context: "ExprTableOutput::finishFieldDefinition()"
    2010-01-18 08:39:13; Level: 2; Type: 0; Desc: "3 field definition errors occurred while initializing output, unable to continue."; File: "\src\brain_d\ra_dev\code\source\brain\ExprTableOu tput.cpp"; Line: 872; Context: "ExprTableOutput::finishFieldDefinition()"
    2010-01-18 08:39:13; Level: 2; Type: 0; Desc: "Error finalizing output definition for output 2: 3 field definition errors occurred while initializing output, unable to continue."; File: "\src\brain_d\ra_dev\code\source\brain\ExprTableIo .cpp"; Line: 156; Context: "ExprTableIo::finalizeOutputs()"
    2010-01-18 08:39:13; Level: 2; Type: 0; Desc: "...exception seen"; File: "\src\brain_d\ra_dev\code\source\brain\ExprTableIo .cpp"; Line: 159; Context: "ExprTableIo::finalizeOutputs()"
    2010-01-18 08:39:13; Level: 2; Type: 0; Desc: "...exception seen"; File: "\src\brain_d\ra_dev\code\source\brain\NodeControl .cpp"; Line: 1152; Context: "Salmon::NED::NodeControl::initializeExpert()"
    Uninstalling log (01/18/2010 08:39:13) ...


  • 7.  RE: X-Ref Join Node Error - Please Help

    Employee
    Posted 01-19-2010 06:20

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: rboccuzzi

    Thanks for posting the log. So as suspected, you have three fields that have the same name on both inputs (Meter, Meter1, Profile). So any of the solutions posted above should work.

    Are you all set now?
    Cheers
    Rich


  • 8.  RE: X-Ref Join Node Error - Please Help

    Employee
    Posted 01-19-2010 07:13

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: ejones

    Adding to Rich's response and the error logs. The code I would expect to use for fixing this would likely be either:
    exclude 2:Meter, 2:Meter1, 2:Profile
    or in some cases there is an expression that could be used to derrive a new value based on the values in both inputs. For example:
    override emit 1:Meter.ifNull(2:Meter) as Meter

    Ernest


  • 9.  RE: X-Ref Join Node Error - Please Help

    Employee
    Posted 01-20-2010 20:24

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: Iain Sanders

    Thank you everyone for your help!

    I understand the issue now and have been able to fix it!

    Iain