Usage
All scripts can be executed using Node.js. Replace <param_name> and <param_value> with actual values.
Bash:
node <skill_dir>/scripts/<script_name>.js '{"<param_name>": "<param_value>"}'
PowerShell:
node <skill_dir>/scripts/<script_name>.js '{\"<param_name>\": \"<param_value>\"}'
Note: The scripts automatically load the environment variables from various .env files. Do not ask the user to set vars unless skill executions fails due to env var absence.
Scripts
get_cluster
Gets a Dataproc cluster
Parameters
| Name |
Type |
Description |
Required |
Default |
| clusterName |
string |
The short name of the cluster, e.g. for "projects/my-project/regions/us-central1/clusters/my-cluster", pass "my-cluster" (the project and region are inherited from the source) |
No |
|
get_job
Gets a Dataproc job
Parameters
| Name |
Type |
Description |
Required |
Default |
| jobId |
string |
The job ID, e.g. for "projects/my-project/regions/us-central1/jobs/my-job", pass "my-job" (the project and region are inherited from the source) |
No |
|
list_clusters
Lists and filters Dataproc clusters
Parameters
| Name |
Type |
Description |
Required |
Default |
| filter |
string |
A filter constraining the clusters to list. Filters are case-sensitive and have the following syntax: field = value [AND [field = value]] ... where field is one of status.state, clusterName, or labels.[KEY], and [KEY] is a label key. value can be * to match all values. status.state can be one of the following: ACTIVE, INACTIVE, CREATING, RUNNING, ERROR, DELETING, UPDATING, STOPPING, or STOPPED. ACTIVE contains the CREATING, UPDATING, and RUNNING states. INACTIVE contains the DELETING, ERROR, STOPPING, and STOPPED states. clusterName is the name of the cluster provided at creation time. Only the logical AND operator is supported; space-separated items are treated as having an implicit AND operator. |
No |
|
| pageSize |
integer |
The maximum number of clusters to return in a single page (default 20) |
No |
20 |
| pageToken |
string |
A page token, received from a previous ListClusters call |
No |
|
list_jobs
Lists and filters Dataproc jobs
Parameters
| Name |
Type |
Description |
Required |
Default |
| filter |
string |
A filter constraining the jobs to list. Filters are case-sensitive and have the following syntax: field = value [AND [field = value]] ... where field is clusterName, status.state, or labels.[KEY], and [KEY] is a label key. value can be * to match all values. status.state can be one of the following: PENDING, RUNNING, CANCEL_PENDING, JOB_STATE_CANCELLED, DONE, ERROR, or ATTEMPT_FAILURE. Only the logical AND operator is supported; space-separated items are treated as having an implicit AND operator. Filtering by clusterName is recommended to improve query performance. |
No |
|
| jobStateMatcher |
string |
Specifies if the job state matcher should match ALL jobs, only ACTIVE jobs, or only NON_ACTIVE jobs. Defaults to ALL. Supported values: ALL, ACTIVE, NON_ACTIVE. |
No |
|
| pageSize |
integer |
The maximum number of jobs to return in a single page (default 20) |
No |
20 |
| pageToken |
string |
A page token, received from a previous ListJobs call |
No |
|
1---2name: dataproc-skills3description: Skills to interact with your Dataproc clusters and jobs.4---5
6## Usage
7
8All scripts can be executed using Node.js. Replace `<param_name>` and `<param_value>` with actual values.
9
10**Bash:**
11`node <skill_dir>/scripts/<script_name>.js '{"<param_name>": "<param_value>"}'`
12
13**PowerShell:**
14`node <skill_dir>/scripts/<script_name>.js '{\"<param_name>\": \"<param_value>\"}'`
15
16Note: The scripts automatically load the environment variables from various .env files. Do not ask the user to set vars unless skill executions fails due to env var absence.
17
18## Scripts
19
20### get_cluster
21
22Gets a Dataproc cluster
23
24#### Parameters
25
26| Name | Type | Description | Required | Default |
27| :---------- | :----- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | :------- | :------ |
28| clusterName | string | The short name of the cluster, e.g. for "projects/my-project/regions/us-central1/clusters/my-cluster", pass "my-cluster" (the project and region are inherited from the source) | No | |
29
30---
31
32### get_job
33
34Gets a Dataproc job
35
36#### Parameters
37
38| Name | Type | Description | Required | Default |
39| :---- | :----- | :----------------------------------------------------------------------------------------------------------------------------------------------- | :------- | :------ |
40| jobId | string | The job ID, e.g. for "projects/my-project/regions/us-central1/jobs/my-job", pass "my-job" (the project and region are inherited from the source) | No | |
41
42---
43
44### list_clusters
45
46Lists and filters Dataproc clusters
47
48#### Parameters
49
50| Name | Type | Description | Required | Default |
51| :-------- | :------ | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :------- | :------ |
52| filter | string | A filter constraining the clusters to list. Filters are case-sensitive and have the following syntax: field = value [AND [field = value]] ... where field is one of status.state, clusterName, or labels.[KEY], and [KEY] is a label key. value can be \* to match all values. status.state can be one of the following: ACTIVE, INACTIVE, CREATING, RUNNING, ERROR, DELETING, UPDATING, STOPPING, or STOPPED. ACTIVE contains the CREATING, UPDATING, and RUNNING states. INACTIVE contains the DELETING, ERROR, STOPPING, and STOPPED states. clusterName is the name of the cluster provided at creation time. Only the logical AND operator is supported; space-separated items are treated as having an implicit AND operator. | No | |
53| pageSize | integer | The maximum number of clusters to return in a single page (default 20) | No | `20` |
54| pageToken | string | A page token, received from a previous `ListClusters` call | No | |
55
56---
57
58### list_jobs
59
60Lists and filters Dataproc jobs
61
62#### Parameters
63
64| Name | Type | Description | Required | Default |
65| :-------------- | :------ | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :------- | :------ |
66| filter | string | A filter constraining the jobs to list. Filters are case-sensitive and have the following syntax: field = value [AND [field = value]] ... where field is clusterName, status.state, or labels.[KEY], and [KEY] is a label key. value can be \* to match all values. status.state can be one of the following: PENDING, RUNNING, CANCEL_PENDING, JOB_STATE_CANCELLED, DONE, ERROR, or ATTEMPT_FAILURE. Only the logical AND operator is supported; space-separated items are treated as having an implicit AND operator. Filtering by clusterName is recommended to improve query performance. | No | |
67| jobStateMatcher | string | Specifies if the job state matcher should match ALL jobs, only ACTIVE jobs, or only NON_ACTIVE jobs. Defaults to ALL. Supported values: ALL, ACTIVE, NON_ACTIVE. | No | |
68| pageSize | integer | The maximum number of jobs to return in a single page (default 20) | No | `20` |
69| pageToken | string | A page token, received from a previous `ListJobs` call | No | |
70
71---