Skip to content

Instantly share code, notes, and snippets.

View rmorenobello's full-sized avatar

Raúl Moreno Bello rmorenobello

View GitHub Profile
@rmorenobello
rmorenobello / getIdType(numero_identificacion) (DNI, NIE, CIF) - for Rhino 1.7R3 (KETTLE 9.x).js
Last active October 7, 2021 09:59
JS snippets for Rhino 1.7R3 (KETTLE / Pentaho Data Integration 9.x)
// Objetivo:
// Prueba los formatos válidos de DNI, NIE y CIF y devuelve a cuál corresponde (o false si no hay match)
// Requisito:
// IMPORTANTE que los campos "xxx_dentificacion" lleguen en uppercase (ahorramos trabajo a las regEx)
// Codigos de retorno
var MATCH_ERROR = 'MATCH_ERROR';
var ERR_PARAM_NULL = 'ERR_PARAM_NULL';
var r_result_code = 'NONE';
Para crear rangos calculados en memoria hace falta poner cursor sobre la función y Ctrl+Shift+Enter.
Aparecerá entre { }, pero no sirve simplemente añadirlos.
-- Devuelve el MAX de las longitudes (calculadas en memoria) de ese rango
=MAX(LARGO(B5:B62218))
P.ej. 27
-- Devuelve el valor de la celda que contiene ese máximo:
=INDICE(B5:B62218;COINCIDIR(B1;LARGO(B5:B62218);0);1) donde B5 es la fórmula anterior
p.ej. Diumenge, 20 de xxx de 2021
@rmorenobello
rmorenobello / Oracle DB - Indexes.sql
Created February 11, 2020 16:05
Oracle DB - Indexes
-- Buenísimo, sobre optimizacion indexes globales con particionamiento vs indices locales
https://richardfoote.wordpress.com/category/local-indexes/
@rmorenobello
rmorenobello / NOTAS generales DWH design
Last active June 11, 2021 11:18
Oracle DB 12c - DWH Optimization
Cuestiones a estudiar
=====================
Cuestiones a plantearse para cada layer (Staging -> Foundation/Integration -> Dimension/Performance).
Generales
- recordar compte amb PARALLEL APPEND; desaprofita molt espai.
- recordar totes STG, _DELTA amb NOLOGGING (però només afecta INSERT /*+APPEND*/)
- _DELTA particionades per DATA_CARREGA => truncate en comptes de DELETE
- Para full scan va bien:
@rmorenobello
rmorenobello / Microsoft Word - How to tricks, resources
Last active January 2, 2020 12:38
Microsoft Word - How to tricks, resources
- Microsoft Word para documentos legales robustos (oficial):
http://www.addbalance.com/usersguide/
-- Otros resources para Words complejos:
http://www.addbalance.com/usersguide/complex_documents.htm
https://docs.oracle.com/en/middleware/fusion-middleware/index.html
Oracle Cloud Business Intelligence: https://docs.oracle.com/en/cloud/paas/bi-cloud/bilug/index.html
https://gerardnico.com/dat/obiee/start
http://shahin-obiee.blogspot.com/
@rmorenobello
rmorenobello / Oracle DB - Change Col Type DDL + CTAS
Last active August 4, 2020 09:03
Oracle DB - Change column type
I guess, you can use parallel operations:
Parallel DML (és possible que no es noti)
------------
Let your table support parallel operations:
ALTER TABLE EFF parallel;
Then you perform all your steps as you describe in the question.
@rmorenobello
rmorenobello / Jython-log_to_file.jy
Last active November 29, 2024 08:21
ODI Best Practices, tricks & resources
def log_to_file(file, line):
file.write(line + '\n')
file = open("C:\Temp\ODI_FILE_LOG_TEST.log", 'w')
# Recordar el file.close() al final
# strPDATADEF = str(PDATADEF);
# strASS_DSA = str(ASS_DSA);
@rmorenobello
rmorenobello / ODI - Repo - Warnings (SLT).sql
Last active July 28, 2025 11:11
Oracle Data Integrator (ODI) - useful queries, management, admin
-- Errors en el sentit de Warnings per files desviades a taules d'error E$.
-- Connexió: BISLT_PRO_WORKREP
select
--sc_par_par_folder.SCEN_FOLDER_NAME
sc_parent_folder.SCEN_FOLDER_NAME
, SNP_SCEN_REPORT.CONTEXT_CODE
, SNP_SCEN_REPORT.SESS_BEG
, ROUND(SNP_SCEN_REPORT.SESS_DUR/60) as DUR_MINS
, SNP_SCEN.SCEN_NAME
, SNP_SCEN.SCEN_VERSION
-- Al crear columna añadir COLLATE Modern_Spanish_CI_AS justo tras el tipo varchar:
ColumnaTexto varchar(XXX) COLLATE Modern_Spanish_CI_AS