After consultation the fields to filter do not appear

After the query in sql:

SELECT

licenciamento.vw_processo.numero AS numerop,

licenciamento.vw_processo.dt_cadastro AS dt_cadastrop,

licenciamento.vw_processo.dt_abertura AS dt_aberturap,

licenciamento.vw_processo.dt_atualizacao AS dt_atualizacaop,

licenciamento.vw_processo.situacao AS situacaop,

licenciamento.vw_processo.nome_familia AS nome_familiap,

licenciamento.vw_processo.nome_grupo AS nome_grupop,

licenciamento.vw_processo.nome_tipo AS nome_tipop,

licenciamento.vw_processo.nome_atividade AS nome_atividadep,

licenciamento.vw_processo.razao_social_cliente AS razao_social_clientep,

licenciamento.vw_processo.cpf_cnpj_cliente AS cpf_cnpj_clientep,

licenciamento.vw_processo.numero_sei AS numero_seip,

licenciamento.vw_processo.assinou_tac AS assinou_tacp,

licenciamento.vw_processo.data_confirmacao_assinatura_tac AS data_confirmacao_assinatura_tacp,

licenciamento.vw_processo.id_func_confirmou_tac AS id_func_confirmou_tacp,

licenciamento.vw_licenca.situacao AS situacaol,

licenciamento.vw_licenca.dt_validade_inicio AS dt_validade_iniciol,

licenciamento.vw_licenca.dt_validade AS dt_validadel,

licenciamento.vw_licenca.dt_validade_fim AS dt_validade_fiml,

licenciamento.vw_licenca.dt_alteracao AS dt_alteracaol,

licenciamento.vw_licenca.dt_emissao AS dt_emissaol,

licenciamento.vw_licenca.dt_cadastro AS dt_cadastrol,

licenciamento.vw_licenca.tipo_documento AS tipo_documentol,

licenciamento.vw_licenca.nome_func_alteracao AS nome_func_alteracaol,

licenciamento.vw_licenca.nome_depart_resp AS nome_depart_respl,

licenciamento.vw_licenca.doc_data AS doc_datal,

licenciamento.vw_licenca.nome_func AS nome_funcl,

licenciamento.vw_licenca.nome_func_tramite AS nome_func_tramitel,

licenciamento.vw_certificado.situacao AS "situacao c",

licenciamento.vw_certificado.tipo_documento AS tipo_documentoc,

licenciamento.vw_certificado.dt_emissao AS dt_emissaoc,

licenciamento.vw_certificado.dt_cadastro AS dt_cadastroc,

licenciamento.vw_certificado.dt_validade AS dt_validadec,

licenciamento.vw_certificado.nome_func AS nome_funcc,

licenciamento.vw_certificado.nome_func_resp_c,

licenciamento.vw_documento.numero AS numerod,

licenciamento.vw_documento.dt_cadastro AS dt_cadastrod,

licenciamento.vw_documento.situacao AS situacaod,

licenciamento.vw_documento.nome_tipo AS nome_tipod,

licenciamento.vw_documento.nome_func AS nome_funcd,

licenciamento.vw_documento.tipo AS tipod

FROM

licenciamento.vw_processo

LEFT OUTER JOIN licenciamento.vw_documento ON (licenciamento.vw_processo.id = licenciamento.vw_documento.id_processo and licenciamento.vw_documento.tipo = 'u' ::bpchar and licenciamento.vw_documento.situacao = 'f' )

LEFT OUTER JOIN licenciamento.vw_licenca ON (licenciamento.vw_processo.id = licenciamento.vw_licenca.id_processo and licenciamento.vw_licenca.situacao = 'f')

LEFT OUTER JOIN licenciamento.vw_certificado ON (licenciamento.vw_processo.id = licenciamento.vw_certificado.id_processo and licenciamento.vw_certificado.situacao = 'f')

where
licenciamento.vw_documento.dt_cadastro NOTNULL
or licenciamento.vw_licenca.dt_emissao NOTNULL
or licenciamento.vw_certificado.dt_emissao NOTNULL;

After consultation the fields to filter do not appear. What am I doing wrong, please?

Hi @fmpovoa
I don’t see any variables in your query - learn more about filters here:
https://www.metabase.com/learn/building-analytics/sql-templates/field-filters.html

Good morning, I put but the filter does not appear

where 1=1
[[or licenciamento.vw_documento.dt_cadastro = {{licenciamento.vw_documento.dt_cadastro}}]]
[[or licenciamento.vw_licenca.dt_emissao = {{licenciamento.vw_licenca.dt_emissao}}]]
[[or licenciamento.vw_certificado.dt_emissao = {{licenciamento.vw_certificado.dt_emissao}}]];

@fmpovoa I cannot see which type of filter you’re using. Show a screenshot of the SQL editor with the Variables sidebar open. If you’re using Field Filter, then make sure that Field Type in the Data Model is one of these: https://www.metabase.com/docs/latest/users-guide/13-sql-parameters.html#creating-sql-question-filters-using-field-filter-variables

@fmpovoa Post “Diagnostic Info” from Admin > Troubleshooting, and which database you’re querying.

{
“browser-info”: {
“language”: “en-US”,
“platform”: “Win32”,
“userAgent”: “Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.190 Safari/537.36”,
“vendor”: “Google Inc.”
},
“system-info”: {
“file.encoding”: “Cp1252”,
“java.runtime.name”: “Java™ SE Runtime Environment”,
“java.runtime.version”: “1.8.0_281-b09”,
“java.vendor”: “Oracle Corporation”,
“java.vendor.url”: “http://java.oracle.com/”,
“java.version”: “1.8.0_281”,
“java.vm.name”: “Java HotSpot™ 64-Bit Server VM”,
“java.vm.version”: “25.281-b09”,
“os.name”: “Windows 7”,
“os.version”: “6.1”,
“user.language”: “pt”,
“user.timezone”: “GMT-03:00”
},
“metabase-info”: {
“databases”: [
“postgres”
],
“hosting-env”: “unknown”,
“application-database”: “h2”,
“application-database-details”: {
“database”: {
“name”: “H2”,
“version”: “1.4.197 (2018-03-18)”
},
“jdbc-driver”: {
“name”: “H2 JDBC Driver”,
“version”: “1.4.197 (2018-03-18)”
}
},
“run-mode”: “prod”,
“version”: {
“tag”: “v0.38.0.1”,
“date”: “2021-02-19”,
“branch”: “release-x.38.x”,
“hash”: “0635914”
},
“settings”: {
“report-timezone”: “America/Sao_Paulo”
}
}
}

@fmpovoa You cannot use dots (.) in variables.
Example, change {{licenciamento.vw_documento.dt_cadastro}} to {{vw_documento}}
https://github.com/metabase/metabase/issues/15029 - upvote by clicking :+1: on the first post

:+1: Thanks