Using multi cursor to optimise query writing in dbt cloud

Have you ever wanted to grow multiple hands to write code faster? Many code editors allow you to utilise multi cursor - a way to duplicate your key strokes over many lines.

In dbt cloud on Windows, you can hold alt and click other lines to get a multi cursor. From here any key strokes will be written to both cursors at the same time.

You can hold ctrl alt and then use up and down arrows to multi-cursor across different lines using your keyboard.

Use case: re-aliasing all columns which require being wrapped in " "

Have you ever defined columns in sql by parsing a string, and been left with columns which require you to call them with "column_name", but you have already got a select statement without any quotes?

We can do that all at once!

  • Click the left side of the first column name in the select statement
  • Hold ctrl+alt and press the down arrow until you have a cursor on the left side of each line
  • Hold ctrl+shift and press right arrow to highlight all column names
  • Press ctrl+c to copy all highlighted column names
  • Press right arrow once to move the cursor to the end of the line
  • Type " as " (with the whitespace) and then press ctrl+v to paste all the copied column names as aliases
  • Hold ctrl and click left arrow twice, then let go of ctrl and click left arrow once to move the cursor to the end of the column name. Then type a " at the end of each column name. Then hold ctrl and press left arrow to move the cursor to the start of the column name and type another ".
  • Marvel at the improved productivity using multi cursors
Author:
Jeffrey Brian Thompson
Powered by The Information Lab
1st Floor, 25 Watling Street, London, EC4M 9BR
Subscribe
to our Newsletter
Get the lastest news about The Data School and application tips
Subscribe now
© 2025 The Information Lab