Important

Helios features are now enabled during weekly update windows and are no longer directly tied to SingleStore engine releases. Refer to the release notes to view the latest features available in your Helios cluster.

UPLOAD FILE TO STAGE

The UPLOAD FILE TO STAGE command uploads a file at the specified path within a Stage.

Syntax

UPLOAD FILE TO STAGE '<stage_path>'
    [ { IN GROUP { ID '<deployment_ID>' | '<deployment_name>' } | IN { ID '<deployment_ID>' | '<deployment_name>' } } ]
    FROM '<local_path>' [ OVERWRITE ]

Arguments

  • stage_path: The path in the Stage where the file is uploaded. It must end with a trailing /.

  • deployment_ID, deployment_name: The ID or name of the deployment (cluster group) in which the Stage is attached.

  • local_path: Specifies the path to the file in the local directory.

Remarks

  • If the OVERWRITE clause is specified, any existing file with the same name at the specified path is overwritten.

  • The IN and IN GROUP clauses specify the ID or the name of the deployment in which the Stage is attached.

Example

The following command uploads a file to the Stage attached to the deployment named s2-group and overwrites any existing files with the same name at the specified path:

UPLOAD FILE TO STAGE '/data/stats.csv' IN 's2-group'
FROM '/tmp/stats.csv' OVERWRITE;

Last modified:

Was this article helpful?