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

SNOW-1904824: Add project definition file schemas #2037

Open
sfc-gh-vtimofeenko opened this issue Jan 31, 2025 · 0 comments
Open

SNOW-1904824: Add project definition file schemas #2037

sfc-gh-vtimofeenko opened this issue Jan 31, 2025 · 0 comments
Labels
enhancement New feature or request

Comments

@sfc-gh-vtimofeenko
Copy link

Description

JSON Schema Store project provides the format for declaring configuration file schemas. These schemas can be plugged into editors to provide completion and linting.

Project definition files currently:

  1. Require having the online documentation open while working on them
  2. May be syntactically correct and pass initial validation but Snowflake will refuse to create the object (example below)
Sample failing project definition file
definition_version: '2'

mixins:
  snowpark_shared:
    artifacts:
      - dest: my_snowpark_project
        src: app/
    stage: dev_deployment

entities:

  hello_function:
    type: function
    identifier:
      name: hello_function
    handler: functions.hello_function
    signature:
      - name: name
        type: strring  # <--- typo here
    returns: string
    meta:
      use_mixins:
        - snowpark_shared
❯ snow snowpark build && snow snowpark deploy          
Resolving dependencies from requirements.txt
  No external dependencies.
Preparing artifacts for source code
  Creating: app.zip
Build done.
Performing initial validation
Checking remote state
Preparing required stages and artifacts
  Creating (if not exists) stage: dev_deployment
  Uploading app.zip to @DROPME.PUBLIC.dev_deployment/my_snowpark_project/
Creating Snowpark entities
  Creating function hello_function
╭─ Error ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ 002040 (42601): 01ba115d-0807-3c0f-0057-53030711148a: SQL compilation error:                                                                                │
│ Unsupported data type 'STRRING'.                                                                                                                            │
╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯

Use cases:

  1. Developers using supported editors could iterate on project definition files faster and with lower amount of errors
  2. CI/CD pipelines could lint the project definition files early and stop the pipeline if the validation fails

Context

No response

@github-actions github-actions bot changed the title Add project definition file schemas SNOW-1904824: Add project definition file schemas Jan 31, 2025
@sfc-gh-astus sfc-gh-astus added the enhancement New feature or request label Jan 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants