Get Inspire insights from former attendees in our AMA discussion thread on Inspire Buzz. ACEs and other community members are on call all week to answer!

Alteryx Designer Desktop Knowledge Base

Definitive answers from Designer Desktop experts.

How To: Build Queries without using the Visual Query Builder

HenrietteH
Alteryx
Alteryx
Created

How To: Build Queries without using the Visual Query Builder

The Visual Query Builder window can take a long time to load because it always loads all column metadata for all tables for all schemas, even if a default database is selected in the database connection. This article will walk through using the In-Database tools as an alternative to using the Visual Query Builder.

Prerequisites

Procedure

The Tables view loads only tables names and no column names for the default database selected and it caches the list. This allows it to load faster than the Visual Query Builder.

  1. Make the Tables View the default view
    • Drag an Input tool on the canvas and connect to a database (it doesn't have to be the database in question, any database will work)
    • Click the Tables view and click the checkbox next to "Open Tables view by default" at the bottom left of the window
    • HenrietteH_0-1573158076228.png
  2. Create an In-DB Connection to your database as described here: How To: Create an In-Database Connection
  3. Use a Connect In-DB tool to connect to the database. To build your query:
    • Select the table name in the Tables view. This creates a SELECT * FROM TABLE statement with no criteria to limit the query
    • Use the In-DB tools to build the query. e.g. the Select In-DB tool to select only columns you need or the Filter In-DB to remove rows not needed
    • Alteryx constructs a SQL query based on the tools on the canvas and sends it to the database
  4. In the example below, both workflows accomplish the same thing, one through the Visual Query Builder, one using the In-DB tools:
clipboard_image_0.png
Additional Resources
Comments
simonaubert_bd
13 - Pulsar

Hello @HenrietteH On a related note, there is this idea to choose the Visual Query Builder default windows :

https://community.alteryx.com/t5/Alteryx-Designer-Ideas/Default-interface-for-database-Visual-Query-...

 

Best regards,

Simon