NASA-IMPACT / HLS-Transfer-Catalog

Data Catalog to manage HLS S2 transfers from ESA to NASA
Apache License 2.0
2 stars 1 forks source link

Identify the mandatory columns or fields required for inserting the catalogue items #14

Closed ub0005 closed 2 years ago

ub0005 commented 2 years ago
  1. Identify the mandatory columns needed while uploading the CSV File for Bulk Upload API
  2. Identify the mandatory columns needed while inserting an individual record of a catalog item.

Once Identified make needed code changes to fail the API call if mandatory columns or fields are not present in the CSV or JSON request.

Priority: Low

@NISH1001 @smarru @DImuthuUpe

NISH1001 commented 2 years ago

I agree with this. This will help us validate the uploaded csv so that the server wouldn't crash much...

NISH1001 commented 2 years ago

@ub0005 We resolved this, right in PR #9 ?

ub0005 commented 2 years ago

@NISH1001 I could see there is a difference in mandatory fields between bulk upload API and single catalogue item insertion API.

Need to get clarity on what fields would mandatory for both the API's

NISH1001 commented 2 years ago

For single, we assume if the json in the POST request doesn't have the field, we put default values. So, I had to put mandatory fields for some fields that wouldn't have any defaults. For instance, checksum can't have default values, etc.

ub0005 commented 2 years ago

@NISH1001

For single, we assume if the json in the POST request doesn't have the field, we put default values. So, I had to put mandatory fields for some fields that wouldn't have any defaults. For instance, checksum can't have default values, etc.

I had externalized the mandatory fields for the CSV upload post request to Nish. Going forward we can add the mandatory columns in the configuration. please let me know your comments

NISH1001 commented 2 years ago

@ub0005 Cool...Saw the PR. LOoks good.