I am attempting to copy a csv file in a Cassandra table using
so in cqlsh, something like:
COPY mytable FROM 'test.csv' WITH header=TRUE;
problem is that in practice, my CSV file has more than a hundred columns. Is it necessary to define each column using
CREATE TABLE mytable (<all my columns here>);
or hopefully, is there some way to create the table f rom the column headers? I mean, I could write a short python script that reads the column headers and then outputs them into a format i can just copy and paste into , but I'm wondering if there's a more elegant way?
Thanks Alex