Skip to content

Commit

Permalink
chore: change ficha_financeira_contabil
Browse files Browse the repository at this point in the history
  • Loading branch information
d116626 committed Jan 12, 2024
1 parent ca0dd16 commit 2f70a56
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions queries/models/recursos_humanos_ergon/ficha_financeira_contabil.sql
Original file line number Diff line number Diff line change
Expand Up @@ -10,24 +10,24 @@
}}

SELECT
SAFE_CAST(DATE(mes_ano_folha) AS DATE) AS data_folha,
SAFE_CAST(REGEXP_REPLACE(TRIM(numfunc), r'.0$', '') AS STRING) AS id_funcionario,
SAFE_CAST(REGEXP_REPLACE(TRIM(numvinc), r'.0$', '') AS STRING) AS id_vinculo,
SAFE_CAST(REGEXP_REPLACE(TRIM(numpens), r'.0$', '') AS INT64) AS numero_pensionista,
SAFE_CAST(TRIM(num_folha) AS INT64) AS numero_folha,
SAFE_CAST(REGEXP_REPLACE(TRIM(setor), r'.0$', '') AS STRING) AS id_setor,
SAFE_CAST(DATE(mes_ano_folha) AS DATE) AS mes_ano_folha,
SAFE_CAST(REGEXP_REPLACE(TRIM(numfunc), r'.0$', '') AS STRING) AS numfunc,
SAFE_CAST(REGEXP_REPLACE(TRIM(numvinc), r'.0$', '') AS STRING) AS numvinc,
SAFE_CAST(REGEXP_REPLACE(TRIM(numpens), r'.0$', '') AS INT64) AS numpens,
SAFE_CAST(TRIM(num_folha) AS INT64) AS num_folha,
SAFE_CAST(REGEXP_REPLACE(TRIM(setor), r'.0$', '') AS STRING) AS setor,
SAFE_CAST(TRIM(secretaria) AS STRING) AS secretaria,
SAFE_CAST(TRIM(tipo_func) AS STRING) AS tipo_funcionario,
SAFE_CAST(TRIM(detalha) AS STRING) AS detalhamento,
SAFE_CAST(TRIM(tipo_func) AS STRING) AS tipo_func,
SAFE_CAST(TRIM(detalha) AS STRING) AS detalha,
SAFE_CAST(TRIM(rubrica) AS STRING) AS rubrica,
SAFE_CAST(TRIM(tipo_rubrica) AS STRING) AS tipo_rubrica,
SAFE_CAST(TRIM(mes_ano_direito) AS STRING) AS competencia_direito,
SAFE_CAST(TRIM(desc_vant) AS STRING) AS descricao_vantagem,
SAFE_CAST(TRIM(mes_ano_direito) AS STRING) AS mes_ano_direito,
SAFE_CAST(TRIM(desc_vant) AS STRING) AS desc_vant,
SAFE_CAST(REGEXP_REPLACE(valor, r',', '.') AS FLOAT64) AS valor,
SAFE_CAST(TRIM(complemento) AS STRING) AS complemento,
SAFE_CAST(TRIM(tipo_classif) AS STRING) AS tipo_classificacao,
SAFE_CAST(TRIM(tipo_classif) AS STRING) AS tipo_classif,
SAFE_CAST(TRIM(classificacao) AS STRING) AS classificacao,
SAFE_CAST(REGEXP_REPLACE(TRIM(emp_codigo), r'.0$', '') AS STRING) AS id_empresa,
SAFE_CAST(REGEXP_REPLACE(TRIM(emp_codigo), r'.0$', '') AS STRING) AS emp_codigo,
SAFE_CAST(data_particao AS DATE) data_particao,
FROM rj-smfp.recursos_humanos_ergon_staging.ficha_financeira_contabil AS t
WHERE
Expand Down

0 comments on commit 2f70a56

Please sign in to comment.