Giter Site home page Giter Site logo

Comments (5)

goccy avatar goccy commented on May 22, 2024 2

This issue has been fixed in v0.1.7. If you have any problems, please reopen this.

from bigquery-emulator.

goccy avatar goccy commented on May 22, 2024 1

There is a type called ParameterMode in go-zetasql ( https://github.com/goccy/go-zetasql/blob/c0cdb2761078bdee9a269bcb29da4686d7ad4869/enum.go#L6-L19 ) that bigquery emulator uses.
As far as I know, this value can only be applied one at a time, so it may be difficult to enable positional parameter or named parameter at the same time 🤔

from bigquery-emulator.

goccy avatar goccy commented on May 22, 2024 1

I found a way to solve this problem ! I'll fix this problem as soon as possible !

from bigquery-emulator.

halnique avatar halnique commented on May 22, 2024

I have confirmed that Named Parameters is working.

$ bq --api http://0.0.0.0:9050 query --use_legacy_sql=false --parameter=id:integer:1 --project_id=test "select * from dataset1.table_a where id = @id"
[
  {
    "id": "1", 
    "name": "alice"
  }
]

bigquery-emulator logged the following.

2022-08-26T03:43:43.254Z	INFO	server/middleware.go:41	GET /discovery/v1/apis/bigquery/v2/rest	{"query": ""}
2022-08-26T03:43:43.282Z	INFO	server/middleware.go:41	POST /projects/test/jobs	{"query": "alt=json"}
2022-08-26T03:43:43.286Z	INFO	contentdata/repository.go:145		{"query": "select * from dataset1.table_a where id = @id", "values": ["1"]}
2022-08-26T03:43:43.286Z	DEBUG	contentdata/repository.go:208	query result	{"rows": [[1,"alice"]]}
2022-08-26T03:43:43.294Z	INFO	server/middleware.go:41	GET /projects/test/queries/bqjob_r3513523cffe35404_00000182d83f9a8e_1	{"query": "timeoutMs=0&startIndex=0&alt=json&maxResults=100"}

from bigquery-emulator.

halnique avatar halnique commented on May 22, 2024

Amazing! I will look forward to it.

from bigquery-emulator.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.