Menu

Post image 1
Post image 2
1 / 2
0

Deeper into Dataform 2: Other API features

DEV Community: gcp·Ben Watson·3 days ago
#pnikU2RX
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 . delete_workspace ( name = workspace_path ) Enter fullscreen mode Exit fullscreen mode There's also create_workspace - very useful for automatically creating a workspace if a code change is made on a new branch outside of the Dataform UI.…

Continue reading — create a free account

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

Read More