<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Melhores Práticas – Concatenar tabelas sem perder a leitura otimizada in Brasil</title>
    <link>https://community.qlik.com/t5/Brasil/Melhores-Pr%C3%A1ticas-Concatenar-tabelas-sem-perder-a-leitura/m-p/1468054#M54107</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Muito bom!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 04 Aug 2017 16:49:40 GMT</pubDate>
    <dc:creator />
    <dc:date>2017-08-04T16:49:40Z</dc:date>
    <item>
      <title>Melhores Práticas – Concatenar tabelas sem perder a leitura otimizada</title>
      <link>https://community.qlik.com/t5/Brasil/Melhores-Pr%C3%A1ticas-Concatenar-tabelas-sem-perder-a-leitura/m-p/1468053#M54106</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="color: #333333; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; font-size: 16px;"&gt;Fala pessoal, beleza?&lt;/P&gt;&lt;P style="color: #333333; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; font-size: 16px;"&gt;&lt;/P&gt;&lt;P style="color: #333333; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; font-size: 16px;"&gt;Acredito que muitos aqui já elaboraram um belíssimo código seguinte &lt;SPAN style="text-decoration: line-through;"&gt;todos&lt;/SPAN&gt; a maioria das melhores práticas em script/modelagem e precisaram concatenar (Concatenate) duas ou mais tabelas (fatos ou não), porém essa concatenação esta demorando muito tempo para ocorrer. Já passaram por isso?&lt;/P&gt;&lt;P style="color: #333333; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; font-size: 16px;"&gt;Esse artigo explicará como realizar a concatenação de tabelas mantendo uma leitura otimizada. Vamos la?&lt;/P&gt;&lt;P style="color: #333333; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; font-size: 16px;"&gt;&lt;/P&gt;&lt;P style="color: #333333; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; font-size: 16px;"&gt;&lt;/P&gt;&lt;P style="color: #333333; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; font-size: 16px;"&gt;&lt;/P&gt;&lt;P style="color: #333333; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; font-size: 16px;"&gt;Lembram o que é uma leitura otimizada? Eu falei disso neste post: &lt;A href="http://blogdonicolett.com.br/2014/04/15/melhores-praticas-qvd-optimized/" target="_blank"&gt;Melhores Práticas – QVD Optimized&lt;/A&gt;.&lt;/P&gt;&lt;P style="color: #333333; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; font-size: 16px;"&gt;&lt;/P&gt;&lt;P style="color: #333333; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; font-size: 16px;"&gt;Em resumo, um QVD mantém a leitura otimizada somente quando realizamos essas ações em sua leitura:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Renomear campos&lt;/LI&gt;&lt;LI&gt;DISTINCT&lt;/LI&gt;&lt;LI&gt;Omitir Campos (Omit)&lt;/LI&gt;&lt;LI&gt;Where Exists Simples&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; font-size: 16px;"&gt;IMPORTANTE:&amp;nbsp; A leitura otimizada é realizada apenas na leitura de um QVD, esqueça o LOAD RESIDENT. &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;H1 style="color: #333333; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif;"&gt;&lt;/H1&gt;&lt;H1 style="color: #333333; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif;"&gt;&lt;/H1&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;H1 style="color: #333333; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif;"&gt;&lt;/H1&gt;&lt;H1 style="color: #333333; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif;"&gt;O que é Concatenar&lt;/H1&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; font-size: 16px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; font-size: 16px;"&gt;O conceito de concatenar é um termo utilizado para unir duas coisas. Em nosso caso "coisa" significa tabela, ou seja, unir duas tabelas.&lt;/SPAN&gt;&lt;SPAN style="color: #333333; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; font-size: 16px;"&gt;Para entender melhor como realmente o concatenar funciona, vamos a um exemplo:&lt;/SPAN&gt;&lt;/P&gt;&lt;H3 style="color: #333333; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif;"&gt;&lt;/H3&gt;&lt;H3 style="color: #333333; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif;"&gt;&lt;/H3&gt;&lt;H3 style="color: #333333; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif;"&gt;Exemplo&lt;/H3&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; font-size: 16px;"&gt;Tenho duas tabelas: Vendas e População&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; font-size: 16px;"&gt;&lt;A href="https://ynicolett.files.wordpress.com/2015/10/vendas.jpg"&gt;&lt;IMG alt="Tabela Vendas" class="alignleft wp-image-344 jive-image size-full" height="146" src="https://ynicolett.files.wordpress.com/2015/10/vendas.jpg" style="margin: 0.5em 1em 0.5em 0;" title="Tabela Vendas" width="232" /&gt;&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; font-size: 16px;"&gt;&lt;IMG alt="Tabela: População" class="alignleft wp-image-343 jive-image size-full" height="108" src="https://ynicolett.files.wordpress.com/2015/10/populacao.jpg" style="margin: 0.5em 1em 0.5em 0;" width="249" /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; font-size: 16px;"&gt;Agora vou concatenar as duas tabelas:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="line-height: 1.5em; color: #333333; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; font-size: 16px;"&gt;&lt;A href="https://ynicolett.files.wordpress.com/2015/10/vendaspopulacao.jpg"&gt;&lt;IMG alt="vendas+populacao" class="wp-image-345 alignnone jive-image size-full" height="230" src="https://ynicolett.files.wordpress.com/2015/10/vendaspopulacao.jpg" width="371" /&gt;&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="line-height: 1.5em; color: #333333; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; font-size: 16px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="line-height: 1.5em; color: #333333; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; font-size: 16px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="line-height: 1.5em; color: #333333; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; font-size: 16px;"&gt;Note que basicamente uma tabela foi colocada abaixo da outra. Esse é o resultado quando realizamos uma concatenação das tabelas.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="line-height: 1.5em; color: #333333; font-size: 16px; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; text-decoration: underline;"&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="line-height: 1.5em; color: #333333; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; font-size: 16px;"&gt;&lt;SPAN style="text-decoration: underline;"&gt;&lt;STRONG&gt;OBSERVAÇÃO&lt;/STRONG&gt;&lt;/SPAN&gt;: As células em branco ficarão com o valor nulo no qlikview.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="line-height: 1.5em; color: #333333; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; font-size: 16px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="line-height: 1.5em; color: #333333; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; font-size: 16px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;H1 style="color: #333333; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif;"&gt;A sintaxe&lt;/H1&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; font-size: 16px;"&gt;Entendemos o resultado de uma concatenação de tabelas, mas como deve ser a sintaxe para fazer isso?&lt;/SPAN&gt;&lt;SPAN style="color: #333333; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; font-size: 16px;"&gt;Basicamente o comando Concatenate deve ser utilizado antes do LOAD de uma tabela. Vamos usar o exemplo das tabelas de Vendas e População para aprender:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; font-size: 16px;"&gt;&lt;A href="https://ynicolett.files.wordpress.com/2015/10/exemplo011.jpg"&gt;&lt;IMG alt="Exemplo01" class="alignnone jive-image wp-image-347 size-full" height="236" src="https://ynicolett.files.wordpress.com/2015/10/exemplo011.jpg" width="454" /&gt;&lt;/A&gt;‌&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; font-size: 16px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; font-size: 16px;"&gt;Desta forma, o QlikView vai interpretar que a tabela População vai concatenar os seus dados com a tabela Vendas, pois o script de leitura da tabela Vendas esta logo acima da tabela População. Caso a concatenação que deseja fazer não seja com a tabela acima, você pode simplesmente criar uma referência no Concatenate, dessa forma:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; font-size: 16px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; font-size: 16px;"&gt;&lt;A href="https://ynicolett.files.wordpress.com/2015/10/exemplo02.jpg"&gt;&lt;IMG alt="Exemplo02" class="alignnone jive-image wp-image-348 size-full" height="240" src="https://ynicolett.files.wordpress.com/2015/10/exemplo02.jpg" width="459" /&gt;&lt;/A&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; font-size: 16px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; font-size: 16px;"&gt;OBSERVAÇÃO: Como sabemos a concatenação resultará em apenas uma tabela, desta forma o nome da tabela resultante será a tabela que receberá os dados da outra, em nosso exemplo a tabela final ficará com o nome de Vendas.&lt;/SPAN&gt;&lt;SPAN style="color: #333333; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; font-size: 16px;"&gt;Beleza! Agora eu entendi o que é Concatenar, mas como faze-la de forma otimizada?&lt;/SPAN&gt;&lt;/P&gt;&lt;H1 style="color: #333333; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif;"&gt;&lt;/H1&gt;&lt;H1 style="color: #333333; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif;"&gt;&lt;/H1&gt;&lt;H1 style="color: #333333; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif;"&gt;Manter a leitura otimizada&lt;/H1&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; font-size: 16px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; font-size: 16px;"&gt;As formas de Concatenar mantendo a leitura otimiza são:&lt;/SPAN&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;AutoConcatenate&lt;/LI&gt;&lt;LI&gt;Mantendo os campos existentes e adicionando (escadinha)&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;H2 style="color: #333333; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif;"&gt;&lt;/H2&gt;&lt;H2 style="color: #333333; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif;"&gt;&lt;/H2&gt;&lt;H2 style="color: #333333; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif;"&gt;AutoConcatenate&lt;/H2&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; font-size: 16px;"&gt;O AutoConcatenate é quando o QlikView identifica duas ou mais tabelas que possuem, exatamente, as mesmas colunas e faz a concatenação automática delas, ou seja, você não precisa utilizar o comando Concatenate.&lt;/SPAN&gt;&lt;SPAN style="color: #333333; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; font-size: 16px;"&gt;Veja a imagem para entender melhor&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; font-size: 16px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; font-size: 16px;"&gt;&lt;A href="https://ynicolett.files.wordpress.com/2015/10/exemplo03.jpg"&gt;&lt;IMG alt="Exemplo03" class="alignnone wp-image-349 jive-image size-full" height="222" src="https://ynicolett.files.wordpress.com/2015/10/exemplo03.jpg" style="height: 222px; width: 720.332px;" width="720" /&gt;&lt;/A&gt;‌‌&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; font-size: 16px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; font-size: 16px;"&gt;Todas as tabelas possuem as mesmas colunas, são elas: A, B, C, D, E e F. Se carregarmos essas cinco tabelas sem utilizar o Concatenate, o QlikView utilizará o conceito de AutoConcatenate e concatenará as cinco tabelas de maneira otimizada.&lt;/SPAN&gt;&lt;SPAN style="color: #333333; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; font-size: 16px;"&gt;Veja que o código esta sem o comando Concatenate:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; font-size: 16px;"&gt;&lt;A href="https://ynicolett.files.wordpress.com/2015/10/exemplo03-01.jpg"&gt;&lt;IMG alt="Exemplo03-01" class="alignnone wp-image-350 jive-image size-full" height="363" src="https://ynicolett.files.wordpress.com/2015/10/exemplo03-01.jpg" width="188" /&gt;&lt;/A&gt;‌&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; font-size: 16px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; font-size: 16px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; font-size: 16px;"&gt;Veja a execução do script mantendo a leitura otimizada:&lt;/SPAN&gt;&lt;SPAN style="color: #333333; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; font-size: 16px;"&gt;&lt;A href="https://ynicolett.files.wordpress.com/2015/10/exemplo03-02.jpg"&gt;&lt;IMG alt="Exemplo03-02" class="alignnone wp-image-351 jive-image size-full" height="271" src="https://ynicolett.files.wordpress.com/2015/10/exemplo03-02.jpg" width="543" /&gt;&lt;/A&gt;‌&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; font-size: 16px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; font-size: 16px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; font-size: 16px;"&gt;Resultado das cinco tabelas concatenadas:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; font-size: 16px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; font-size: 16px;"&gt;&lt;A href="https://ynicolett.files.wordpress.com/2015/10/exemplo03-03.jpg"&gt;&lt;IMG alt="Exemplo03-03" class="alignnone jive-image wp-image-352 size-full" height="195" src="https://ynicolett.files.wordpress.com/2015/10/exemplo03-03.jpg" width="223" /&gt;&lt;/A&gt;‌&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; font-size: 16px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; font-size: 16px;"&gt;PS: Lembrem-se que o nome que a tabela concatenada irá assumir é o nome da primeira tabela que foi carregada, no exemplo: Tabela 1.&lt;/SPAN&gt;&lt;SPAN style="color: #333333; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; font-size: 16px;"&gt;Yuri, essa eu já sabia! facin!!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; font-size: 16px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; font-size: 16px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; font-size: 16px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;H2 style="color: #333333; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif;"&gt;Mantendo os campos existentes e adicionando&lt;/H2&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; font-size: 16px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; font-size: 16px;"&gt;Manter os campos existentes e adicionando? Ahn?&lt;/SPAN&gt;&lt;SPAN style="color: #333333; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; font-size: 16px;"&gt;Esse caso é o mais interessante do comportamento do QlikView, e eu gosto de chama-lo de escadinha, pois tabelas que possuem alguns campos em comum podem sim fazer a concatenação de maneira otimizada.&lt;/SPAN&gt;&lt;SPAN style="color: #333333; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; font-size: 16px;"&gt;Vamos ao exemplo e depois explico melhor!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; font-size: 16px;"&gt;&lt;A href="https://ynicolett.files.wordpress.com/2015/10/exemplo04-01.jpg"&gt;&lt;IMG alt="Exemplo04-01" class="alignnone jive-image wp-image-353 size-full" height="217" src="https://ynicolett.files.wordpress.com/2015/10/exemplo04-01.jpg" style="height: 217px; width: 743.301px;" width="743" /&gt;&lt;/A&gt;‌‌&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; font-size: 16px;"&gt;P&lt;/SPAN&gt;&lt;SPAN style="color: #333333; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; font-size: 16px;"&gt;S: Enxergaram a escadinha? rsrs&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; font-size: 16px;"&gt;Vamos entender&lt;/SPAN&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;A minha primeira tabela possui as colunas A e B&lt;/LI&gt;&lt;LI&gt;A segunda tabela precisa conter as mesmas colunas para poder adicionar outras, no caso precisa conter as colunas A e B para adicionar a coluna C.&lt;/LI&gt;&lt;LI&gt;A terceira tabela precisa conter todos os campos que a tabela resultante (Concatenação da Tabela 1 com a Tabela 2) possui que são as colunas A, B e C (A coluna C originou na concatenação da Tabela 2) para poder adicionar a coluna D.&lt;/LI&gt;&lt;LI&gt;A quarta tabela precisa conter todos os campos que a tabela resultante (Concatenação da Tabela 1 com a Tabela 2 e a Tabela 3) possui que são as colunas A, B, C e D (A coluna C originou na concatenação da Tabela 2 e a coluna D originou na concatenação com a Tabela 3) para poder adicionar a coluna E.&lt;/LI&gt;&lt;LI&gt;E assim vai...... rsrs !!&lt;/LI&gt;&lt;/UL&gt;&lt;P style="color: #333333; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; font-size: 16px;"&gt;&lt;/P&gt;&lt;P style="color: #333333; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; font-size: 16px;"&gt;Nesta caso o código precisa utilizar o comando Concatenate, veja como ficou:&lt;/P&gt;&lt;P style="color: #333333; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; font-size: 16px;"&gt;&lt;A href="https://ynicolett.files.wordpress.com/2015/10/exemplo04-02.jpg"&gt;&lt;IMG alt="Exemplo04-02" class="wp-image-354 alignnone jive-image size-full" height="338" src="https://ynicolett.files.wordpress.com/2015/10/exemplo04-02.jpg" width="350" /&gt;&lt;/A&gt;&lt;/P&gt;&lt;P style="color: #333333; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; font-size: 16px;"&gt;&lt;/P&gt;&lt;P style="color: #333333; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; font-size: 16px;"&gt;Veja a execução do script mantendo a leitura otimizada:&lt;/P&gt;&lt;P style="color: #333333; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; font-size: 16px;"&gt;&lt;/P&gt;&lt;P style="color: #333333; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; font-size: 16px;"&gt;&lt;A href="https://ynicolett.files.wordpress.com/2015/10/exemplo04-03.jpg"&gt;&lt;IMG alt="Exemplo04-03" class="wp-image-355 alignnone jive-image size-full" height="277" src="https://ynicolett.files.wordpress.com/2015/10/exemplo04-03.jpg" width="626" /&gt;&lt;/A&gt;&lt;/P&gt;&lt;P style="color: #333333; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; font-size: 16px;"&gt;&lt;/P&gt;&lt;P style="color: #333333; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; font-size: 16px;"&gt;Resultado das cinco tabelas concatenadas:&lt;/P&gt;&lt;P style="color: #333333; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; font-size: 16px;"&gt;&lt;/P&gt;&lt;P style="color: #333333; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; font-size: 16px;"&gt;&lt;A href="https://ynicolett.files.wordpress.com/2015/10/exemplo03-03.jpg"&gt;&lt;IMG alt="Exemplo03-03" class="alignnone jive-image wp-image-352 size-full" height="195" src="https://ynicolett.files.wordpress.com/2015/10/exemplo03-03.jpg" width="223" /&gt;&lt;/A&gt;&lt;/P&gt;&lt;P style="color: #333333; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; font-size: 16px;"&gt;&lt;/P&gt;&lt;P style="color: #333333; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; font-size: 16px;"&gt;Pô Yuri, mas nem sempre vamos ter tabelas no modelo de escadinha. Ajuda aí!! (rsrsrs)&lt;/P&gt;&lt;P style="color: #333333; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; font-size: 16px;"&gt;Vamos para um exemplo mais prático&lt;/P&gt;&lt;P style="color: #333333; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; font-size: 16px;"&gt;&lt;/P&gt;&lt;H2 style="color: #333333; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif;"&gt;&lt;/H2&gt;&lt;H2 style="color: #333333; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif;"&gt;Cenário Real&lt;/H2&gt;&lt;P style="color: #333333; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; font-size: 16px;"&gt;Imaginem que temos que concatenar duas tabelas, Tabela 1 e Tabela 2, sendo que:&lt;/P&gt;&lt;P style="color: #333333; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; font-size: 16px;"&gt;Tabela 1 possui as colunas: A, B, C e D.&lt;/P&gt;&lt;P style="color: #333333; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; font-size: 16px;"&gt;Tabela 2 possui as colunas: A, B, D, F e G&lt;/P&gt;&lt;P style="color: #333333; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; font-size: 16px;"&gt;&lt;/P&gt;&lt;P style="color: #333333; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; font-size: 16px;"&gt;Pensando Alto: As duas tabelas possuem as colunas A, B e D, porém a tabela 2 não possui a coluna C e ainda possui as colunas F e G para adicionar... é... já era a escadinha, exemplo deu certo! &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/grin.png" /&gt; rsrs&lt;/P&gt;&lt;P style="color: #333333; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; font-size: 16px;"&gt;&lt;/P&gt;&lt;P style="color: #333333; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; font-size: 16px;"&gt;Vamos lá!&lt;/P&gt;&lt;P style="color: #333333; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; font-size: 16px;"&gt;&lt;/P&gt;&lt;H3 style="color: #333333; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif;"&gt;Primeiro passo&lt;/H3&gt;&lt;P style="color: #333333; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; font-size: 16px;"&gt;Carregar as duas tabelas&lt;/P&gt;&lt;P style="color: #333333; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; font-size: 16px;"&gt;&lt;A href="https://ynicolett.files.wordpress.com/2015/10/exemplo05-02.jpg"&gt;&lt;IMG alt="Exemplo05-02" class="wp-image-357 alignnone jive-image size-full" height="89" src="https://ynicolett.files.wordpress.com/2015/10/exemplo05-02.jpg" width="309" /&gt;&lt;/A&gt;&lt;/P&gt;&lt;P style="color: #333333; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; font-size: 16px;"&gt;&lt;/P&gt;&lt;H3 style="color: #333333; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif;"&gt;Segundo passo&lt;/H3&gt;&lt;P style="color: #333333; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; font-size: 16px;"&gt;Criar a coluna C na tabela 2.&lt;/P&gt;&lt;P style="color: #333333; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; font-size: 16px;"&gt;Para criar esse registro de maneira otimizada, podemos criar uma tabela sem registro com um valor nulo sendo atribuído com o nome de C.&lt;/P&gt;&lt;P style="color: #333333; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; font-size: 16px;"&gt;&lt;A href="https://ynicolett.files.wordpress.com/2015/10/exemplo05-03.jpg"&gt;&lt;IMG alt="Exemplo05-03" class="alignnone wp-image-358 jive-image size-full" height="85" src="https://ynicolett.files.wordpress.com/2015/10/exemplo05-03.jpg" width="179" /&gt;&lt;/A&gt;&lt;/P&gt;&lt;P style="color: #333333; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; font-size: 16px;"&gt;&lt;/P&gt;&lt;H3 style="color: #333333; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif;"&gt;Terceiro passo&lt;/H3&gt;&lt;P style="color: #333333; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; font-size: 16px;"&gt;Gerar um novo QVD da Tabela 2 agora possuindo as colunas A, B, C, D, F e G.&lt;/P&gt;&lt;P style="color: #333333; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; font-size: 16px;"&gt;&lt;A href="https://ynicolett.files.wordpress.com/2015/10/exemplo05-04.jpg"&gt;&lt;IMG alt="Exemplo05-04" class="alignnone wp-image-359 jive-image size-full" height="41" src="https://ynicolett.files.wordpress.com/2015/10/exemplo05-04.jpg" width="291" /&gt;&lt;/A&gt;&lt;/P&gt;&lt;P style="color: #333333; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; font-size: 16px;"&gt;&lt;/P&gt;&lt;H3 style="color: #333333; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif;"&gt;Quarto passo&lt;/H3&gt;&lt;P style="color: #333333; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; font-size: 16px;"&gt;Carregar o novo QVD da Tabela 2 e Concatenar com a Tabela 1.&lt;/P&gt;&lt;P style="color: #333333; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; font-size: 16px;"&gt;&lt;A href="https://ynicolett.files.wordpress.com/2015/10/exemplo05-05.jpg"&gt;&lt;IMG alt="Exemplo05-05" class="alignnone wp-image-360 jive-image size-full" height="58" src="https://ynicolett.files.wordpress.com/2015/10/exemplo05-05.jpg" width="330" /&gt;&lt;/A&gt;&lt;/P&gt;&lt;P style="color: #333333; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; font-size: 16px;"&gt;&lt;/P&gt;&lt;H2 style="color: #333333; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif;"&gt;Entendendo&lt;/H2&gt;&lt;P style="color: #333333; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; font-size: 16px;"&gt;&lt;A href="https://ynicolett.files.wordpress.com/2015/10/exemplo05-07.jpg"&gt;&lt;IMG alt="Exemplo05-07" class="wp-image-361 alignnone jive-image size-full" height="335" src="https://ynicolett.files.wordpress.com/2015/10/exemplo05-07.jpg" style="height: 335px; width: 684.869px;" width="685" /&gt;&lt;/A&gt;&lt;/P&gt;&lt;P style="color: #333333; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; font-size: 16px;"&gt;&lt;/P&gt;&lt;P style="color: #333333; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; font-size: 16px;"&gt;Depois de entender como é o comportamento do QlikView na concatenatação de tabelas, o "pulo do gato" foi adicionar a coluna C na Tabela 2 através de um AutoGenerate.&lt;/P&gt;&lt;P style="color: #333333; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; font-size: 16px;"&gt;&lt;/P&gt;&lt;P style="color: #333333; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; font-size: 16px;"&gt;Veja a execução do script mantendo a leitura otimizada:&lt;/P&gt;&lt;P style="color: #333333; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; font-size: 16px;"&gt;&lt;A href="https://ynicolett.files.wordpress.com/2015/10/exemplo05-08.jpg"&gt;&lt;IMG alt="Exemplo05-08" class="wp-image-362 alignnone jive-image size-full" height="271" src="https://ynicolett.files.wordpress.com/2015/10/exemplo05-08.jpg" width="592" /&gt;&lt;/A&gt;&lt;/P&gt;&lt;P style="color: #333333; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; font-size: 16px;"&gt;&lt;/P&gt;&lt;H1 style="color: #333333; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif;"&gt;Exemplo para Download&lt;/H1&gt;&lt;P style="color: #333333; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; font-size: 16px;"&gt;A aplicação de exemplo esta disponível para download &lt;A href="https://drive.google.com/file/d/0B2cPTU8EF4R4aHMySnZIZF9abEE/view?usp=sharing" target="_blank"&gt;aqui&lt;/A&gt;!&lt;/P&gt;&lt;P style="color: #333333; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; font-size: 16px;"&gt;&lt;/P&gt;&lt;P style="color: #333333; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; font-size: 16px;"&gt;&lt;/P&gt;&lt;H1 style="color: #333333; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif;"&gt;Conclusão&lt;/H1&gt;&lt;P style="color: #333333; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; font-size: 16px;"&gt;Isso pode parecer bobo e talvez desnecessário, mas te garanto que em projetos grandes essas manhas vão ajudar bastante para manter a performance de tempo de recarga das aplicações.&lt;/P&gt;&lt;P style="color: #333333; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; font-size: 16px;"&gt;E não poderia deixar de falar que é sempre importante aprendermos sobre melhores práticas e entendermos o comportamento do QlikView para determinadas ações.&lt;/P&gt;&lt;P style="color: #333333; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; font-size: 16px;"&gt;&lt;/P&gt;&lt;P style="color: #333333; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; font-size: 16px;"&gt;&lt;/P&gt;&lt;P style="color: #333333; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; font-size: 16px;"&gt;&lt;/P&gt;&lt;P style="color: #333333; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; font-size: 16px;"&gt;É isso pessoal!&lt;/P&gt;&lt;P style="color: #333333; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; font-size: 16px;"&gt;Até a próxima semana!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 24 Oct 2015 20:03:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Brasil/Melhores-Pr%C3%A1ticas-Concatenar-tabelas-sem-perder-a-leitura/m-p/1468053#M54106</guid>
      <dc:creator>nicolett_yuri</dc:creator>
      <dc:date>2015-10-24T20:03:00Z</dc:date>
    </item>
    <item>
      <title>Re: Melhores Práticas – Concatenar tabelas sem perder a leitura otimizada</title>
      <link>https://community.qlik.com/t5/Brasil/Melhores-Pr%C3%A1ticas-Concatenar-tabelas-sem-perder-a-leitura/m-p/1468054#M54107</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Muito bom!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Aug 2017 16:49:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Brasil/Melhores-Pr%C3%A1ticas-Concatenar-tabelas-sem-perder-a-leitura/m-p/1468054#M54107</guid>
      <dc:creator />
      <dc:date>2017-08-04T16:49:40Z</dc:date>
    </item>
    <item>
      <title>Re: Melhores Práticas – Concatenar tabelas sem perder a leitura otimizada</title>
      <link>https://community.qlik.com/t5/Brasil/Melhores-Pr%C3%A1ticas-Concatenar-tabelas-sem-perder-a-leitura/m-p/1468055#M54108</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Muito Útil, obrigado.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Aug 2017 17:57:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Brasil/Melhores-Pr%C3%A1ticas-Concatenar-tabelas-sem-perder-a-leitura/m-p/1468055#M54108</guid>
      <dc:creator>marcelvinicius</dc:creator>
      <dc:date>2017-08-04T17:57:14Z</dc:date>
    </item>
  </channel>
</rss>

