Bug 958 - AMP - Postgres database revamp

Review Request #322 — Created July 10, 2024 and submitted

pmurugaiyan
AMP
amp_bug_fixes_base_3_6_0
958
apoorva.sn, prajesh, shuinvy

Bug 958 - AMP - Postgres database revamp

Affected tables:
1. adc_vs_ssl_info
2. ext_log

The changes are tested locally.

Description From Last Updated

any reason not using select * only here ?

apoorva.snapoorva.sn

Can we define a constant for this URL?

prajeshprajesh

There is no primary key for this ext_log table? is the drop contraint required ?

apoorva.snapoorva.sn
pmurugaiyan
shuinvy
  1. Ship It!
  2. 
      
pmurugaiyan
apoorva.sn
  1. 
      
  2. any reason not using select * only here ?

    1. Yes, Its not a good practice to use * whitelist (to share all the columns from a table), so we are sharing the intended columns as the response.

  3. 
      
apoorva.sn
  1. 
      
  2. There is no primary key for this ext_log table? is the drop contraint required ?

    1. In the nextline itself we are adding it back. So for tables & columns we have the option to check the existance whereas for the key constrainnts we don't have staright forward method to check for the constraint. So this way we are droping and adding it back, to avoid any errors when we execute this script.

  3. 
      
prajesh
  1. 
      
  2. Can we define a constant for this URL?

    1. Sure Praveen. I have created the global variables for the URLs instead of hive/util/constants.py. This particular script ran as cron job, so keeping the variables & constants within the file itself as much as possible.

  3. 
      
pmurugaiyan
prajesh
  1. Ship It!
  2. 
      
pmurugaiyan
Review request changed

Status: Closed (submitted)

Loading...