Welcome to the Lytics Community!

Lytics Community

Search for answers here or
1

Managing Complex Joins with SQL Views

  • 1 yr ago

Among the advantages of Cloud Connect is the flexibility of data that can be included in an Audience using the power of SQL. However, challenges can arise as your SQL logic becomes complex, especially when JOINs come into play. Queries joining two or more tables take longer to complete and can fail, especially if changes to a table cause the join to fail. Queries may also fail in Cloud Connect if a field is of a different data type in various tables in your Data Warehouse

To reduce complexity of Audiences and minimize errors we recommend using a View in your Data Warehouse to manage complex JOINs. A View is result set of a stored SQL query in your Data Warehouse. A View is like a table in that it can be queried but it doesn't represent an independent set of data. Instead it's a virtual table computed dynamically from the tables reference by the SQL query when access to the view is requested. 

In this case any table JOINs would be included in the SQL query associated with the View in your Data Warehouse and your Cloud Connect Audience would select fields from the View without JOINs to other tables in your Data Warehouse.

The best place to look for more information on configuring a View is in the documentation for your Data Warehouse.

Reply Oldest first
  • Oldest first
  • Newest first
  • Active threads
  • Popular