vulcan-sql icon indicating copy to clipboard operation
vulcan-sql copied to clipboard

Can't pass in the limit query parameter

Open cyyeh opened this issue 2 years ago • 1 comments

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 avatar Jul 22 '23 03:07 cyyeh

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'

cyyeh avatar Jul 28 '23 02:07 cyyeh