I'm trying to load a .csv file with Python into Apache Cassandra database. The command "COPY" integrated with session.execute seems don't work. It gives an unexpected indent in correspondance of =',' but...I red something about and I found that the command COPY in this way is not supported.
In this script time_test and p are two float variables
from cassandra.cluster import Cluster
cluster = Cluster()
session = cluster.connect('myKEYSPACE')
rows = session.execute('COPY table_test (time_test, p)
from'/home/mypc/Desktop/testfile.csv' with delimiter=',' and header=true;
')
print('DONE')
Thank you for help!