Blocks
The types of block you can use in a project, and what you can do with them.
A block is a single step in a project, such as a piece of Python or a SQL query. Blocks are connected: each one can use the results of the blocks before it.
Block types
The canvas view also has API Controller, API Route and SageMaker endpoint blocks, for building deployments. See APIs.
Adding a block
Add a block connected to the active block
Alt + N
⌥ + N
Choose the type of the new block first
Shift + Alt + N
⇧ + ⌥ + N
Running blocks
Each block's run menu offers:
Run this block
Runs the block. If it has already run and nothing has changed, its saved results are used.
Run up to here
Runs every block before this one, then this one
Run from here
Runs this block, then every block after it
Force run (each of the above)
Runs again even if the saved results are up to date
While a block is running, the same button stops it. See Keyboard shortcuts for the shortcut for each option.
Other block options
The block toolbar includes:
Compute settings
Choose the compute the block runs on. See Compute types.
Comments
Discuss the block with your team. See Collaboration and comments.
Lint code
Tidy a Python block's code
Split block
Split a Python or R block into two, at the cursor
Copy block link
Copy a link to the block
Clear output
Remove the block's saved output
Lock block
Stop the block from being changed or run. See Block-level security.
Code & Variables mode
See the block's inputs, outputs and variables in full. See Variables, outputs and caching.
Delete
Remove the block
Last updated
Was this helpful?
