0% found this document useful (0 votes)
15 views2 pages

02 Inc MX BCT Se Idc DTL TNDR Promo Gcs To Raw

The document describes an extraction of data from the IDC_DETAIL_TENDER_PROMO table in the MSSQL_BCT_WE_MX database for Walmart de México. It provides details on the table, owners, source, load type and queries to create an external raw table in Hive for the extracted incremental data.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views2 pages

02 Inc MX BCT Se Idc DTL TNDR Promo Gcs To Raw

The document describes an extraction of data from the IDC_DETAIL_TENDER_PROMO table in the MSSQL_BCT_WE_MX database for Walmart de México. It provides details on the table, owners, source, load type and queries to create an external raw table in Hive for the extracted incremental data.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 2

#Walmart de México

# Autor : Krissel Mejia <Bluetab>


# UserID : vn52l97
# Creación : 14-Diciembre-2023
# ver 1.0 : 14-Diciembre-2023
#------------------------------------------------------------#
# Propósito : Extración delta de 30 días de la tabla de IDC_DETAIL_TENDER_PROMO de
BCT para un intervalo especifico.
# Proyecto: Datamesh
#------------------------------------------------------------#
#Descripción de la tabla: EXTRACTION (Ingesta incremental tabla
IDC_DETAIL_TENDER_PROMO)
#Product Owner: Nayelli Gutiérrez Arista
#Fuente: BCT
#Manejador de BD: MSSQL
#Nombre de BD: MSSQL_BCT_WE_MX
#Nombre tabla origen: IDC_DETAIL_TENDER_PROMO
#Periodo de Carga: Diario
#Tipo Carga: incremental
#Busness Owner: Víctor Olguín <[email protected]>
#Data Steward: Adrián Guerrero <[email protected]>
#Area Negocio: Finanzas
#Vertical: wmt-mx-dl-core
#Lider Desarrollo: Cesar Barrera
#Proyecto: Sales Domain
---
queries: |
SET hive.execution.engine=tez;
SET hive.tez.container.size=8192;
SET hive.tez.java.opts=-Xmx6553m;
SET hive.exec.dynamic.partition=true;
SET hive.exec.dynamic.partition.mode=nonstrict;
SET hive.vectorized.execution.enabled=false;
SET hive.vectorized.execution.reduce.enabled=false;
SET hive.exec.compress.intermediate=false;
SET hive.exec.reducers.bytes.per.reducer=32000000;

DROP TABLE IF EXISTS raw_$target_schema.


$division_code_$process_type_$target_table_raw;

CREATE EXTERNAL TABLE IF NOT EXISTS raw_$target_schema.


$division_code_$process_type_$target_table_raw
(
DD_FECHA DATE
,KN_TRANSACTION_ID VARCHAR(21)
,DN_TENDER_ORDER SMALLINT
,DN_SECUENCE SMALLINT
,KN_STORE INT
,TM_HORA VARCHAR(10)
,DN_DISCOUNT_ORDER SMALLINT
,KN_TENDER_ID SMALLINT
,KN_DISCOUNT_TYPE TINYINT
,KN_DISCOUNT_ID INT
,DN_TOTAL_DISC_PCT DECIMAL(18,2)
,DN_TOTAL_AMT DECIMAL(18,2)
,DN_TOTAL_WO_DISC_AMT DECIMAL(18,2)
,DN_TOTAL_DISC_AMT DECIMAL(18,2)
,DT_TIMESTAMP TIMESTAMP
)
ROW FORMAT DELIMITED
FIELDS TERMINATED BY '\u0001'
LINES TERMINATED BY '\n'
STORED AS TEXTFILE
LOCATION
'$raw_bucket/landing/$load_type/$target_schema/$target_table/$division_code/
$end_date/';

You might also like