Scenario:
I upload a CSV file into a S3 bucket and now I would like to read this table using Trino.
Is it possible to just read the table without the CREATE TABLE statement? Maybe simple SELECT only? Or I have to CREATE TABLE everytime I want to read the CSV file?
CodePudding user response:
You can use the COPY
command to load the data without having to create a table first.
Once the data is loaded use SELECT
to query your data.
Example:
COPY table FROM 's3://bucket_name/file.csv' WITH (format='csv');
SELECT * FROM table;