workspaces
Creates, updates, deletes, gets or lists a workspaces
resource.
Overview
Name | workspaces |
Type | Resource |
Id | google.dataform.workspaces |
Fields
Name | Datatype | Description |
---|---|---|
name | string | Identifier. The workspace's name. |
dataEncryptionState | object | Describes encryption state of a resource. |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
get | SELECT | locationsId, projectsId, repositoriesId, workspacesId | Fetches a single Workspace. |
list | SELECT | locationsId, projectsId, repositoriesId | Lists Workspaces in a given Repository. |
query_directory_contents | SELECT | locationsId, projectsId, repositoriesId, workspacesId | Returns the contents of a given Workspace directory. |
create | INSERT | locationsId, projectsId, repositoriesId | Creates a new Workspace in a given Repository. |
delete | DELETE | locationsId, projectsId, repositoriesId, workspacesId | Deletes a single Workspace. |
commit | EXEC | locationsId, projectsId, repositoriesId, workspacesId | Applies a Git commit for uncommitted files in a Workspace. |
install_npm_packages | EXEC | locationsId, projectsId, repositoriesId, workspacesId | Installs dependency NPM packages (inside a Workspace). |
make_directory | EXEC | locationsId, projectsId, repositoriesId, workspacesId | Creates a directory inside a Workspace. |
move_directory | EXEC | locationsId, projectsId, repositoriesId, workspacesId | Moves a directory (inside a Workspace), and all of its contents, to a new location. |
move_file | EXEC | locationsId, projectsId, repositoriesId, workspacesId | Moves a file (inside a Workspace) to a new location. |
pull | EXEC | locationsId, projectsId, repositoriesId, workspacesId | Pulls Git commits from the Repository's remote into a Workspace. |
push | EXEC | locationsId, projectsId, repositoriesId, workspacesId | Pushes Git commits from a Workspace to the Repository's remote. |
read_file | EXEC | locationsId, projectsId, repositoriesId, workspacesId | Returns the contents of a file (inside a Workspace). |
reset | EXEC | locationsId, projectsId, repositoriesId, workspacesId | Performs a Git reset for uncommitted files in a Workspace. |
search_files | EXEC | locationsId, projectsId, repositoriesId, workspacesId | Finds the contents of a given Workspace directory by filter. |
write_file | EXEC | locationsId, projectsId, repositoriesId, workspacesId | Writes to a file (inside a Workspace). |
SELECT
examples
Lists Workspaces in a given Repository.
SELECT
name,
dataEncryptionState
FROM google.dataform.workspaces
WHERE locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}'
AND repositoriesId = '{{ repositoriesId }}';
INSERT
example
Use the following StackQL query and manifest file to create a new workspaces
resource.
- All Properties
- Manifest
/*+ create */
INSERT INTO google.dataform.workspaces (
locationsId,
projectsId,
repositoriesId,
name
)
SELECT
'{{ locationsId }}',
'{{ projectsId }}',
'{{ repositoriesId }}',
'{{ name }}'
;
- name: your_resource_model_name
props:
- name: name
value: string
- name: dataEncryptionState
value:
- name: kmsKeyVersionName
value: string
DELETE
example
Deletes the specified workspaces
resource.
/*+ delete */
DELETE FROM google.dataform.workspaces
WHERE locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}'
AND repositoriesId = '{{ repositoriesId }}'
AND workspacesId = '{{ workspacesId }}';