This commit is contained in:
dheepa
2021-08-09 11:14:23 +00:00
parent a0d3257be0
commit f3cf5e1d2d
89 changed files with 4769 additions and 1508 deletions

View File

@@ -1,3 +1,6 @@
SET search_path To staging2;
drop extension tablefunc;
create extension tablefunc;
create extension tablefunc;

View File

@@ -1,3 +1,4 @@
SET search_path To fw_core;
CREATE DOMAIN fw_flag_bool AS BOOL;
@@ -312,3 +313,5 @@ CREATE TABLE staging1.staging_generic_table (
column52 varchar(1024) NULL,
column53 varchar(1024) NULL
);

View File

@@ -97,7 +97,7 @@ CREATE TABLE trx.trx (
temp_exhaust_c int4 NULL,
temp_fuel_temp_c int4 NULL,
pct_of_backup_torque int4 NULL,
equ_cblock_row_number_torque_nm numeric NULL,
equ_crank_torque_nm numeric NULL,
max_equ_crankshaft_torque_nm numeric NULL,
load_pct int4 NULL,
load_kg numeric NULL,

View File

@@ -108,6 +108,7 @@ CREATE TABLE fw_ods.fw_ods (
name_of_implement fw_text NULL,
type_of_implement fw_text NULL,
implement_weight_kg fw_num_dimid NULL,
platform fw_text NULL,
tyre_size fw_text NULL,
tyre_ply_rating fw_num_dimid NULL,
tyre_pressure_kg_per_cm2 fw_num_metric NULL,
@@ -204,8 +205,9 @@ CREATE TABLE fw_ods.fw_ods_detailed (
syspk serial NOT NULL,
client_id fw_num_dimid NOT NULL,
function_id fw_num_dimid NOT NULL,
test_file_mnemonic fw_num_dimid NULL,
test_sheet_mnemonic fw_num_dimid NULL,
test_file_mnemonic fw_text NULL NULL,
test_sheet_mnemonic fw_text NULL NULL,
test_name fw_text NULL,
test_file_id fw_num_dimid NULL,
test_file_name fw_text NULL,
test_instance_id fw_num_dimid NULL,
@@ -214,7 +216,8 @@ CREATE TABLE fw_ods.fw_ods_detailed (
tractor_engine_hp fw_num_dimid NULL,
wheel_drive_type fw_text NULL,
"configuration" fw_text NULL,
test_insance_tractor_id fw_num_dimid NULL,
platform fw_text NULL,
test_instance_tractor_id fw_num_dimid NULL,
season fw_text NULL,
test_date fw_date NULL,
test_date_year fw_num_dimid NULL,
@@ -265,6 +268,7 @@ create table fw_ods.fw_ods_tractor_specifications (
DROP TABLE if exists fw_ods.fw_ods_comments;
CREATE TABLE fw_ods.fw_ods_comments (
syspk bigserial NOT NULL,
client_id fw_ods."fw_num_dimid" NULL,
@@ -295,10 +299,10 @@ CREATE TABLE fw_ods.fw_ods_comments (
tractor_engine_hp int4 NULL,
name_of_implement fw_ods."fw_text" NULL,
type_of_implement fw_ods."fw_text" NULL,
season fw_ods."fw_text" NULL
season fw_ods."fw_text" NULL,
"configuration" fw_ods."fw_text" NULL
);
-- fw_ods.fw_ods_drawbar_performance definition
-- Drop table
@@ -320,6 +324,7 @@ CREATE TABLE fw_ods.fw_ods_drawbar_performance (
tractor_engine_hp fw_ods."fw_num_dimid" NULL,
wheel_drive_type fw_ods."fw_text" NULL,
"configuration" fw_ods."fw_text" NULL,
platform fw_text NULL,
test_instance_tractor_id fw_ods."fw_num_dimid" NULL,
season fw_ods."fw_text" NULL,
test_date fw_ods."fw_date" NULL,
@@ -389,38 +394,129 @@ CREATE TABLE fw_ods.fw_ods_drawbar_performance (
-- Drop table
DROP TABLE if exist fw_ods.fw_ods_observations;
drop table if exists fw_ods.fw_ods_observations;
CREATE TABLE fw_ods.fw_ods_observations (
syspk bigserial NOT NULL,
client_id fw_ods."fw_num_dimid" NULL,
function_id fw_ods."fw_num_dimid" NULL,
test_file_mnemonic fw_ods."fw_text" NULL,
test_sheet_mnemonic fw_ods."fw_text" NULL,
test_file_id fw_ods."fw_num_dimid" NULL,
test_file_name fw_ods."fw_text" NULL,
test_iteration_number fw_ods."fw_num_dimid" NULL,
platform fw_ods."fw_text" NULL,
benchmark_yn fw_ods."fw_text" NULL,
tractor_make fw_ods."fw_text" NULL,
tractor_model fw_ods."fw_text" NULL,
tractor_engine_hp fw_ods."fw_num_dimid" NULL,
wheel_drive_type fw_ods."fw_text" NULL,
name_of_implement fw_ods."fw_text" NULL,
type_of_implement fw_ods."fw_text" NULL,
season fw_ods."fw_text" NULL,
parameters fw_ods."fw_text" NULL,
"sequence" fw_ods."fw_num_dimid" NULL,
tractor_model1 fw_ods."fw_text" NULL,
tractor_model2 fw_ods."fw_text" NULL,
tractor_model3 fw_ods."fw_text" NULL,
tractor_model4 fw_ods."fw_text" NULL,
tractor_model5 fw_ods."fw_text" NULL,
display_yn fw_ods."fw_text" NULL,
created_by fw_ods."fw_text" NULL,
updated_by fw_ods."fw_text" NULL,
create_timestamp fw_ods."fw_timestamp" NULL,
update_timestamp fw_ods."fw_timestamp" NULL,
old_test_file_name fw_ods."fw_text" NULL
syspk bigserial NOT NULL,
client_id fw_ods.fw_num_dimid NULL,
function_id fw_ods.fw_num_dimid NULL,
test_file_mnemonic fw_ods.fw_text NULL,
test_sheet_mnemonic fw_ods.fw_text NULL,
test_file_id fw_ods.fw_num_dimid NULL,
test_file_name fw_ods.fw_text NULL,
test_iteration_number fw_ods.fw_num_dimid NULL,
platform fw_ods.fw_text NULL,
benchmark_yn fw_ods.fw_text NULL,
tractor_make fw_ods.fw_text NULL,
tractor_model fw_ods.fw_text NULL,
tractor_engine_hp fw_ods.fw_num_dimid NULL,
wheel_drive_type fw_ods.fw_text NULL,
name_of_implement fw_ods.fw_text NULL,
type_of_implement fw_ods.fw_text NULL,
season fw_ods.fw_text NULL,
"configuration" fw_ods.fw_text NULL,
engine_smoke_on_load fw_ods.fw_text NULL,
engine_acceleration_smoke fw_ods.fw_text NULL,
range_gear_shifting fw_ods.fw_text NULL,
speed_gear_shifting fw_ods.fw_text NULL,
draft_response fw_ods.fw_text NULL,
tractor_steer_ability fw_ods.fw_text NULL,
tractor_braking_performance fw_ods.fw_text NULL,
front_visibility fw_ods.fw_text NULL,
implement_accessibility fw_ods.fw_text NULL,
front_wheel_dragging_at_turning fw_ods.fw_text NULL,
front_end_lifting_during_operation fw_ods.fw_text NULL,
rpm_recovery_time fw_ods.fw_text NULL,
engine_vibration fw_ods.fw_text NULL,
engine_sound fw_ods.fw_text NULL,
implement_lifing_lowering_response fw_ods.fw_text NULL,
pulverization_quality fw_ods.fw_text NULL,
pulverization_index fw_ods.fw_text NULL,
created_by fw_ods.fw_text NULL DEFAULT CURRENT_USER,
create_timestamp fw_ods.fw_timestamp NULL DEFAULT now(),
updated_by fw_ods.fw_text NULL ,
update_timestamp fw_ods.fw_timestamp null
);
-- fw_ods.tractor_info definition
DROP table if exists fw_ods.tractor_info;
CREATE TABLE fw_ods.tractor_info (
"#" int4 NULL,
test_file_mnemonic varchar(7) NULL,
tractor_make varchar(11) NULL,
tractor_model varchar(56) NULL,
platform varchar(14) NULL,
tractor_engine_hp int4 NULL,
wheel_drive_type varchar(6) NULL,
"configuration" varchar(12) NULL
);
-- fw_ods.fw_ods_misnomer definition
DROP table if exists fw_ods.fw_ods_misnomer;
CREATE TABLE fw_ods.fw_ods_misnomer (
syspk int4 NOT NULL,
client_id int4 NOT NULL,
function_id int4 NOT NULL,
column_name text NULL,
source_value text NULL,
target_value text NULL,
created_by text NULL,
create_timestamp timestamp NULL,
updated_by text NULL,
update_timestamp timestamp NULL,
table_name text NULL
);
-- FTWET / FTDRY: field_perfm_
alter table fw_ods.fw_ods add column implement_size fw_ods.fw_text NULL;
alter table fw_ods.fw_ods add column hitch_category fw_ods.fw_text NULL;
alter table fw_ods.fw_ods add column type_of_cage_wheel fw_ods.fw_text NULL;
alter table fw_ods.fw_ods add column cage_wheel_width_mm fw_ods.fw_num_dimid NULL;
alter table fw_ods.fw_ods add column cage_wheel_weight fw_ods.fw_num_dimid NULL;
alter table fw_ods.fw_ods add column cage_wheel_inner_and_outer_ring_dia_mm fw_ods.fw_num_dimid NULL;
alter table fw_ods.fw_ods add column cage_wheel_center_ring_dia_mm fw_ods.fw_num_dimid NULL;
alter table fw_ods.fw_ods add column dist_between_rhs_and_lhs_cage_wheel_inner_ring_mm fw_ods.fw_num_dimid NULL;
alter table fw_ods.fw_ods add column no_of_angles_on_cage_wheel fw_ods.fw_num_dimid NULL;
alter table fw_ods.fw_ods add column soil_moisture_content_pct fw_ods.fw_text NULL;
alter table fw_ods.fw_ods add column soil_bulk_density_g_per_cc fw_ods.fw_num_metric NULL;
alter table fw_ods.fw_ods add column soil_cone_index fw_ods.fw_num_metric NULL;
alter table fw_ods.fw_ods add column field_condition fw_ods.fw_text NULL;
-- FTHLG
alter table fw_ods.fw_ods add column tire_size_and_inflation_pressure_psi fw_ods.fw_text NULL;
alter table fw_ods.fw_ods add column no_of_axle fw_ods.fw_num_dimid NULL;
alter table fw_ods.fw_ods add column no_of_wheels fw_ods.fw_num_dimid NULL;
alter table fw_ods.fw_ods add column trailer_gross_weight_kg fw_ods.fw_num_dimid NULL;
alter table fw_ods.fw_ods add column tractor_rwc_to_hitch_point_center_dist_mm fw_ods.fw_num_dimid NULL;
alter table fw_ods.fw_ods add column trailer_hitch_height_above_ground_level_mm fw_ods.fw_num_dimid NULL;
alter table fw_ods.fw_ods add column gradient_slope_1_degree fw_ods.fw_num_dimid NULL;
alter table fw_ods.fw_ods add column gradient_slope_2_degree fw_ods.fw_num_dimid NULL;
-- Percentage
alter table fw_ods.fw_ods add column fuel_consumption_var_lit_per_hr fw_ods.fw_num_metric NULL;
alter table fw_ods.fw_ods add column mileage_var_km_per_ltr fw_ods.fw_num_metric NULL;
alter table fw_ods.fw_ods add column area_covered_var_acr_per_hr fw_ods.fw_num_metric NULL;
alter table fw_ods.fw_ods add column fuel_consumption_var_lit_per_acr fw_ods.fw_num_metric NULL;
alter table fw_ods.fw_ods add column fuel_consumption_var_pct_lit_per_hr fw_ods.fw_num_metric NULL;
alter table fw_ods.fw_ods add column mileage_var_pct_km_per_ltr fw_ods.fw_num_metric NULL;
alter table fw_ods.fw_ods add column area_covered_var_pct_acr_per_hr fw_ods.fw_num_metric NULL;
alter table fw_ods.fw_ods add column fuel_consumption_var_pct_lit_per_acr fw_ods.fw_num_metric NULL;

View File

@@ -10,6 +10,7 @@ Version History:
v0.7 - ADDED unique constraint comments
*************************************************************************************/
SET search_path To transactional;
drop table if exists test_master;
@@ -82,7 +83,7 @@ CREATE TABLE test_instance (
Test_Start_Date date NULL,
Test_End_Date date NULL,
Type_of_Soil TEXT,
soil_Moisture_Content_pct NUMERIC NULL,
soil_Moisture_Content_pct Text NULL,
Soil_Cone_Index NUMERIC NULL,
soil_Bulk_Density_g_per_cc NUMERIC NULL,
Field_Condition TEXT,
@@ -156,7 +157,7 @@ CREATE TABLE test_instance_tractor_info (
Mahindra_Model_YN TEXT NULL,
Test_Tractor_YN TEXT NULL,
FIP_Type TEXT,
Hour_Meter_Reading INT NULL,
Hour_Meter_Reading numeric NULL,
Steering_Type TEXT,
Transmission_Type TEXT,
Transmission_Disc_Diam TEXT,
@@ -743,7 +744,7 @@ CREATE TABLE field_perf_summary_implement_info (
Dist_between_RHS_and_LHS_cage_wheel_Inner_Ring_mm INT NULL,
No_of_angles_on_cage_wheel INT NULL,
Soil_Type TEXT,
soil_Moisture_Content_pct NUMERIC NULL,
soil_Moisture_Content_pct text NULL,
soil_Bulk_Density_g_per_cc NUMERIC NULL,
Soil_Cone_Index NUMERIC NULL,
Field_Condition TEXT,
@@ -983,7 +984,7 @@ DROP TABLE if exists Drawbar_Perf_observations;
Brake_Torque_Kg_m NUMERIC NULL,
power_kw NUMERIC NULL,
power_hp NUMERIC NULL,
Eq_Cblock_row_number_Torque_Nm NUMERIC NULL,
Eq_crank_torque_nm NUMERIC NULL,
Fuel_Consumption_Kg_per_hr NUMERIC NULL,
Fuel_Consumption_gm_per_hp_hr NUMERIC NULL,
Fuel_Consumption_kg_per_kWh NUMERIC NULL,
@@ -1340,7 +1341,7 @@ create table Budni_Hydraulic_Lifting_Capacity_test_Results (
Height_of_lower_hitch_pt_above_ground_in_down_position_mm INT NULL,
Vertical_move_ment_with_lifting_forces_mm INT NULL,
Max_force_exerted_through_full_range_kN NUMERIC NULL,
Corresponding_pressure_MPa INT NULL,
Corresponding_pressure_MPa float NULL,
Moment_about_rear_axle_kN_m NUMERIC NULL,
Max_tilt_angle_of_mast_from_vertical_degrees NUMERIC NULL,
Created_By TEXT NULL DEFAULT current_user,
@@ -1440,7 +1441,7 @@ create table Budni_Noise_Atmospheric_conditions(
Tractor_Model TEXT NULL,
Tractor_Make TEXT NULL,
Noise_position TEXT NULL, -- UKA4
Background_noise_level_dBA INT NULL,
Background_noise_level_dBA float NULL,
Temperature_C INT NULL,
Pressure_kPa NUMERIC NULL,
Relative_humIdity_Pct INT NULL,
@@ -1573,7 +1574,7 @@ create table Budni_Haulage_Perf_Results (
Tractor_Model TEXT NULL,
Tractor_Make TEXT NULL,
Trailer_type TEXT NULL, -- UKA4
Gross_mass_of_trailer_tonne INT NULL,
Gross_mass_of_trailer_tonne float NULL,
Height_of_trailer_hitch_above_ground_level_mm INT NULL,
Gear_used_negotiating_slopes_up_to_8Pct TEXT NULL,
Avg_travel_speed_kmph TEXT NULL,

View File

@@ -2,8 +2,8 @@ drop table if exists staging2.stg_specific_table_BUDNI_PTO;
drop table if exists staging2.stg_process_table_BUDNI_PTO;
drop table if exists staging2.BUDNI_PTO_Spec_H1_Block;
drop table if exists staging2.BUDNI_PTO_Perf_Report_block;
drop table if exists staging2.BUDNI_PTO_MMTKeyword1_Block;
drop table if exists staging2.BUDNI_PTO_MMTKeyword2_Block;
drop table if exists staging2.BUDNI_PTO_Parameter1_Block;
drop table if exists staging2.BUDNI_PTO_Parameter2_Block;
drop table if exists staging2.BUDNI_PTO_Summary_Block;
@@ -57,7 +57,7 @@ block_row_number int,
create_time timestamp DEFAULT current_timestamp
);
create table staging2.BUDNI_PTO_MMTKeyword1_Block
create table staging2.BUDNI_PTO_Parameter1_Block
(
syspk serial,
file_syspk int,
@@ -84,7 +84,7 @@ block_row_number int,
create_time timestamp DEFAULT current_timestamp
);
create table staging2.BUDNI_PTO_MMTKeyword2_Block
create table staging2.BUDNI_PTO_Parameter2_Block
(
syspk serial,
file_syspk int,

View File

@@ -501,6 +501,24 @@ c33 text null,
c34 text null,
c35 text null,
c36 text null,
c37_1 text null,
c37 text null,
c38 text null,
c39 text null,
c40 text null,
c41 text null,
c42_1 text null,
c42 text null,
c43 text null,
c44 text null,
c45 text null,
c46 text null,
c47_1 text null,
c47 text null,
c48 text null,
c49 text null,
c50 text null,
c51 text null,
block_row_number int,
trx_record int4 NULL DEFAULT 1,
create_time timestamp NULL DEFAULT CURRENT_TIMESTAMP

View File

@@ -29,6 +29,8 @@ Test_Request_no text,
Sample_Receipt_Date text,
Test_report_No text,
Tractor_Model text,
Tractor_power_hp text,
variant text,
Generation text,
Customer_Name text,
Test_Engineer text,
@@ -37,6 +39,8 @@ No_of_Sample text,
Test_Start_Date text,
Test_End_Date text,
Tractor_Sr_No text,
Drive text,
Platform text,
Test_Standard_Refer text,
Test_Location text,
Operator_Name text,

View File

@@ -30,6 +30,8 @@ Test_Request_no text,
Sample_Receipt_Date text,
Test_report_No text,
Tractor_Model text,
Tractor_power_hp text,
variant text,
Generation text,
Customer_Name text,
Test_Engineer text,
@@ -38,6 +40,8 @@ No_of_Sample text,
Test_Start_Date text,
Test_End_Date text,
Tractor_Sr_No text,
Drive text,
Platform text,
Test_Standard_Refer text,
Test_Location text,
Operator_Name text,

View File

@@ -31,6 +31,8 @@ Test_Request_no text,
Sample_Receipt_Date text,
Test_report_No text,
Tractor_Model text,
Tractor_power_hp text,
variant text,
Generation text,
Customer_Name text,
Test_Engineer text,
@@ -39,6 +41,8 @@ No_of_Sample text,
Test_Start_Date text,
Test_End_Date text,
Tractor_Sr_No text,
Drive text,
Platform text,
Test_Location text,
Operator_Name text,
Project_Group text,

View File

@@ -29,6 +29,8 @@ Test_Request_no text,
Sample_Receipt_Date text,
Test_report_No text,
Tractor_Model text,
Tractor_power_hp text,
variant text,
Generation text,
Customer_Name text,
Test_Engineer text,
@@ -37,6 +39,8 @@ No_of_Sample text,
Test_Start_Date text,
Test_End_Date text,
Tractor_Sr_No text,
Drive text,
Platform text,
Test_Standard_Refer text,
Test_Location text,
Operator_Name text,

View File

@@ -31,6 +31,8 @@ Test_Request_no text,
Sample_Receipt_Date text,
Test_report_No text,
Tractor_Model text,
Tractor_power_hp text,
variant text,
Generation text,
Customer_Name text,
Test_Engineer text,
@@ -39,6 +41,8 @@ No_of_Sample text,
Test_Start_Date text,
Test_End_Date text,
Tractor_Sr_No text,
Drive text,
Platform text,
Test_Facility text,
Operator_Name text,
Project_Group text,

View File

@@ -30,6 +30,8 @@ Test_Request_no text,
Sample_Receipt_Date text,
Test_report_No text,
Tractor_Model text,
tractor_power_hp text,
variant text,
Generation text,
Customer_Name text,
Test_Engineer text,
@@ -38,6 +40,8 @@ No_of_Sample text,
Test_Start_Date text,
Test_End_Date text,
Tractor_Sr_No text,
drive text,
platform text,
Test_Standard_Refer text,
Test_Location text,
Operator_Name text,
@@ -97,6 +101,7 @@ dummy_f text,
make text,
model text,
Weight_Reaction text,
condition text,
Total_Weight_kg text,
Front_Reaction_kg text,
Rear_Reaction_kg text,

View File

@@ -31,6 +31,8 @@ Test_Request_no text,
Sample_Receipt_Date text,
Test_report_No text,
Tractor_Model text,
Tractor_power_hp text,
variant text,
Generation text,
Customer_Name text,
Test_Engineer text,
@@ -40,11 +42,12 @@ No_of_Sample text,
Test_Start_Date text,
Test_End_Date text,
Tractor_Sr_No text,
Drive text,
Platform text,
Test_Standard_Refer text,
Domestic_Export text,
Operator_Name text,
Project_Group text,
Platform text,
Objective text,
Test_Standard text,
Test_Standard_id text,

View File

@@ -31,6 +31,8 @@ Test_Request_no text,
Sample_Receipt_Date text,
Test_report_No text,
Tractor_Model text,
Tractor_Power_hp text,
variant text,
Generation text,
Customer_Name text,
Test_Engineer text,
@@ -40,11 +42,12 @@ No_of_Sample text,
Test_Start_Date text,
Test_End_Date text,
Tractor_Sr_No text,
drive text,
platform text,
Test_Standard_Refer text,
Domestic_Export text,
Operator_Name text,
Project_Group text,
Platform text,
Objective text,
Test_Standard text,
Test_Standard_id text,

View File

@@ -33,6 +33,8 @@ Test_Request_no text,
Sample_Receipt_Date text,
Test_report_No text,
Tractor_Model text,
Tractor_power_hp text,
Variant text,
Generation text,
Customer_Name text,
Test_Engineer text,
@@ -42,11 +44,12 @@ No_of_Sample text,
Test_Start_Date text,
Test_End_Date text,
Tractor_Sr_No text,
Drive text,
Platform text,
Test_Standard_Refer text,
Domestic_Export text,
Operator_Name text,
Project_Group text,
Platform text,
Objective text,
Test_Standard text,
Test_Standard_id text,