Skip to content

Deployment of sql_task (file) is not working #860

@antgei

Description

@antgei

Expected Behavior

Current Behavior

Problem 1

ValidationError: 1 validation error for Deployment workflows -> 0 -> Workflow -> tasks -> 2 -> sql_task -> file -> file field required (type=value_error.missing)

This is wrong according to current API, expects sql_task -> file -> path:
https://docs.databricks.com/api/workspace/jobs/create

Problem 2

The scond problem is that "libraries" including the .whl are appended to all tasks, this is not allowed for sql_task

{
            "sql_task": {
               ...
            "libraries": [
                {
                    "whl": "dbfs:/dbx/dwh-databricks-jobs/0d8888c4345e41a99e9c370c60232ee9/artifacts/dist/dwh_core-0.0.1-py3-none-any.whl"
                }
            ]
        }
SQL Task does not support dependent libraries. Remove the '
             'dependent libraries and retry again.'

Steps to Reproduce (for bugs)

dbx deploy ...

...
{
    "task_key": "create_view",
    "sql_task": {
      "file": {
        "path": "/Repos/.......create_view.sql",
        "source": "WORKSPACE"
      },
      "warehouse_id": "<ID>"
}

Context

Your Environment

  • dbx version used:
  • 0.8.18
  • Databricks Runtime version:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions