Edit a draft created in the web app
If you navigate away from your workflow in the web app before publishing, or if you simply prefer to finish up with flowctl, you can pull the draft into a local environment, finish making changes, and publish the task.
To complete this workflow, you need:
Identify the draft and pull it locally
Drafts aren't currently visible in the Flow web app, but you can get a list with flowctl.
Go to the CLI-API tab of the web app and copy your access token.
flowctl auth token --token <paste-token-here>
flowctl draft list
flowctl outputs a table of all the drafts to which you have access, from oldest to newest.
- Use the name and timestamp to find the draft you're looking for.
Each draft has an ID, and most have a name in the Details column. Note the # of Specs column. For drafts created in the web app, materialization drafts will always contain one specification. A number higher than 1 indicates a capture with its associated collections.
Copy the draft ID.
Select the draft:
flowctl draft select --id <paste-id-here>.
Pull the draft source files to your working directory:
flowctl draft develop.
Browse the source files.
The source files and their directory structure will look slightly different depending on the draft.
Regardless, there will always be a top-level file called
flow.yaml that imports all other YAML files,
which you'll find in a subdirectory named for your catalog prefix.
These, in turn, contain the specifications you'll want to edit.
Edit the draft and publish
Next, you'll make changes to the specification(s), test, and publish the draft.
Open the YAML files that contain the specification you want to edit.
Make changes. For guidance on how to construct Flow specifications, see the documentation for the entity type:
When you're done, sync the local work to the global draft:
flowctl draft author --source flow.yaml.
Specifying the top-level
flow.yaml file as the source ensures that all entities in the draft are imported.
Publish the draft:
flowctl draft publish
Once this operation completes successfully, check to verify if the entity or entities are live. You can:
Go to the appropriate tab in the Flow web app.
flowctl catalog list, filtering by
--prefix, or entity type, for example
If you're not satisfied with the published entities, you can continue to edit them. See the other guides for help: