Comments (5)
yep, it revealed another usability bug :D
from databricks-sdk-py.
OK, for completeness, noting here that I changed the title. Also, with your guidance, I now have something that is more syntactically correct:
import os
from databricks.sdk import WorkspaceClient
from databricks.sdk.service.jobs import JobTaskSettings, NotebookTask, NotebookTaskSource
host = os.getenv('DATABRICKS_HOST')
token = os.getenv('DATABRICKS_TOKEN')
w = WorkspaceClient(host = host, token = token, auth_type = "pat")
w.jobs.create(
job_name = 'my-job',
tasks = [
JobTaskSettings(
description = "My job.",
existing_cluster_id = "1128-232547-p64vrmx2",
notebook_task = NotebookTask(
base_parameters = {""},
notebook_path = "/Users/[email protected]/go-fakedata",
source = NotebookTaskSource("WORKSPACE")
),
task_key = "my-key"
)
]
)
However, I now get this type error:
TypeError: __init__() missing 16 required positional arguments: 'dbt_task', 'depends_on', 'email_notifications', 'job_cluster_key', 'libraries', 'max_retries', 'min_retry_interval_millis', 'new_cluster', 'pipeline_task', 'python_wheel_task', 'retry_on_timeout', 'spark_jar_task', 'spark_python_task', 'spark_submit_task', 'sql_task', and 'timeout_seconds'
None of these apply to my use case here.
from databricks-sdk-py.
@PaulCornellDB yes, i have to default to None all non-required fields in dataclasses and regenerate
from databricks-sdk-py.
one more thing: you don't have to read env vars, because it supports the same Unified Auth semantics as Go SDK. still need to add unit tests to ensure it's not breaking and compliant
host = os.getenv('DATABRICKS_HOST')
token = os.getenv('DATABRICKS_TOKEN')
from databricks-sdk-py.
fixed in v0.0.2
from databricks-sdk-py.
Related Issues (20)
- [ISSUE] DATABRICK SDK , how to pass output of one notebook to another notebook as input HOT 1
- [ISSUE] notebook native auth failing on container clusters
- [ISSUE] workspace import fails if simplejson is not installed
- [ISSUE] Can't get run result for notebook runs longer than 20 minutes
- [ISSUE] Creating Personal Cluster failed "Validation failed for data_security_mode" HOT 3
- [ISSUE] type_precision and type_scale in columns info are not correct HOT 4
- sql connection using service principal to specific table HOT 2
- [ISSUE] Cannot use AccountClient commands after creating a new WorkspaceClient HOT 2
- [ISSUE] serving_endpoints.patch bug
- [ISSUE] sql query list method not returning the query folder information
- Endless loop in query history implementation HOT 1
- HTTP_PROXY proxy use HOT 1
- [FEATURE] Upload folder support in files.py
- cp should allow you to set the overwrite parameter
- [ISSUE] Misleading and wrong type hinting for boolean parameters in jobs.list and jobs.list_runs HOT 1
- [ISSUE] Lots of missing `Optional`s in the type hinting HOT 5
- [ISSUE] service_principal_id has a wrong type HOT 3
- [ISSUE] query_history.list() gets stuck on the same page_token HOT 1
- [ISSUE] When trying to use dbutils for interacting with Volumes through fs, an error pops up stating "PermissionDenied: No operations allowed on this path." HOT 1
- [ISSUE] client.users.create error HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from databricks-sdk-py.