6.3 Use raw SQL

Lesson

6.3 Use raw SQL

While Mage's automated SQL Blocks provide an intuitive interface for common operations, data engineers often need more advanced control for complex transformations. Raw SQL Blocks unlock the full power of your database's native SQL capabilities, allowing you to execute multiple statements and use database-specific features that extend beyond the automated interface.

Create your first raw SQL block in Mage

To create your first raw SQL block select SQL blocks from the list of transformation blocks. Once the block appears in the pipeline editor UI select the Raw SQL checkbox. Both SQL blocks

Configuring Connections

: Mage provides a user-friendly interface for managing data connections. You can easily set up connections to various data sources, including data warehouses, databases, and other supported platforms. To set up a connection:

  • Drop down the “connections” list in the top left of the SQL block and select your target connection

  • Drop down the “profile” list and select the profile from the io_conflig.ymlfile you want associated with the SQL block