Guias de produtos

Guia do Alteryx para usuários SQL

 

Alteryx SQL

A abordagem tradicional para o acesso e preparo de dados pode exigir muito tempo de equipes analíticas. O problema obriga alguns profissionais, que se sentem frustrados, a aprender a linguagem SQL ao invés de depender de desenvolvedores de TI. Entre os maiores desafios enfrentados por analistas na criação de comandos SQL, é simplesmente fazer com que os códigos funcionem! Como o SQL não possui o recurso de autocorreção, uma vírgula ou um ponto incorreto não será detectado de forma automática — e pode provocar erros de script em todo o processo.

 

O Alteryx apresenta uma solução diferente, com uma plataforma integrada para executar fluxos de trabalho, que permite preparar, combinar e analisar dados de múltiplas fontes, incluindo dados não estruturados. Ao invés de dedicar tempo para testar e corrigir códigos, é possível criar um fluxo de trabalho reproduzível para compartilhar com os demais colaboradores da organização — analistas, profissionais de TI e decisores de negócios — e mostrar exatamente como você conseguiu extrair e transformar as informações. O resultado? Menos esforços para escrever códigos, maior transparência e mais consistência.

 

Listamos alguns processos de dados comuns utilizados para programar em SQL. Além disso, mostramos como você pode fazer o mesmo usando o Alteryx. Esses exemplos servem para ajudar analistas que criam comandos SQL a entender como traduzir seus conhecimentos em um fluxo de trabalho do Alteryx.

 
 

Selecionar

SELECIONAR, DE, ONDE, AGRUPAR POR, CONTENDO, ORDENAR POR

In SQL

 

In Alteryx

 

To access data in Alteryx, you drag and drop an Input Data Tool onto the canvas, locate the database, and simply select.
In this example, the Input Data Tool lets you connect to an SQL Server Database.

Using the Select Tool allows you change the data type, select/deselect fields, or simply rename the fields to whatever you want. In this case, Customer ID is the field name.

 

 

In Alteryx, combining multiple datasets is easy with the Join Tool.

The Join Tool allows you to join two tables with a common field (primary key) and Alteryx automatically returns three sets of records:

  • Inner Join (J): the columns from the source table (L) joined with the columns in the table to join (R), matching records based on the common field(s)
  • Left unjoined (L): the records of the original table (L) that have not found a match in the table to join (R)
  • Right unjoined: (R): the records of the table to be joined (R) that have not found a match in the source table (L)

Here is a Join on Customer ID.


In addition to the Join Tool, Alteryx also has an In-Database Join Tool. This enables blending and analysis against large sets of data without moving the data out of the database, and provides significant performance improvements over traditional analysis methods.

The In-Database Join Tool lets you do inner, left outer, right outer, and full outer joins.

Learn more about Alteryx In-Database tools here.


 The Union Tool allows you to combine multiple sets of records based on the field name or position of each column. You can easily change the order of the column headers in each set of records so they match up.

Here, two sets of records — the left un-joined records and the (inner) joined records — are joined together, producing a left outer join.

 

Limiting records based on specific criteria is performed using the Filter Tool. Filtering can use anything from simple comparisons to complicated, conditional statements. In this example only those records that do not contain the country United States are filtered.

 

In Alteryx, the Summarize Tool lets you collect data across multiple records, apply an aggregate function, and group the results by one or more fields.

In this example, the Summarize Tool lets you group by country (e.g., United Kingdom, Germany), and average the total amount per country.

You can limiting records based on specific criteria using the Filter Tool. Filtering can use anything from simple comparisons all the way to complicated, conditional statements. This example shows only those records that have average totals greater than or equal to 1000.

 

The Sort Tool in Alteryx allows you to order your data just the way you need it. Select the name(s) of the column(s) and choose between ascending or descending. In this example, the Average Total Amount is shown in Descending order.

 


Este é o fluxo de trabalho completo no Alteryx, para a declaração SQL SELECT.

 

Junção cruzada

Junção cruzada

In SQL

In Alteryx

Using the Append Fields Tool, you can append the fields from a source input to every record of a target input. Each record of the target input will be duplicated for every record in the source input. In this example, all Distribution Center records are appended to each Customer record.

 

Este fluxo de trabalho do Alteryx agrupa registros da central de distribuição a cada registro de cliente.

 

Onde entre

Onde entre

In SQL

In Alteryx

You can limit records to those that have field values within a specific range using the Alteryx Filter Tool. In this example the filter is Order Dates between December 1 – 31, 2016, inclusive.

 

Este fluxo de trabalho do Alteryx filtra dados de pedidos de clientes, especificamente entre os dias 1º e 31 de dezembro de 2016.

 

Onde em

Onde em

In SQL

In Alteryx

To limiting records to those with field values belonging to a set of possible alternatives, use the Alteryx Filter Tool. In this example, the filter is set to customers whose country is either the United States or the United Kingdom.

 

Este fluxo de trabalho do Alteryx filtra clientes de países como os Estados Unidos ou o Reino Unido.

 

Diferente de

Diferente de

In SQL

In Alteryx

The Unique Tool in Alteryx helps separate data into two streams, duplicate and unique records, based on the fields you choose. The field chosen in this example is country.

 

Disticnt

Com a ferramenta Exclusivo, este fluxo de trabalho do Alteryx separa os dados em dois fluxos (registros duplicados e exclusivos) com base nos campos escolhidos, como nesse exemplo, país.