drop table  if exists mmt_staging2.BUDNI_FLD_Spec_H1_Block;
drop table if exists mmt_staging2.BUDNI_FLD_Impl_Test_Int;
drop table if exists mmt_staging2.BUDNI_FLD_Impl_Test_Block;
drop table if exists mmt_staging2.BUDNI_FLD_Cage_Wheel_Block;
drop table if exists mmt_staging2.BUDNI_FLD_Sum_Perf_Test_Int;
drop table if exists mmt_staging2.BUDNI_FLD_Sum_Perf_Test_Block;
drop table if exists mmt_staging2.BUDNI_FLD_Test_Obs_Summary_Block;
drop table if exists mmt_staging2.stg_process_table_BUDNI_FLD;
drop table if exists mmt_staging2.stg_specific_table_BUDNI_FLD;


create table mmt_staging2.BUDNI_FLD_Spec_H1_Block
(
syspk serial,
file_syspk int,
client_id int,
function_id int,
file_format text,
sheet_mnemonic text,
dummy_f text,
make text,
model text,
tractor_HP text,
rated_rpm text,
configuration text,
transmission_type text,
wheel_drive_type text,
FIP_type text,
steering_type text,
Engine_to_PTO_ratio text,
Ballast_Condition text,
Test_Engine_Set_RPM text,
ods_record int default 1,
rank int,
create_time timestamp DEFAULT current_timestamp
);


create table mmt_staging2.BUDNI_FLD_Impl_Test_INT
(
syspk serial,
file_syspk int,
client_id int,
function_id int,
file_format text,
sheet_mnemonic text,
dummy_f text,
column3 text,
column4 text,
column5 text,
column6 text,
column7 text,
column8 text,
column9 text,
ods_record int default 1,
rank int,
create_time timestamp DEFAULT current_timestamp
);

create table mmt_staging2.BUDNI_FLD_Impl_Test_Block
(
syspk serial,
file_syspk int,
client_id int,
function_id int,
file_format text,
sheet_mnemonic text,
dummy_f text,
items text,
Make text,
type text,
No_of_Disc_blades text,
Type_of_Disc_blades text,
Size_of_bottoms_blades_1_mm text,
Size_of_bottoms_blades_2_mm text,
Size_of_bottoms_blades_3_mm text,
Spacing_of_bottoms_flanges_mm text,
Lower_hitch_point_span_mm text,
Mast_height_mm text,
Overall_dimensions_mm text,
Overall_dimensions_mm_length text,
Overall_dimensions_mm_Width text,
Overall_dimensions_mm_Height text,
Gross_mass_kg text,
ods_record int default 1,
rank int,
create_time timestamp DEFAULT current_timestamp
);


create table mmt_staging2.BUDNI_FLD_Cage_Wheel_Block
(
syspk serial,
file_syspk int,
client_id int,
function_id int,
file_format text,
sheet_mnemonic text,
dummy_f text,
Items text,
type text,
Dia_mm text,
Width_mm text,
No_and_types_of_lugs text,
Size_of_angle_section_1_mm text,
Size_of_angle_section_2_mm text,
Size_of_angle_section_3_mm text,
Length_of_lugs_mm text,
Spacing_of_lugs_mm text,
Weight_of_each_cage_wheels_kg text,
ods_record int default 1,
rank int,
create_time timestamp DEFAULT current_timestamp
);

create table mmt_staging2.BUDNI_FLD_Sum_Perf_Test_Int
(
syspk serial,
file_syspk int,
client_id int,
function_id int,
file_format text,
sheet_mnemonic text,
dummy_f text,
make text,
model text,
column3 text,
column4 text,
column5 text,
column6 text,
column7 text,
ods_record int default 1,
rank int,
create_time timestamp DEFAULT current_timestamp
);

create table mmt_staging2.BUDNI_FLD_Sum_Perf_Test_Block
(
syspk serial,
file_syspk int,
client_id int,
function_id int,
file_format text,
sheet_mnemonic text,
dummy_f text,
make text,
model text,
Parameter_operation text,
Type_of_soil text,
Av_soil_moisture_Av_depth_of_standing_water_cm text,
Bulk_density_of_soil_g_cc text,
Cone_index_kgf_sq_cm_Puddling_index text,
Gear_used text,
Av_speed_of_operation_kmph text,
Av_wheel_slip_Av_Travel_reduction text,
Av_depth_of_cut_cm_Av_Depth_of_puddle_cm text,
Av_working_width_cm text,
Area_covered_ha_h text,
Fuel_consumption text,
Fuel_consumption_l_h text,
Fuel_consumption_l_ha text,
Av_draft_of_implement_kN text,
ods_record int default 1,
rank int,
create_time timestamp DEFAULT current_timestamp
);

create table mmt_staging2.BUDNI_FLD_Test_Obs_Summary_Block
(
syspk serial,
file_syspk int,
client_id int,
function_id int,
file_format text,
sheet_mnemonic text,
dummy_f text,
make text,
model text,
column3 text,
column4 text,
column5 text,
column6 text,
column7 text,
column8 text,
column9 text,
ods_record int default 1,
rank int,
create_time timestamp DEFAULT current_timestamp
);


