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

When referencing another query and hit an error, error message gives line number based on og query + new query #30732

Open
aarthi-subramanian opened this issue May 12, 2023 · 1 comment
Labels
.Backend Priority:P3 Cosmetic bugs, minor bugs with a clear workaround Querying/Native The SQL/native query editor Querying/Processor .Team/Querying Type:Bug Product defects

Comments

@aarthi-subramanian
Copy link

aarthi-subramanian commented May 12, 2023

Describe the bug

When referencing another query and you get an error message, the line number is not very helpful (it is counting the lines in the base query + new query). It should be line number within the current query otherwise impossible to debug/fix our query bcos we have to count the lines

To Reproduce

  1. Create some base query and save it
  2. Open a new query and reference that base query ^ using syntax {{ #100 }}
  3. Make a typo/error in your new query
  4. See an error message that asks you to correct e.g. line 50 but you dont have 50 lines in this new query. You have to go back and count liens in base query and new query and figure out which line is erroring out

Expected behavior

In the error message, it should reference the line number in just the new query if this is where the problem is

Logs

No response

Information about your Metabase installation

{
  "browser-info": {
    "language": "en-US",
    "platform": "MacIntel",
    "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/112.0.0.0 Safari/537.36",
    "vendor": "Google Inc."
  },
  "system-info": {
    "file.encoding": "UTF-8",
    "java.runtime.name": "OpenJDK Runtime Environment",
    "java.runtime.version": "11.0.15+0-adhoc..source",
    "java.vendor": "Oracle Corporation",
    "java.vendor.url": "https://openjdk.java.net/",
    "java.version": "11.0.15",
    "java.vm.name": "OpenJDK 64-Bit Server VM",
    "java.vm.version": "11.0.15+0-adhoc..source",
    "os.name": "Linux",
    "os.version": "5.4.84",
    "user.language": "en",
    "user.timezone": "GMT"
  },
  "metabase-info": {
    "databases": [
      "redshift",
      "snowflake",
      "postgres"
    ],
    "hosting-env": "unknown",
    "application-database": "postgres",
    "application-database-details": {
      "database": {
        "name": "PostgreSQL",
        "version": "14.3"
      },
      "jdbc-driver": {
        "name": "PostgreSQL JDBC Driver",
        "version": "42.5.1"
      }
    },
    "run-mode": "prod",
    "version": {
      "date": "2023-04-07",
      "tag": "v0.46.1-SNAPSHOT",
      "branch": "release-x.46.metabot-alpha",
      "hash": "b96b662"
    },
    "settings": {
      "report-timezone": null
    }
  }
}

Severity

V annoying and delays debugging time

Additional context

image

(originally came up as part of this ticket: #30334 (comment))

@aarthi-subramanian
Copy link
Author

aarthi-subramanian commented Oct 8, 2024

HI just bumping this. This is still an issue, is pretty annoying, and adjusting the line number for the error would dramatically speed up debugging time 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
.Backend Priority:P3 Cosmetic bugs, minor bugs with a clear workaround Querying/Native The SQL/native query editor Querying/Processor .Team/Querying Type:Bug Product defects
Projects
None yet
Development

No branches or pull requests

4 participants