<?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 Cuidado com a leitura de múltiplos arquivos em união de tabelas (JOIN) in Brasil</title>
    <link>https://community.qlik.com/t5/Brasil/Cuidado-com-a-leitura-de-m%C3%BAltiplos-arquivos-em-uni%C3%A3o-de-tabelas/m-p/1469708#M54165</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="color: #222222; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; margin-bottom: 0.825em; font-size: 14px;"&gt;Fala pessoal, tudo bom?&lt;/P&gt;&lt;P style="color: #222222; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; margin-bottom: 0.825em; font-size: 14px;"&gt;&lt;/P&gt;&lt;P style="color: #222222; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; margin-bottom: 0.825em; font-size: 14px;"&gt;Mais um post sobre os CUIDADOS que devemos ter em nosso script para evitar erros!&lt;/P&gt;&lt;P style="color: #222222; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; margin-bottom: 0.825em; font-size: 14px;"&gt;&lt;/P&gt;&lt;P style="color: #222222; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; margin-bottom: 0.825em; font-size: 14px;"&gt;&lt;/P&gt;&lt;P style="color: #222222; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; margin-bottom: 0.825em; font-size: 14px;"&gt;Dessa vez quero falar sobre a leitura de múltiplos arquivos através dos caracteres curinga* (ahn? ajuda aí!)&lt;/P&gt;&lt;P style="color: #222222; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; margin-bottom: 0.825em; font-size: 14px;"&gt;&lt;/P&gt;&lt;P style="color: #222222; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; margin-bottom: 0.825em; font-size: 14px;"&gt;Wikipedia diz: Em computação os &lt;STRONG style="font-style: inherit;"&gt;caracteres-curinga&lt;/STRONG&gt; são utilizados em casamento de padrões para &lt;SPAN style="text-decoration: underline;"&gt;&lt;STRONG style="font-style: inherit;"&gt;substituir&lt;/STRONG&gt;&lt;/SPAN&gt; algum outro carácter desconhecido em uma sequência de caracteres.&lt;/P&gt;&lt;P style="color: #222222; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; margin-bottom: 0.825em; font-size: 14px;"&gt;É muito utilizado ao realizar um glob para procurar arquivos cujo nome ou caminho completo são desconhecidos. Nos interpretadores de comandos, o caractere asterisco (*) é reconhecido como um caractere-curinga que casa com qualquer número de caracteres desconhecidos e o caractere interrogação (?) é um curinga que casa com um único caractere desconhecido.&lt;/P&gt;&lt;P style="color: #222222; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; margin-bottom: 0.825em; font-size: 14px;"&gt;(entendido? rsrs! retornando ao texto) quando utilizamos em conjunto de união de tabelas (JOIN! - Neste exemplo o CONCATENATE não é um erro, mas falo disso no final).&lt;/P&gt;&lt;P style="color: #222222; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; margin-bottom: 0.825em; font-size: 14px;"&gt;&lt;/P&gt;&lt;P style="color: #222222; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; margin-bottom: 0.825em; font-size: 14px;"&gt;É um erro bobo, mas fácil de ser cometido. Sabe por quê? Porque conhecemos os conceitos e comportamentos do QlikView.&lt;/P&gt;&lt;P style="color: #222222; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; margin-bottom: 0.825em; font-size: 14px;"&gt;&lt;/P&gt;&lt;P style="color: #222222; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; margin-bottom: 0.825em; font-size: 14px;"&gt;&lt;/P&gt;&lt;H1 style="color: #111111; font-family: Merriweather, Georgia, Times, serif; font-size: 1.6em; margin: 0 0 0.8125em;"&gt;Conceitos e comportamentos&lt;/H1&gt;&lt;P style="color: #222222; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; margin-bottom: 0.825em; font-size: 14px;"&gt;Sabemos que o QlikView possui o comportamento de unir (transformar em apenas uma) tabelas que possuem os mesmos campos (com a mesma nomenclatura), por esta razão quando utilizamos o caractere curinga para fazer uma leitura múltipla de arquivo, o QlikView "faz o favor" de unir todas essas tabelas (desde que respeite a regra anterior que falamos) em apenas uma.&lt;/P&gt;&lt;H2 style="color: #111111; font-family: Merriweather, Georgia, Times, serif; font-weight: inherit; font-size: 1.4em; margin: 0 0 0.8125em;"&gt; &lt;/H2&gt;&lt;H2 style="color: #111111; font-family: Merriweather, Georgia, Times, serif; font-weight: inherit; font-size: 1.4em; margin: 0 0 0.8125em;"&gt;Exemplo&lt;/H2&gt;&lt;P style="color: #222222; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; margin-bottom: 0.825em; font-size: 14px;"&gt;Imagine um cenário com em que precisamos carregar planilhas com notas fiscais. Cada uma das planilhas possui informação de apenas um mês/ano.&lt;/P&gt;&lt;P style="color: #222222; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; margin-bottom: 0.825em; font-size: 14px;"&gt;&lt;/P&gt;&lt;P style="color: #222222; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; margin-bottom: 0.825em; font-size: 14px;"&gt;Lista de arquivos: NF_jan12.xls, NF_fev12.xls, NF_mar12.xls e NF_abr12.xls.&lt;/P&gt;&lt;P style="color: #222222; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; margin-bottom: 0.825em; font-size: 14px;"&gt;&lt;/P&gt;&lt;P style="color: #222222; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; margin-bottom: 0.825em; font-size: 14px;"&gt;Esses arquivos estão perfeitos para serem carregados de uma única vez através do caractere curinga "*".&lt;/P&gt;&lt;P style="color: #222222; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; margin-bottom: 0.825em; font-size: 14px;"&gt;Ah, vale lembrar que esses arquivos estão todos do mesmo padrão, isso inclui: nome das colunas e nome da aba a serem carregadas.&lt;/P&gt;&lt;P style="color: #222222; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; margin-bottom: 0.825em; font-size: 14px;"&gt;&lt;/P&gt;&lt;P style="color: #222222; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; margin-bottom: 0.825em; font-size: 14px;"&gt;Em nosso script do qlikview:&lt;/P&gt;&lt;P style="color: #222222; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; margin-bottom: 0.825em; font-size: 14px;"&gt;&lt;A href="https://ynicolett.files.wordpress.com/2015/06/011.jpg" style="color: #1b8be0; font-style: inherit; font-weight: inherit;"&gt;&lt;IMG alt="01" class="alignnone jive-image size-medium wp-image-200" height="72" src="https://ynicolett.files.wordpress.com/2015/06/011.jpg?w=300" style="color: #222222; font-style: inherit; font-weight: inherit; border-color: #dddddd; padding: 6px; margin-top: 0.4em;" width="300" /&gt;&lt;/A&gt;&lt;/P&gt;&lt;P style="color: #222222; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; margin-bottom: 0.825em; font-size: 14px;"&gt;&lt;/P&gt;&lt;P style="color: #222222; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; margin-bottom: 0.825em; font-size: 14px;"&gt;Resultado:&lt;/P&gt;&lt;P style="color: #222222; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; margin-bottom: 0.825em; font-size: 14px;"&gt;&lt;IMG alt="02" class="alignnone jive-image wp-image-201 size-full" height="125" src="https://ynicolett.files.wordpress.com/2015/06/021.jpg" style="font-style: inherit; font-weight: inherit; border: 1px solid #dddddd; padding: 6px; margin-top: 0.4em;" width="209" /&gt;&lt;/P&gt;&lt;P style="color: #222222; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; margin-bottom: 0.825em; font-size: 14px;"&gt;A leitura dos quatros arquivos se resumiram em apenas uma tabela devido ao comportamento do QlikView.&lt;/P&gt;&lt;P style="color: #222222; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; margin-bottom: 0.825em; font-size: 14px;"&gt;Agora vamos para o exemplo em que podemos se esquecer desse comportamento e cometer um erro grave.&lt;/P&gt;&lt;H1 style="color: #111111; font-family: Merriweather, Georgia, Times, serif; font-size: 1.6em; margin: 0 0 0.8125em;"&gt; &lt;/H1&gt;&lt;H1 style="color: #111111; font-family: Merriweather, Georgia, Times, serif; font-size: 1.6em; margin: 0 0 0.8125em;"&gt;&lt;/H1&gt;&lt;H1 style="color: #111111; font-family: Merriweather, Georgia, Times, serif; font-size: 1.6em; margin: 0 0 0.8125em;"&gt;O problema&lt;/H1&gt;&lt;P style="color: #222222; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; margin-bottom: 0.825em; font-size: 14px;"&gt;Agora temos uma tabela principal com o nome das empresas de um grupo, conforme imagem:&lt;/P&gt;&lt;P style="color: #222222; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; margin-bottom: 0.825em; font-size: 14px;"&gt;&lt;A href="https://ynicolett.files.wordpress.com/2015/06/03.jpg" style="color: #1b8be0; font-style: inherit; font-weight: inherit;"&gt;&lt;IMG alt="03" class="alignnone wp-image-202 jive-image size-full" height="119" src="https://ynicolett.files.wordpress.com/2015/06/03.jpg" style="color: #222222; font-style: inherit; font-weight: inherit; border-color: #dddddd; padding: 6px; margin-top: 0.4em;" width="197" /&gt;&lt;/A&gt;&lt;/P&gt;&lt;P style="color: #222222; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; margin-bottom: 0.825em; font-size: 14px;"&gt;Queremos exibir os dados de faturamento, mas mostrando todas as empresas, ou seja, mesmo que a empresa não tenha faturado nada, esta deve exibir no relatório.&lt;/P&gt;&lt;P style="color: #222222; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; margin-bottom: 0.825em; font-size: 14px;"&gt;&lt;/P&gt;&lt;P style="color: #222222; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; margin-bottom: 0.825em; font-size: 14px;"&gt;Tecnicamente, iremos carregar primeira a tabela com a descrição das empresas e depois fazer o LEFT JOIN utilizando a tabela de nota fiscal. Nosso script seria:&lt;/P&gt;&lt;P style="color: #222222; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; margin-bottom: 0.825em; font-size: 14px;"&gt;&lt;A href="https://ynicolett.files.wordpress.com/2015/06/04.jpg" style="color: #1b8be0; font-style: inherit; font-weight: inherit;"&gt;&lt;IMG alt="04" class="alignnone wp-image-203 jive-image size-medium" height="151" src="https://ynicolett.files.wordpress.com/2015/06/04.jpg?w=300" style="color: #222222; font-style: inherit; font-weight: inherit; border-color: #dddddd; padding: 6px; margin-top: 0.4em;" width="300" /&gt;&lt;/A&gt;&lt;/P&gt;&lt;P style="color: #222222; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; margin-bottom: 0.825em; font-size: 14px;"&gt;&lt;/P&gt;&lt;P style="color: #222222; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; margin-bottom: 0.825em; font-size: 14px;"&gt;Executando o script, veja o resultado:&lt;/P&gt;&lt;P style="color: #222222; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; margin-bottom: 0.825em; font-size: 14px;"&gt;&lt;A href="https://ynicolett.files.wordpress.com/2015/06/05.jpg" style="color: #1b8be0; font-style: inherit; font-weight: inherit;"&gt;&lt;IMG alt="05" class="wp-image-204 alignnone jive-image size-full" height="137" src="https://ynicolett.files.wordpress.com/2015/06/05.jpg" style="color: #222222; font-style: inherit; font-weight: inherit; border-color: #dddddd; padding: 6px; margin-top: 0.4em;" width="202" /&gt;&lt;/A&gt; &lt;A href="https://ynicolett.files.wordpress.com/2015/06/06.jpg" style="color: #1b8be0; font-style: inherit; font-weight: inherit;"&gt;&lt;IMG alt="06" class="wp-image-205 alignnone jive-image size-medium" height="162" src="https://ynicolett.files.wordpress.com/2015/06/06.jpg?w=300" style="color: #222222; font-style: inherit; font-weight: inherit; border-color: #dddddd; padding: 6px; margin-top: 0.4em;" width="300" /&gt;&lt;/A&gt;&lt;/P&gt;&lt;P style="color: #222222; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; margin-bottom: 0.825em; font-size: 14px;"&gt;&lt;/P&gt;&lt;P style="color: #222222; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; margin-bottom: 0.825em; font-size: 14px;"&gt;O resultado ficou como esperado! As empresas 4 e 5 estão sendo exibidas sem nenhuma nota fiscal e o restante das informações fez a ligação com a descrição da empresa.&lt;/P&gt;&lt;P style="color: #222222; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; margin-bottom: 0.825em; font-size: 14px;"&gt;&lt;STRONG style="text-decoration: underline;"&gt;Opa, mas peraí!&lt;/STRONG&gt; Carreguei informações de Jan/2013, Fev/2013, Mar/2013 e Abr/2013... Por quê esta aparecendo somente os dados de Abr/2013?&lt;/P&gt;&lt;H2 style="color: #111111; font-family: Merriweather, Georgia, Times, serif; font-weight: inherit; font-size: 1.4em; margin: 0 0 0.8125em;"&gt; &lt;/H2&gt;&lt;H2 style="color: #111111; font-family: Merriweather, Georgia, Times, serif; font-weight: inherit; font-size: 1.4em; margin: 0 0 0.8125em;"&gt;&lt;/H2&gt;&lt;H2 style="color: #111111; font-family: Merriweather, Georgia, Times, serif; font-weight: inherit; font-size: 1.4em; margin: 0 0 0.8125em;"&gt;O erro cometido&lt;/H2&gt;&lt;P style="color: #222222; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; margin-bottom: 0.825em; font-size: 14px;"&gt;Aparentemente fizemos tudo certo, mas um grande detalhe de comportamento nos atrapalhou: leitura múltipla de arquivos em conjunto com união de tabelas.&lt;/P&gt;&lt;H2 style="color: #111111; font-family: Merriweather, Georgia, Times, serif; font-weight: inherit; font-size: 1.4em; margin: 0 0 0.8125em;"&gt; &lt;/H2&gt;&lt;H2 style="color: #111111; font-family: Merriweather, Georgia, Times, serif; font-weight: inherit; font-size: 1.4em; margin: 0 0 0.8125em;"&gt;&lt;/H2&gt;&lt;H2 style="color: #111111; font-family: Merriweather, Georgia, Times, serif; font-weight: inherit; font-size: 1.4em; margin: 0 0 0.8125em;"&gt;Vamos pensar...&lt;/H2&gt;&lt;P style="color: #222222; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; margin-bottom: 0.825em; font-size: 14px;"&gt;Seguindo o comportamento de execução do Qlikview, em primeiro lugar carregamos a tabela Empresas e passamos a chama-la de Fato, tendo essa tabela carregada (em memória), realizamos a leitura múltipla das tabelas de notas fiscais e fazemos a união desta tabela com a data Fato através da coluna COD_EMPRESA.&lt;/P&gt;&lt;P style="color: #222222; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; margin-bottom: 0.825em; font-size: 14px;"&gt;Durante a execução, após ter a tabela fato em memória, da leitura múltipla, o QlikView, faz a leitura do primeiro arquivo encontrado que é "NF_abr13.xls" (Por quê esse? Ordem Alfabética!) e realiza o LEFT JOIN com a tabela fato, depois disso o QlikView faz a leitura do próximo arquivo "NF_fev12.xls" e realiza o LEFT JOIN com a tabela fato. &lt;SPAN style="text-decoration: underline;"&gt;&lt;STRONG style="font-style: inherit;"&gt;OPA !!!!&lt;/STRONG&gt;&lt;/SPAN&gt; neste momento a tabela Fato já possui as colunas do arquivo de Empresas: COD_EMPRESA e DES_EMPRESA, e as colunas do arquivo de Nota Fiscal: NF_NUMERO, NF_DT_PAGAM, NF_VL_PAGAM e COD_EMPRESA, ou seja, ao tentar fazer o LEFT JOIN do segundo arquivo "NF_fev12.xls", o QlikView não vai encontrar (match) a combinação de registros das colunas (NF_NUMERO, NF_DT_PAGAM, NF_VL_PAGAM e COD_EMPRESA).&lt;/P&gt;&lt;P style="color: #222222; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; margin-bottom: 0.825em; font-size: 14px;"&gt;&lt;STRONG style="font-style: inherit; text-decoration: underline;"&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="color: #222222; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; margin-bottom: 0.825em; font-size: 14px;"&gt;&lt;STRONG style="font-style: inherit; text-decoration: underline;"&gt;Não entendi!&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="color: #222222; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; margin-bottom: 0.825em; font-size: 14px;"&gt;No primeiro arquivo, a chave de ligação do LEFT JOIN é apenas a coluna COD_EMPRESA (essa é a chave correta), porém a partir do segundo arquivo, a chave de ligação passa a ser: COD_EMPESA, NF_NUMERO, NF_DT_PAGAM, e NF_VL_PAGAM porque essas colunas já foram carregadas no primeiro arquivo carregado.&lt;/P&gt;&lt;P style="color: #222222; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; margin-bottom: 0.825em; font-size: 14px;"&gt;Logicamente, essa nova chave não fará mais nenhuma ligação por não termos essa combinação de registros.&lt;/P&gt;&lt;P style="color: #222222; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; margin-bottom: 0.825em; font-size: 14px;"&gt;Desenhando (esse momento foi muito difícil pra mim rsrs!!!)&lt;/P&gt;&lt;P style="color: #222222; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; margin-bottom: 0.825em; font-size: 14px;"&gt;&lt;A href="https://ynicolett.files.wordpress.com/2015/06/07.jpg" style="color: #1b8be0; font-style: inherit; font-weight: inherit;"&gt;&lt;IMG alt="07" class="wp-image-206 alignnone jive-image size-medium" height="142" src="https://ynicolett.files.wordpress.com/2015/06/07.jpg?w=300" style="color: #222222; font-style: inherit; font-weight: inherit; border-color: #dddddd; padding: 6px; margin-top: 0.4em;" width="300" /&gt;&lt;/A&gt;&lt;/P&gt;&lt;P style="color: #222222; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; margin-bottom: 0.825em; font-size: 14px;"&gt;&lt;A href="https://ynicolett.files.wordpress.com/2015/06/08.jpg" style="color: #1b8be0; font-style: inherit; font-weight: inherit;"&gt;&lt;IMG alt="08" class="wp-image-207 alignnone jive-image size-medium" height="122" src="https://ynicolett.files.wordpress.com/2015/06/08.jpg?w=300" style="color: #222222; font-style: inherit; font-weight: inherit; border-color: #dddddd; padding: 6px; margin-top: 0.4em;" width="300" /&gt;&lt;/A&gt;&lt;/P&gt;&lt;H1 style="color: #111111; font-family: Merriweather, Georgia, Times, serif; font-size: 1.6em; margin: 0 0 0.8125em;"&gt; &lt;/H1&gt;&lt;H1 style="color: #111111; font-family: Merriweather, Georgia, Times, serif; font-size: 1.6em; margin: 0 0 0.8125em;"&gt;&lt;/H1&gt;&lt;H1 style="color: #111111; font-family: Merriweather, Georgia, Times, serif; font-size: 1.6em; margin: 0 0 0.8125em;"&gt;O que fazer?&lt;/H1&gt;&lt;P style="color: #222222; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; margin-bottom: 0.825em; font-size: 14px;"&gt;Bom, se o comportamento do QlikView é esse, então nestes casos é sempre importante termos um passo antes para carregar todos esses arquivos e guardar em uma tabela temporária, para depois fazer o JOIN. Dessa forma:&lt;/P&gt;&lt;P style="color: #222222; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; margin-bottom: 0.825em; font-size: 14px;"&gt;&lt;A href="https://ynicolett.files.wordpress.com/2015/06/09.jpg" style="color: #1b8be0; font-style: inherit; font-weight: inherit;"&gt;&lt;IMG alt="09" class="alignnone jive-image wp-image-208 size-medium" height="249" src="https://ynicolett.files.wordpress.com/2015/06/09.jpg?w=300" style="color: #222222; font-style: inherit; font-weight: inherit; border-color: #dddddd; padding: 6px; margin-top: 0.4em;" width="300" /&gt;&lt;/A&gt;&lt;/P&gt;&lt;H1 style="color: #111111; font-family: Merriweather, Georgia, Times, serif; font-size: 1.6em; margin: 0 0 0.8125em;"&gt; &lt;/H1&gt;&lt;H1 style="color: #111111; font-family: Merriweather, Georgia, Times, serif; font-size: 1.6em; margin: 0 0 0.8125em;"&gt;E o concatenate?&lt;/H1&gt;&lt;P style="color: #222222; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; margin-bottom: 0.825em; font-size: 14px;"&gt;Para concatenate &lt;SPAN style="text-decoration: underline;"&gt;não tem problema&lt;/SPAN&gt;, pois o processo é de forçar a concatenação, independente de quais colunas estejam nas tabelas.&lt;/P&gt;&lt;H1 style="color: #111111; font-family: Merriweather, Georgia, Times, serif; font-size: 1.6em; margin: 0 0 0.8125em;"&gt; &lt;/H1&gt;&lt;H1 style="color: #111111; font-family: Merriweather, Georgia, Times, serif; font-size: 1.6em; margin: 0 0 0.8125em;"&gt;Conclusão&lt;/H1&gt;&lt;P style="color: #222222; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; margin-bottom: 0.825em; font-size: 14px;"&gt;É muito importante conhecermos a fundo os conceitos e comportamentos do QlikView. Neste caso, nossa cabeça pensa que o QlikView vai carregar todos os arquivos (concatenando-os) para depois fazer o JOIN, porém aprendemos que o QlikView não se comporta dessa forma.&lt;/P&gt;&lt;P style="color: #222222; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; margin-bottom: 0.825em; font-size: 14px;"&gt;&lt;A href="https://drive.google.com/file/d/0B2cPTU8EF4R4YkgtR1pqdFdDMVE/view?usp=sharing" style="color: #1b8be0; font-style: inherit; font-weight: inherit;" target="_blank"&gt;Para quem deseja, segue a aplicação de exemplo para download.&lt;/A&gt;&lt;/P&gt;&lt;P style="color: #222222; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; margin-bottom: 0.825em; font-size: 14px;"&gt;&lt;/P&gt;&lt;P style="color: #222222; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; margin-bottom: 0.825em; font-size: 14px;"&gt;Até a próxima semana pessoal!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 28 Jun 2015 21:58:00 GMT</pubDate>
    <dc:creator>nicolett_yuri</dc:creator>
    <dc:date>2015-06-28T21:58:00Z</dc:date>
    <item>
      <title>Cuidado com a leitura de múltiplos arquivos em união de tabelas (JOIN)</title>
      <link>https://community.qlik.com/t5/Brasil/Cuidado-com-a-leitura-de-m%C3%BAltiplos-arquivos-em-uni%C3%A3o-de-tabelas/m-p/1469708#M54165</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="color: #222222; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; margin-bottom: 0.825em; font-size: 14px;"&gt;Fala pessoal, tudo bom?&lt;/P&gt;&lt;P style="color: #222222; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; margin-bottom: 0.825em; font-size: 14px;"&gt;&lt;/P&gt;&lt;P style="color: #222222; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; margin-bottom: 0.825em; font-size: 14px;"&gt;Mais um post sobre os CUIDADOS que devemos ter em nosso script para evitar erros!&lt;/P&gt;&lt;P style="color: #222222; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; margin-bottom: 0.825em; font-size: 14px;"&gt;&lt;/P&gt;&lt;P style="color: #222222; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; margin-bottom: 0.825em; font-size: 14px;"&gt;&lt;/P&gt;&lt;P style="color: #222222; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; margin-bottom: 0.825em; font-size: 14px;"&gt;Dessa vez quero falar sobre a leitura de múltiplos arquivos através dos caracteres curinga* (ahn? ajuda aí!)&lt;/P&gt;&lt;P style="color: #222222; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; margin-bottom: 0.825em; font-size: 14px;"&gt;&lt;/P&gt;&lt;P style="color: #222222; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; margin-bottom: 0.825em; font-size: 14px;"&gt;Wikipedia diz: Em computação os &lt;STRONG style="font-style: inherit;"&gt;caracteres-curinga&lt;/STRONG&gt; são utilizados em casamento de padrões para &lt;SPAN style="text-decoration: underline;"&gt;&lt;STRONG style="font-style: inherit;"&gt;substituir&lt;/STRONG&gt;&lt;/SPAN&gt; algum outro carácter desconhecido em uma sequência de caracteres.&lt;/P&gt;&lt;P style="color: #222222; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; margin-bottom: 0.825em; font-size: 14px;"&gt;É muito utilizado ao realizar um glob para procurar arquivos cujo nome ou caminho completo são desconhecidos. Nos interpretadores de comandos, o caractere asterisco (*) é reconhecido como um caractere-curinga que casa com qualquer número de caracteres desconhecidos e o caractere interrogação (?) é um curinga que casa com um único caractere desconhecido.&lt;/P&gt;&lt;P style="color: #222222; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; margin-bottom: 0.825em; font-size: 14px;"&gt;(entendido? rsrs! retornando ao texto) quando utilizamos em conjunto de união de tabelas (JOIN! - Neste exemplo o CONCATENATE não é um erro, mas falo disso no final).&lt;/P&gt;&lt;P style="color: #222222; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; margin-bottom: 0.825em; font-size: 14px;"&gt;&lt;/P&gt;&lt;P style="color: #222222; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; margin-bottom: 0.825em; font-size: 14px;"&gt;É um erro bobo, mas fácil de ser cometido. Sabe por quê? Porque conhecemos os conceitos e comportamentos do QlikView.&lt;/P&gt;&lt;P style="color: #222222; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; margin-bottom: 0.825em; font-size: 14px;"&gt;&lt;/P&gt;&lt;P style="color: #222222; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; margin-bottom: 0.825em; font-size: 14px;"&gt;&lt;/P&gt;&lt;H1 style="color: #111111; font-family: Merriweather, Georgia, Times, serif; font-size: 1.6em; margin: 0 0 0.8125em;"&gt;Conceitos e comportamentos&lt;/H1&gt;&lt;P style="color: #222222; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; margin-bottom: 0.825em; font-size: 14px;"&gt;Sabemos que o QlikView possui o comportamento de unir (transformar em apenas uma) tabelas que possuem os mesmos campos (com a mesma nomenclatura), por esta razão quando utilizamos o caractere curinga para fazer uma leitura múltipla de arquivo, o QlikView "faz o favor" de unir todas essas tabelas (desde que respeite a regra anterior que falamos) em apenas uma.&lt;/P&gt;&lt;H2 style="color: #111111; font-family: Merriweather, Georgia, Times, serif; font-weight: inherit; font-size: 1.4em; margin: 0 0 0.8125em;"&gt; &lt;/H2&gt;&lt;H2 style="color: #111111; font-family: Merriweather, Georgia, Times, serif; font-weight: inherit; font-size: 1.4em; margin: 0 0 0.8125em;"&gt;Exemplo&lt;/H2&gt;&lt;P style="color: #222222; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; margin-bottom: 0.825em; font-size: 14px;"&gt;Imagine um cenário com em que precisamos carregar planilhas com notas fiscais. Cada uma das planilhas possui informação de apenas um mês/ano.&lt;/P&gt;&lt;P style="color: #222222; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; margin-bottom: 0.825em; font-size: 14px;"&gt;&lt;/P&gt;&lt;P style="color: #222222; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; margin-bottom: 0.825em; font-size: 14px;"&gt;Lista de arquivos: NF_jan12.xls, NF_fev12.xls, NF_mar12.xls e NF_abr12.xls.&lt;/P&gt;&lt;P style="color: #222222; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; margin-bottom: 0.825em; font-size: 14px;"&gt;&lt;/P&gt;&lt;P style="color: #222222; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; margin-bottom: 0.825em; font-size: 14px;"&gt;Esses arquivos estão perfeitos para serem carregados de uma única vez através do caractere curinga "*".&lt;/P&gt;&lt;P style="color: #222222; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; margin-bottom: 0.825em; font-size: 14px;"&gt;Ah, vale lembrar que esses arquivos estão todos do mesmo padrão, isso inclui: nome das colunas e nome da aba a serem carregadas.&lt;/P&gt;&lt;P style="color: #222222; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; margin-bottom: 0.825em; font-size: 14px;"&gt;&lt;/P&gt;&lt;P style="color: #222222; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; margin-bottom: 0.825em; font-size: 14px;"&gt;Em nosso script do qlikview:&lt;/P&gt;&lt;P style="color: #222222; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; margin-bottom: 0.825em; font-size: 14px;"&gt;&lt;A href="https://ynicolett.files.wordpress.com/2015/06/011.jpg" style="color: #1b8be0; font-style: inherit; font-weight: inherit;"&gt;&lt;IMG alt="01" class="alignnone jive-image size-medium wp-image-200" height="72" src="https://ynicolett.files.wordpress.com/2015/06/011.jpg?w=300" style="color: #222222; font-style: inherit; font-weight: inherit; border-color: #dddddd; padding: 6px; margin-top: 0.4em;" width="300" /&gt;&lt;/A&gt;&lt;/P&gt;&lt;P style="color: #222222; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; margin-bottom: 0.825em; font-size: 14px;"&gt;&lt;/P&gt;&lt;P style="color: #222222; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; margin-bottom: 0.825em; font-size: 14px;"&gt;Resultado:&lt;/P&gt;&lt;P style="color: #222222; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; margin-bottom: 0.825em; font-size: 14px;"&gt;&lt;IMG alt="02" class="alignnone jive-image wp-image-201 size-full" height="125" src="https://ynicolett.files.wordpress.com/2015/06/021.jpg" style="font-style: inherit; font-weight: inherit; border: 1px solid #dddddd; padding: 6px; margin-top: 0.4em;" width="209" /&gt;&lt;/P&gt;&lt;P style="color: #222222; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; margin-bottom: 0.825em; font-size: 14px;"&gt;A leitura dos quatros arquivos se resumiram em apenas uma tabela devido ao comportamento do QlikView.&lt;/P&gt;&lt;P style="color: #222222; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; margin-bottom: 0.825em; font-size: 14px;"&gt;Agora vamos para o exemplo em que podemos se esquecer desse comportamento e cometer um erro grave.&lt;/P&gt;&lt;H1 style="color: #111111; font-family: Merriweather, Georgia, Times, serif; font-size: 1.6em; margin: 0 0 0.8125em;"&gt; &lt;/H1&gt;&lt;H1 style="color: #111111; font-family: Merriweather, Georgia, Times, serif; font-size: 1.6em; margin: 0 0 0.8125em;"&gt;&lt;/H1&gt;&lt;H1 style="color: #111111; font-family: Merriweather, Georgia, Times, serif; font-size: 1.6em; margin: 0 0 0.8125em;"&gt;O problema&lt;/H1&gt;&lt;P style="color: #222222; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; margin-bottom: 0.825em; font-size: 14px;"&gt;Agora temos uma tabela principal com o nome das empresas de um grupo, conforme imagem:&lt;/P&gt;&lt;P style="color: #222222; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; margin-bottom: 0.825em; font-size: 14px;"&gt;&lt;A href="https://ynicolett.files.wordpress.com/2015/06/03.jpg" style="color: #1b8be0; font-style: inherit; font-weight: inherit;"&gt;&lt;IMG alt="03" class="alignnone wp-image-202 jive-image size-full" height="119" src="https://ynicolett.files.wordpress.com/2015/06/03.jpg" style="color: #222222; font-style: inherit; font-weight: inherit; border-color: #dddddd; padding: 6px; margin-top: 0.4em;" width="197" /&gt;&lt;/A&gt;&lt;/P&gt;&lt;P style="color: #222222; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; margin-bottom: 0.825em; font-size: 14px;"&gt;Queremos exibir os dados de faturamento, mas mostrando todas as empresas, ou seja, mesmo que a empresa não tenha faturado nada, esta deve exibir no relatório.&lt;/P&gt;&lt;P style="color: #222222; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; margin-bottom: 0.825em; font-size: 14px;"&gt;&lt;/P&gt;&lt;P style="color: #222222; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; margin-bottom: 0.825em; font-size: 14px;"&gt;Tecnicamente, iremos carregar primeira a tabela com a descrição das empresas e depois fazer o LEFT JOIN utilizando a tabela de nota fiscal. Nosso script seria:&lt;/P&gt;&lt;P style="color: #222222; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; margin-bottom: 0.825em; font-size: 14px;"&gt;&lt;A href="https://ynicolett.files.wordpress.com/2015/06/04.jpg" style="color: #1b8be0; font-style: inherit; font-weight: inherit;"&gt;&lt;IMG alt="04" class="alignnone wp-image-203 jive-image size-medium" height="151" src="https://ynicolett.files.wordpress.com/2015/06/04.jpg?w=300" style="color: #222222; font-style: inherit; font-weight: inherit; border-color: #dddddd; padding: 6px; margin-top: 0.4em;" width="300" /&gt;&lt;/A&gt;&lt;/P&gt;&lt;P style="color: #222222; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; margin-bottom: 0.825em; font-size: 14px;"&gt;&lt;/P&gt;&lt;P style="color: #222222; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; margin-bottom: 0.825em; font-size: 14px;"&gt;Executando o script, veja o resultado:&lt;/P&gt;&lt;P style="color: #222222; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; margin-bottom: 0.825em; font-size: 14px;"&gt;&lt;A href="https://ynicolett.files.wordpress.com/2015/06/05.jpg" style="color: #1b8be0; font-style: inherit; font-weight: inherit;"&gt;&lt;IMG alt="05" class="wp-image-204 alignnone jive-image size-full" height="137" src="https://ynicolett.files.wordpress.com/2015/06/05.jpg" style="color: #222222; font-style: inherit; font-weight: inherit; border-color: #dddddd; padding: 6px; margin-top: 0.4em;" width="202" /&gt;&lt;/A&gt; &lt;A href="https://ynicolett.files.wordpress.com/2015/06/06.jpg" style="color: #1b8be0; font-style: inherit; font-weight: inherit;"&gt;&lt;IMG alt="06" class="wp-image-205 alignnone jive-image size-medium" height="162" src="https://ynicolett.files.wordpress.com/2015/06/06.jpg?w=300" style="color: #222222; font-style: inherit; font-weight: inherit; border-color: #dddddd; padding: 6px; margin-top: 0.4em;" width="300" /&gt;&lt;/A&gt;&lt;/P&gt;&lt;P style="color: #222222; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; margin-bottom: 0.825em; font-size: 14px;"&gt;&lt;/P&gt;&lt;P style="color: #222222; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; margin-bottom: 0.825em; font-size: 14px;"&gt;O resultado ficou como esperado! As empresas 4 e 5 estão sendo exibidas sem nenhuma nota fiscal e o restante das informações fez a ligação com a descrição da empresa.&lt;/P&gt;&lt;P style="color: #222222; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; margin-bottom: 0.825em; font-size: 14px;"&gt;&lt;STRONG style="text-decoration: underline;"&gt;Opa, mas peraí!&lt;/STRONG&gt; Carreguei informações de Jan/2013, Fev/2013, Mar/2013 e Abr/2013... Por quê esta aparecendo somente os dados de Abr/2013?&lt;/P&gt;&lt;H2 style="color: #111111; font-family: Merriweather, Georgia, Times, serif; font-weight: inherit; font-size: 1.4em; margin: 0 0 0.8125em;"&gt; &lt;/H2&gt;&lt;H2 style="color: #111111; font-family: Merriweather, Georgia, Times, serif; font-weight: inherit; font-size: 1.4em; margin: 0 0 0.8125em;"&gt;&lt;/H2&gt;&lt;H2 style="color: #111111; font-family: Merriweather, Georgia, Times, serif; font-weight: inherit; font-size: 1.4em; margin: 0 0 0.8125em;"&gt;O erro cometido&lt;/H2&gt;&lt;P style="color: #222222; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; margin-bottom: 0.825em; font-size: 14px;"&gt;Aparentemente fizemos tudo certo, mas um grande detalhe de comportamento nos atrapalhou: leitura múltipla de arquivos em conjunto com união de tabelas.&lt;/P&gt;&lt;H2 style="color: #111111; font-family: Merriweather, Georgia, Times, serif; font-weight: inherit; font-size: 1.4em; margin: 0 0 0.8125em;"&gt; &lt;/H2&gt;&lt;H2 style="color: #111111; font-family: Merriweather, Georgia, Times, serif; font-weight: inherit; font-size: 1.4em; margin: 0 0 0.8125em;"&gt;&lt;/H2&gt;&lt;H2 style="color: #111111; font-family: Merriweather, Georgia, Times, serif; font-weight: inherit; font-size: 1.4em; margin: 0 0 0.8125em;"&gt;Vamos pensar...&lt;/H2&gt;&lt;P style="color: #222222; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; margin-bottom: 0.825em; font-size: 14px;"&gt;Seguindo o comportamento de execução do Qlikview, em primeiro lugar carregamos a tabela Empresas e passamos a chama-la de Fato, tendo essa tabela carregada (em memória), realizamos a leitura múltipla das tabelas de notas fiscais e fazemos a união desta tabela com a data Fato através da coluna COD_EMPRESA.&lt;/P&gt;&lt;P style="color: #222222; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; margin-bottom: 0.825em; font-size: 14px;"&gt;Durante a execução, após ter a tabela fato em memória, da leitura múltipla, o QlikView, faz a leitura do primeiro arquivo encontrado que é "NF_abr13.xls" (Por quê esse? Ordem Alfabética!) e realiza o LEFT JOIN com a tabela fato, depois disso o QlikView faz a leitura do próximo arquivo "NF_fev12.xls" e realiza o LEFT JOIN com a tabela fato. &lt;SPAN style="text-decoration: underline;"&gt;&lt;STRONG style="font-style: inherit;"&gt;OPA !!!!&lt;/STRONG&gt;&lt;/SPAN&gt; neste momento a tabela Fato já possui as colunas do arquivo de Empresas: COD_EMPRESA e DES_EMPRESA, e as colunas do arquivo de Nota Fiscal: NF_NUMERO, NF_DT_PAGAM, NF_VL_PAGAM e COD_EMPRESA, ou seja, ao tentar fazer o LEFT JOIN do segundo arquivo "NF_fev12.xls", o QlikView não vai encontrar (match) a combinação de registros das colunas (NF_NUMERO, NF_DT_PAGAM, NF_VL_PAGAM e COD_EMPRESA).&lt;/P&gt;&lt;P style="color: #222222; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; margin-bottom: 0.825em; font-size: 14px;"&gt;&lt;STRONG style="font-style: inherit; text-decoration: underline;"&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="color: #222222; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; margin-bottom: 0.825em; font-size: 14px;"&gt;&lt;STRONG style="font-style: inherit; text-decoration: underline;"&gt;Não entendi!&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="color: #222222; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; margin-bottom: 0.825em; font-size: 14px;"&gt;No primeiro arquivo, a chave de ligação do LEFT JOIN é apenas a coluna COD_EMPRESA (essa é a chave correta), porém a partir do segundo arquivo, a chave de ligação passa a ser: COD_EMPESA, NF_NUMERO, NF_DT_PAGAM, e NF_VL_PAGAM porque essas colunas já foram carregadas no primeiro arquivo carregado.&lt;/P&gt;&lt;P style="color: #222222; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; margin-bottom: 0.825em; font-size: 14px;"&gt;Logicamente, essa nova chave não fará mais nenhuma ligação por não termos essa combinação de registros.&lt;/P&gt;&lt;P style="color: #222222; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; margin-bottom: 0.825em; font-size: 14px;"&gt;Desenhando (esse momento foi muito difícil pra mim rsrs!!!)&lt;/P&gt;&lt;P style="color: #222222; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; margin-bottom: 0.825em; font-size: 14px;"&gt;&lt;A href="https://ynicolett.files.wordpress.com/2015/06/07.jpg" style="color: #1b8be0; font-style: inherit; font-weight: inherit;"&gt;&lt;IMG alt="07" class="wp-image-206 alignnone jive-image size-medium" height="142" src="https://ynicolett.files.wordpress.com/2015/06/07.jpg?w=300" style="color: #222222; font-style: inherit; font-weight: inherit; border-color: #dddddd; padding: 6px; margin-top: 0.4em;" width="300" /&gt;&lt;/A&gt;&lt;/P&gt;&lt;P style="color: #222222; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; margin-bottom: 0.825em; font-size: 14px;"&gt;&lt;A href="https://ynicolett.files.wordpress.com/2015/06/08.jpg" style="color: #1b8be0; font-style: inherit; font-weight: inherit;"&gt;&lt;IMG alt="08" class="wp-image-207 alignnone jive-image size-medium" height="122" src="https://ynicolett.files.wordpress.com/2015/06/08.jpg?w=300" style="color: #222222; font-style: inherit; font-weight: inherit; border-color: #dddddd; padding: 6px; margin-top: 0.4em;" width="300" /&gt;&lt;/A&gt;&lt;/P&gt;&lt;H1 style="color: #111111; font-family: Merriweather, Georgia, Times, serif; font-size: 1.6em; margin: 0 0 0.8125em;"&gt; &lt;/H1&gt;&lt;H1 style="color: #111111; font-family: Merriweather, Georgia, Times, serif; font-size: 1.6em; margin: 0 0 0.8125em;"&gt;&lt;/H1&gt;&lt;H1 style="color: #111111; font-family: Merriweather, Georgia, Times, serif; font-size: 1.6em; margin: 0 0 0.8125em;"&gt;O que fazer?&lt;/H1&gt;&lt;P style="color: #222222; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; margin-bottom: 0.825em; font-size: 14px;"&gt;Bom, se o comportamento do QlikView é esse, então nestes casos é sempre importante termos um passo antes para carregar todos esses arquivos e guardar em uma tabela temporária, para depois fazer o JOIN. Dessa forma:&lt;/P&gt;&lt;P style="color: #222222; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; margin-bottom: 0.825em; font-size: 14px;"&gt;&lt;A href="https://ynicolett.files.wordpress.com/2015/06/09.jpg" style="color: #1b8be0; font-style: inherit; font-weight: inherit;"&gt;&lt;IMG alt="09" class="alignnone jive-image wp-image-208 size-medium" height="249" src="https://ynicolett.files.wordpress.com/2015/06/09.jpg?w=300" style="color: #222222; font-style: inherit; font-weight: inherit; border-color: #dddddd; padding: 6px; margin-top: 0.4em;" width="300" /&gt;&lt;/A&gt;&lt;/P&gt;&lt;H1 style="color: #111111; font-family: Merriweather, Georgia, Times, serif; font-size: 1.6em; margin: 0 0 0.8125em;"&gt; &lt;/H1&gt;&lt;H1 style="color: #111111; font-family: Merriweather, Georgia, Times, serif; font-size: 1.6em; margin: 0 0 0.8125em;"&gt;E o concatenate?&lt;/H1&gt;&lt;P style="color: #222222; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; margin-bottom: 0.825em; font-size: 14px;"&gt;Para concatenate &lt;SPAN style="text-decoration: underline;"&gt;não tem problema&lt;/SPAN&gt;, pois o processo é de forçar a concatenação, independente de quais colunas estejam nas tabelas.&lt;/P&gt;&lt;H1 style="color: #111111; font-family: Merriweather, Georgia, Times, serif; font-size: 1.6em; margin: 0 0 0.8125em;"&gt; &lt;/H1&gt;&lt;H1 style="color: #111111; font-family: Merriweather, Georgia, Times, serif; font-size: 1.6em; margin: 0 0 0.8125em;"&gt;Conclusão&lt;/H1&gt;&lt;P style="color: #222222; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; margin-bottom: 0.825em; font-size: 14px;"&gt;É muito importante conhecermos a fundo os conceitos e comportamentos do QlikView. Neste caso, nossa cabeça pensa que o QlikView vai carregar todos os arquivos (concatenando-os) para depois fazer o JOIN, porém aprendemos que o QlikView não se comporta dessa forma.&lt;/P&gt;&lt;P style="color: #222222; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; margin-bottom: 0.825em; font-size: 14px;"&gt;&lt;A href="https://drive.google.com/file/d/0B2cPTU8EF4R4YkgtR1pqdFdDMVE/view?usp=sharing" style="color: #1b8be0; font-style: inherit; font-weight: inherit;" target="_blank"&gt;Para quem deseja, segue a aplicação de exemplo para download.&lt;/A&gt;&lt;/P&gt;&lt;P style="color: #222222; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; margin-bottom: 0.825em; font-size: 14px;"&gt;&lt;/P&gt;&lt;P style="color: #222222; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; margin-bottom: 0.825em; font-size: 14px;"&gt;Até a próxima semana pessoal!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 28 Jun 2015 21:58:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Brasil/Cuidado-com-a-leitura-de-m%C3%BAltiplos-arquivos-em-uni%C3%A3o-de-tabelas/m-p/1469708#M54165</guid>
      <dc:creator>nicolett_yuri</dc:creator>
      <dc:date>2015-06-28T21:58:00Z</dc:date>
    </item>
    <item>
      <title>Re: Cuidado com a leitura de múltiplos arquivos em união de tabelas (JOIN)</title>
      <link>https://community.qlik.com/t5/Brasil/Cuidado-com-a-leitura-de-m%C3%BAltiplos-arquivos-em-uni%C3%A3o-de-tabelas/m-p/1469709#M54166</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Muito bom ... parabéns!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Jun 2015 20:28:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Brasil/Cuidado-com-a-leitura-de-m%C3%BAltiplos-arquivos-em-uni%C3%A3o-de-tabelas/m-p/1469709#M54166</guid>
      <dc:creator>daniel_vale</dc:creator>
      <dc:date>2015-06-29T20:28:32Z</dc:date>
    </item>
    <item>
      <title>Re: Cuidado com a leitura de múltiplos arquivos em união de tabelas (JOIN)</title>
      <link>https://community.qlik.com/t5/Brasil/Cuidado-com-a-leitura-de-m%C3%BAltiplos-arquivos-em-uni%C3%A3o-de-tabelas/m-p/1469710#M54167</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Obrigado Daniel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Jun 2015 12:03:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Brasil/Cuidado-com-a-leitura-de-m%C3%BAltiplos-arquivos-em-uni%C3%A3o-de-tabelas/m-p/1469710#M54167</guid>
      <dc:creator>nicolett_yuri</dc:creator>
      <dc:date>2015-06-30T12:03:10Z</dc:date>
    </item>
  </channel>
</rss>

