Skip to content
This repository has been archived by the owner on Dec 11, 2022. It is now read-only.

How to write subquery without from clause getting interpreted as project name #294

Closed
TimMurnaghan opened this issue Dec 18, 2020 · 0 comments · Fixed by #318
Closed

How to write subquery without from clause getting interpreted as project name #294

TimMurnaghan opened this issue Dec 18, 2020 · 0 comments · Fixed by #318
Milestone

Comments

@TimMurnaghan
Copy link

Bug Report

I can't figure out how to write a query involving a subquery as it trys to interpret the from clause as a project

Expected Behavior

I can write a vaid biquery involve multiple from clauses

Actual Behavior

message:"Invalid project ID 'NNEST('$allusers''. Project IDs must contain 6-63 lowercase letters, digits, or dashes. Some project IDs also include domain name separated by a colon. IDs must start with a letter and may not end with a dash."

Steps to Reproduce the Problem

  1. SELECT JSON_EXTRACT(jt, '$.email') as users from UNNEST('$allusers') as jt,

(i.e. It's a step towards the incredibly obvious - but really hard to do - thing of translating an id in a log to a meaningful name via a grafana variable. The query fragment isn't right yet but it should be enough of an example)

It may be better to have a project selector like in the builder rather than breaking the bigquery language by limiting what we can write?

Specifications

  • Version: 1.0.7
  • Platform:
  • Grafana Version: 7.3.5
@ofir5300 ofir5300 added this to the 2.0.2 milestone Mar 31, 2021
ofir5300 added a commit that referenced this issue Mar 31, 2021
…s & table ID's which is stored in Grafana variables (Git: #294, #314)
@ofir5300 ofir5300 mentioned this issue Apr 1, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants