Menu

1 / 2

Deeper into Dataform 2: Other API features

DEV Community: gcp·Ben Watson·5 months ago
#pnikU2RX
#dev#workspace#client#workspace_path#changes
Reading 0:00
15s threshold

In part 1 we looked at the Dataform CompilationResult and WorkflowInvocation objects. Let's follow up with a quick look at some other API endpoints that I find useful.

Workspace management - delete_workspace and create_workspace

delete_workspace is essential for Dataform instances used by large teams as it allows workspaces to be automatically deleted post-merge, saving the bi-annual "can everyone please let me know which workspaces they're finished with?" message. This can be integrated into CI/CD tools such as GitHub Actions.

from google.cloud import dataform_v1

client = dataform_v1 . DataformClient ()

workspace_path = client . workspace_path ( PROJECT_ID , REGION , REPOSITORY_ID , WORKSPACE_ID , )

try : operation = client .…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.