@@ -32,6 +32,9 @@ func AddHandleFunc() {
3232 Utils .CreateHandleFunc (prePath + "/create_group_DB/" , handleCreateGroupDB )
3333 Utils .CreateHandleFunc (prePath + "/generate_sample_data/" , handleGenerateSampleData )
3434 Utils .CreateHandleFunc (prePath + "/find_duplicate_columns_DB" , handleFindDuplicateColumnsDB )
35+ Utils .CreateHandleFunc (prePath + "/normalizeDB/" , handleNormalizeDB )
36+ Utils .CreateHandleFunc (prePath + "/drop_columns_tags/" , handleDeleteColumnsAndTags )
37+
3538}
3639
3740// handleMerge handles the request to merge the datasets for the DB
@@ -297,6 +300,16 @@ func handleGenerateSampleData(jsonConfig string, id string) (string, error) {
297300 return response , nil
298301}
299302
303+ func handleNormalizeDB (jsonConfig string , id string ) (string , error ) {
304+ log .Println ("Normalizing DB..." , id )
305+ response , err := Utils .StartPythonScripts (jsonConfig , "../pythonCode/modules/input/normalizeDB.py" , id )
306+ Utils .RemoveIdFromScripts (id )
307+ if err != nil {
308+ return "" , err
309+ }
310+ return response , nil
311+ }
312+
300313// handleFindDuplicateColumnsDB to identify duplicate columns from a CSV
301314// It returns the response from the python script
302315func handleFindDuplicateColumnsDB (jsonConfig string , id string ) (string , error ) {
@@ -316,3 +329,12 @@ func handleFindDuplicateColumnsDB(jsonConfig string, id string) (string, error)
316329
317330 return response , nil
318331}
332+ func handleDeleteColumnsAndTags (jsonConfig string , id string ) (string , error ) {
333+ log .Println ("Deleting Columns..." , id )
334+ response , err := Utils .StartPythonScripts (jsonConfig , "../pythonCode/modules/input/drop_columns_tags.py" , id )
335+ Utils .RemoveIdFromScripts (id )
336+ if err != nil {
337+ return "" , err
338+ }
339+ return response , nil
340+ }
0 commit comments