# UPLOAD FILE TO STAGE

Uploads a file at the specified path within a [Stage](https://docs.singlestore.com/cloud/load-data/load-data-from-files/stage.md).

## 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 (workspace 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 **s2wsg** and overwrites any existing files with the same name at the specified path:

```sql
UPLOAD FILE TO STAGE '/data/stats.csv' IN 's2wsg'
FROM '/tmp/stats.csv' OVERWRITE;
```

***

Modified at: February 13, 2025

Source: [/cloud/reference/fusion-sql/upload-file-to-stage/](https://docs.singlestore.com/cloud/reference/fusion-sql/upload-file-to-stage/)

(An index of the documentation is available at /llms.txt)
