tencent cloud

Feedback

Saving Query Result as New Table

Last updated: 2022-08-16 09:41:59

You can use the CREATE TABLE AS statement to save the result of the SELECT query statement as a new table. Data Lake Compute stores data files created with CREATE TABLE AS in the COS bucket path you specified. The following describes how to save a query result as a new data table in the console.

  1. Run a SELECT task to get the returned result of a task in the console.
  2. Click in the top-right corner of the Running result section and select Save result as new table.
  3. In the pop-up window, configure the information of the new data table and click Confirm. Then, the system will automatically generate the CREATE TABLE AS statement.
  • Select the database of the new data table. By default, the system selects the database of the original table.
  • Enter the name of the new data table.
  • Select the bucket path for data files in the new data table.
  • Select the new data table format, which can be Parquet, ORC, Avro, CSV, or JSON.
  1. Select the CREATE TABLE AS statement and click Run.

System restraints

  • The rules for creating a target table are the same as the restraints on manipulating a data table.
  • Saving the query result as a new table will generate new data files in the specified COS bucket path, which must exist and has no other data files.
Contact Us

Contact our sales team or business advisors to help your business.

Technical Support

Open a ticket if you're looking for further assistance. Our Ticket is 7x24 avaliable.

7x24 Phone Support