Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Database lookup: Wrong SQL statement when selecting Table (correct when selecting Schema -> Table) #3113

Closed
gertwieland opened this issue Jul 27, 2023 · 1 comment
Assignees
Labels
Milestone

Comments

@gertwieland
Copy link

gertwieland commented Jul 27, 2023

Apache Hop version?

2.5

Java version?

openjdk version "11.0.9.1" 2020-11-04 OpenJDK Runtime Environment AdoptOpenJDK (build 11.0.9.1+1) OpenJDK 64-Bit Server VM AdoptOpenJDK (build 11.0.9.1+1, mixed mode)

Operating system

Windows

What happened?

In Database Explorer, there are two ways to select a table:

  1. Schema -> Table
  2. Table

When selecting 1) Schema -> Table, in the Database Lookup transform, it puts no squared brackets [ ] around the schema name.
In this case, the "Get lookup field" steps works.

But when selecting 2) Table, it does put squared brackets around the schema name.
In this case, the "Get lookup field" returns an error like

Couldn't get field info from [SELECT TOP 1 * FROM [[sap]].TableName"]
Unclosed quotation mark after the character string '[sap].TableName'.

Note the double squared brackets.

EDIT: When you started the wrong way, it's not possible to fix it. It will fix the lower part "Get lookup fields", but it will refuse to populate the "Table field" in the upper section.
Workaround: Start from scratch and select table via Schema -> Table

Issue Priority

Priority: 3

Issue Component

Component: Hop Gui

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants