Skip to content

Commit

Permalink
fix: update database schema for candidates table with new column name…
Browse files Browse the repository at this point in the history
…s and types
  • Loading branch information
kalyan540 committed Dec 27, 2024
1 parent 011ce09 commit 703afa0
Showing 1 changed file with 31 additions and 29 deletions.
60 changes: 31 additions & 29 deletions Text2Sql/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,47 +13,49 @@
# Database schema (for use with text-to-SQL model)
schema = """
"candidates"
"Serial #" INTEGER,
"Category" STRING,
"Priority" STRING,
"Order_Number" INTEGER,
"Tech_Stack" STRING,
"Oder #" INTEGER,
"Tech Stack" STRING,
"Technology" STRING,
"Date_Order_Opened" DATE,
"Date_Profile_Uploaded" DATE,
"Date Order # was opened" DATE,
"Date Profile Uploaded" DATE,
"Portfolio" STRING,
"Manager" STRING,
"Internal_External" STRING,
"Candidate_Name" STRING,
"Interview_Secured_Date" DATE,
"Interview_Scheduled_Date" DATE,
"Internal/External" STRING,
"Candidate Name" STRING,
"Interview Secured Date" DATE,
"Interview Scheduled Date" DATE,
"Status" STRING,
"Comments" TEXT,
"Selection_Date" DATE,
"Selection_Month" STRING,
"Comments*" TEXT,
"Selection Date" DATE,
"Selection Month" STRING,
foreign_key:
primary key: "Order_Number"
primary key: "Serial #"
"""

# Table names and column names
table_names = ["candidates"] # Table name in the schema
column_names = [
"Category",
"Priority",
"Order_Number",
"Tech_Stack",
"Technology",
"Date_Order_Opened",
"Date_Profile_Uploaded",
"Portfolio",
"Manager",
"Internal_External",
"Candidate_Name",
"Interview_Secured_Date",
"Interview_Scheduled_Date",
"Status",
"Comments",
"Selection_Date",
"Selection_Month"
"Serial #",
"Category",
"Priority",
"Oder #",
"Tech Stack",
"Technology",
"Date Order # was opened",
"Date Profile Uploaded",
"Portfolio",
"Manager",
"Internal/External",
"Candidate Name",
"Interview Secured Date",
"Interview Scheduled Date",
"Status",
"Comments*",
"Selection Date",
"Selection Month",
] # Column names in the schema

# Function to add double quotations to table and column names in the SQL query
Expand Down

0 comments on commit 703afa0

Please sign in to comment.