Skip to main content

workspaces

Creates, updates, deletes, gets or lists a workspaces resource.

Overview

Nameworkspaces
TypeResource
Idgoogle.dataform.workspaces

Fields

NameDatatypeDescription
namestringIdentifier. The workspace's name.
dataEncryptionStateobjectDescribes encryption state of a resource.

Methods

NameAccessible byRequired ParamsDescription
getSELECTlocationsId, projectsId, repositoriesId, workspacesIdFetches a single Workspace.
listSELECTlocationsId, projectsId, repositoriesIdLists Workspaces in a given Repository.
query_directory_contentsSELECTlocationsId, projectsId, repositoriesId, workspacesIdReturns the contents of a given Workspace directory.
createINSERTlocationsId, projectsId, repositoriesIdCreates a new Workspace in a given Repository.
deleteDELETElocationsId, projectsId, repositoriesId, workspacesIdDeletes a single Workspace.
commitEXEClocationsId, projectsId, repositoriesId, workspacesIdApplies a Git commit for uncommitted files in a Workspace.
install_npm_packagesEXEClocationsId, projectsId, repositoriesId, workspacesIdInstalls dependency NPM packages (inside a Workspace).
make_directoryEXEClocationsId, projectsId, repositoriesId, workspacesIdCreates a directory inside a Workspace.
move_directoryEXEClocationsId, projectsId, repositoriesId, workspacesIdMoves a directory (inside a Workspace), and all of its contents, to a new location.
move_fileEXEClocationsId, projectsId, repositoriesId, workspacesIdMoves a file (inside a Workspace) to a new location.
pullEXEClocationsId, projectsId, repositoriesId, workspacesIdPulls Git commits from the Repository's remote into a Workspace.
pushEXEClocationsId, projectsId, repositoriesId, workspacesIdPushes Git commits from a Workspace to the Repository's remote.
read_fileEXEClocationsId, projectsId, repositoriesId, workspacesIdReturns the contents of a file (inside a Workspace).
resetEXEClocationsId, projectsId, repositoriesId, workspacesIdPerforms a Git reset for uncommitted files in a Workspace.
search_filesEXEClocationsId, projectsId, repositoriesId, workspacesIdFinds the contents of a given Workspace directory by filter.
write_fileEXEClocationsId, projectsId, repositoriesId, workspacesIdWrites 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.

/*+ create */
INSERT INTO google.dataform.workspaces (
locationsId,
projectsId,
repositoriesId,
name
)
SELECT
'{{ locationsId }}',
'{{ projectsId }}',
'{{ repositoriesId }}',
'{{ name }}'
;

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 }}';