Skip to content

[Bug]: JSON input transform loses the field to read from when it depends on success of a database query #5953

Description

@gmitter-ef

Apache Hop version?

2.15

Java version?

OpenJDK 17

Operating system

Windows

What happened?

When the field a JSON input transform reads is dependent on the success of a database query, the field vanishes in case the SQL query fails (e.g. due to non-existent table)

See the attached zip and the screenshots.

HOP-5953.zip

How to reproduce:

  • create a simple query in a Table input transform that packs a column (e.g. "id") read from a database into a string in JSON format , stream field that contains the JSON is called "id_json"
  • read "id" out of the JSON-string via "JSON Input" transform, under "Select field:" use "id_json" in the drop-down
  • as long as the query works / table exists, the JSON input parses everything correctly
Image
  • now change the SQL query to use a NON-existing table and save the Table input transform
  • edit the JSON input transform: accept both error messages
  • what you see afterwards in the "File" tab of the "JSON input" transform is that the "Select field" LOST the field "id_json"
Image
  • if you now hit OK and save (accidentally) the pipeline is stored with empty field to read from. (Happened a lot and caused quite a lot of troubles.)

Issue Priority

Priority: 3

Issue Component

Component: Hop Gui, Component: Transforms

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions