rename_index

In [ ]:
rename_index(source: str, 
             dest: str, 
             cursor=None, 
             overwrite: bool = False,)

Renames a spatial index.

Parameters

Name Type Optional Description
source
str
Current name of the spatial index.
dest
str
New name of the spatial index.
cursor
DBcursor
Vertica DB cursor.
overwrite
bool
BOOLEAN value that specifies whether to overwrite the index, if an index exists.

Returns

bool : True if the index was renamed, False otherwise.

Example

In [33]:
from verticapy.geo import *

describe_index()
Out[33]:
Abc
name
Varchar(4096)
1world_polygon
2world_counties
Rows: 1-2 | Column: name | Type: Varchar(4096)
In [34]:
rename_index("world_polygon", "world_polygon_test")
Out[34]:
True
In [35]:
describe_index()
Out[35]:
Abc
name
Varchar(4096)
1world_counties
2world_polygon_test
Rows: 1-2 | Column: name | Type: Varchar(4096)