Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

In this case, dropdown will be populated with supported data types, and user will select one out of that. It will ensure the proper data type is entered.

Note : Currently we couldn't find a widget, that will provide the above mentioned combination (two text boxes and one drop down). The GroupbyAggregate plugin has a widget with 2 text-boxes and a drop-down.

1st text box - xpathMappings

drop-down - field type

2nd text box - fieldName

But the keyword "as" present in the widget may be confusing to the user.

Image Added

Or

Second Approach(Implemented):

Use two widgets as mentioned below:

...

Also, the description will include the supported data types, which will help user to enter the correct or expected types for particular field.

Note : This will require extra validations to check if the correct value for field type is entered.


Assumptions:

For every structured record received to the transform plugin, the output will also be a single structured record.

...

  1. For defining the output field types, field names and xpath value, following approach can be used:
    1. Common widget with 2 text boxes and a drop down   or 
    2. key value widget to take the output field name and xpath expression, and a second output schema widget

  2. User is able to specify what should happen when there is error in processing. Errors could be:

    1. IllegalCharacter

    2. Type conversion error

    3. NULL or EMPTY value for non nullable column value


  3. Requirement: User is NOT able to XPaths that are arrays. It should be runtime error. 

     Understanding: xPath returning multiple nodes with same name. Suppose we have below input:

    <Cities>

       
    Code Block
    languagexml
    <Cities>
        <City>Paris</City>
       
    
        <City>Lyon</City>
       
    
        <City>Marseille</City>
     
    
     </Cities>

     And user wants to extract city ['Paris', 'Lyon', 'Marseille'] and provides xPath till /Cities /City. Then as per our use case, we should throw an error.

     a. Is this understanding correct or are we missing anything on xPath arrays?

     

  4. In case, user chooses to write the error records to a separate dataset, then record will be emitted using  emitter.emitError() in transform method.

    1. Is the understanding correct?

...