create TABLE mmt_staging2.stg_process_table_BUDNI_FLD (
	generic_syspk int,
file_syspk bigint,
file_name varchar(1024) NULL,
file_date date NULL,
file_format varchar(1024) NULL,
sheet_number int4 NULL,
sheet_name varchar(1024) NULL,
sheet_format text,
sheet_mnemonic varchar(1024) NULL,
row_number int4 NULL,
file_creation_date timestamp NULL,
column1 varchar(1024) NULL,
column2 varchar(1024) NULL,
column3 varchar(1024) NULL,
column4 varchar(1024) NULL,
column5 varchar(1024) NULL,
column6 varchar(1024) NULL,
column7 varchar(1024) NULL,
column8 varchar(1024) NULL,
column9 varchar(1024) NULL,
column10 varchar(1024) NULL,
column11 varchar(1024) NULL,
column12 varchar(1024) NULL,
column13 varchar(1024) NULL,
column14 varchar(1024) NULL,
column15 varchar(1024) NULL,
column16 varchar(1024) NULL,
column17 varchar(1024) NULL,
column18 varchar(1024) NULL,
column19 varchar(1024) NULL,
column20 varchar(1024) NULL,
column21 varchar(1024) NULL,
column22 varchar(1024) NULL,
column23 varchar(1024) NULL,
column24 varchar(1024) NULL,
column25 varchar(1024) NULL,
column26 varchar(1024) NULL,
column27 varchar(1024) NULL,
column28 varchar(1024) NULL,
column29 varchar(1024) NULL,
column30 varchar(1024) NULL,
column31 varchar(1024) NULL,
column32 varchar(1024) NULL,
column33 varchar(1024) NULL,
column34 varchar(1024) NULL,
column35 varchar(1024) NULL,
column36 varchar(1024) NULL,
column37 varchar(1024) NULL,
column38 varchar(1024) NULL,
column39 varchar(1024) NULL,
column40 varchar(1024) NULL,
column41 varchar(1024) NULL,
column42 varchar(1024) NULL,
column43 varchar(1024) NULL,
column44 varchar(1024) NULL,
column45 varchar(1024) NULL,
column46 varchar(1024) NULL,
column47 varchar(1024) NULL,
column48 varchar(1024) NULL,
column49 varchar(1024) NULL,
column50 varchar(1024) NULL,
column51 varchar(1024) NULL,
column52 varchar(1024) NULL,
column53 varchar(1024) NULL,
is_rownumber_fetched int4 NULL,
create_time timestamp DEFAULT current_timestamp,
rank int4 NULL,
rank_tag text null
);


CREATE TABLE mmt_staging2.stg_specific_table_BUDNI_FLD (
	generic_syspk int,
file_syspk bigint,
file_name varchar(1024) NULL,
file_date date NULL,
file_format varchar(1024) NULL,
sheet_number int4 NULL,
sheet_name varchar(1024) NULL,
sheet_format text,
sheet_mnemonic varchar(1024) NULL,
row_number int4 NULL,
file_creation_date timestamp NULL,
column1 varchar(1024) NULL,
column2 varchar(1024) NULL,
column3 varchar(1024) NULL,
column4 varchar(1024) NULL,
column5 varchar(1024) NULL,
column6 varchar(1024) NULL,
column7 varchar(1024) NULL,
column8 varchar(1024) NULL,
column9 varchar(1024) NULL,
column10 varchar(1024) NULL,
column11 varchar(1024) NULL,
column12 varchar(1024) NULL,
column13 varchar(1024) NULL,
column14 varchar(1024) NULL,
column15 varchar(1024) NULL,
column16 varchar(1024) NULL,
column17 varchar(1024) NULL,
column18 varchar(1024) NULL,
column19 varchar(1024) NULL,
column20 varchar(1024) NULL,
column21 varchar(1024) NULL,
column22 varchar(1024) NULL,
column23 varchar(1024) NULL,
column24 varchar(1024) NULL,
column25 varchar(1024) NULL,
column26 varchar(1024) NULL,
column27 varchar(1024) NULL,
column28 varchar(1024) NULL,
column29 varchar(1024) NULL,
column30 varchar(1024) NULL,
column31 varchar(1024) NULL,
column32 varchar(1024) NULL,
column33 varchar(1024) NULL,
column34 varchar(1024) NULL,
column35 varchar(1024) NULL,
column36 varchar(1024) NULL,
column37 varchar(1024) NULL,
column38 varchar(1024) NULL,
column39 varchar(1024) NULL,
column40 varchar(1024) NULL,
column41 varchar(1024) NULL,
column42 varchar(1024) NULL,
column43 varchar(1024) NULL,
column44 varchar(1024) NULL,
column45 varchar(1024) NULL,
column46 varchar(1024) NULL,
column47 varchar(1024) NULL,
column48 varchar(1024) NULL,
column49 varchar(1024) NULL,
column50 varchar(1024) NULL,
column51 varchar(1024) NULL,
column52 varchar(1024) NULL,
column53 varchar(1024) NULL,
is_rownumber_fetched int4 null,
create_time timestamp DEFAULT current_timestamp
);


