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

Can't pass in the limit query parameter #250

Open
cyyeh opened this issue Jul 22, 2023 · 1 comment
Open

Can't pass in the limit query parameter #250

cyyeh opened this issue Jul 22, 2023 · 1 comment
Labels
needs-triage type/bug Something went wrong

Comments

@cyyeh
Copy link
Member

cyyeh commented Jul 22, 2023

Environment

  • Version:

    cli version: 0.6.0
    build version: 0.6.0
    serve version: 0.6.0
    
  • OS: macOS

What's wrong?

With the syntax below, if I specify type: number in the YAML, it seems to work. But if I don't pass the parameters, the default filter gives me the same error, "limit must be number"

I used BigQuery

select * from some_table
limit {{ context.params.limit | is_integer | default(10) }}

What's the correct behavior?

The syntax should work.

Note:

  • I've tested the same condition using PostgreSQL and it's ok.
  • This issue is raised by our user rtkfan in Discord

Reproducing steps

@cyyeh cyyeh added type/bug Something went wrong needs-triage labels Jul 22, 2023
@cyyeh
Copy link
Member Author

cyyeh commented Jul 28, 2023

I've checked using BigQuery with [email protected], and I still can't reproduce the issue. Here are the vulcan.yaml and profiles.yaml

vulcan.yaml

name: 'bq-testing'
description: A starter Vulcan project
version: 0.2.0
template:
  provider: LocalFile
  # Path to .sql files
  folderPath: sqls
  codeLoader: InMemory
artifact:
  provider: LocalFile
  serializer: JSON
  # Path to build result
  filePath: result.json
schema-parser:
  reader: LocalFile
  # Path to .yaml files
  folderPath: sqls
document-generator:
  specs:
    - oas3
types:
  - RESTFUL
auth:
  enabled: false
enforce-https:
  enabled: false
response-format:
  enabled: true
  options:
    default: json
    formats:
      - json
      - csv
extensions:
  duckdb: '@vulcan-sql/extension-driver-duckdb'
  bq: '@vulcan-sql/extension-driver-bq'

profiles.yaml

- name: duckdb
  type: duckdb
  allow: "*"
- name: bq
  type: bq
  allow: "*"
  connection:
    location: US
    projectId: 'cannerflow-286003'
    keyFilename: '/Users/cyyeh/cannerflow-286003-7e47d409e299.json'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-triage type/bug Something went wrong
Projects
None yet
Development

No branches or pull requests

1 participant