in the below code, i am trying to create table.at run time i receive the following error:
psycopg2.errors.SyntaxError: FEHLER: Syntaxfehler bei »(«
LINE 2: CREATE TABLE IF NOT EXISTS ('distancesFromPoints...
to solve this issue, i enclosed the %s between curly-brackets but it did not solve the issue.
please let me know how to fix it
^
code
def executeCreateTableDistancesFromPointToNearestEdge(self):
query="""
CREATE TABLE IF NOT EXISTS (%s) (pointGeometry distanceToNearestEdge);
""".format(table=config['Distance_To_Nearest_Edge']['table_name'])
data = self.connection.execute(query,[config['Distance_To_Nearest_Edge']['table_name']])
# print("data: ",data)
return data