# COPY FUNCTION\_SOURCE

## Syntax

```sql
COPY FUNCTION_SOURCE function_source_name TO 'file_path';
```

## Description

This command downloads a [Function Source](https://docs.deltastream.io/overview/core-concepts/function) in the current organization to a specified file path on the user's local machine.

You can download a function source only if the current role has USAGE privileges.

### Arguments

#### function\_source\_name

This is the name of the function source to copy. If the name is case-sensitive names, you must wrap it in double quotes; otherwise, the lowercase name is used.

#### file\_path

This is the destination file path on the local machine to which the function source file is copied. This is a string value and should be wrapped in single quotes.

### Return

A message indicating the function source was successfully copied (or displays an error otherwise).

## Examples

#### Copy Function Source

```sh
demodb.public/demostore# COPY FUNCTION_SOURCE funcsrc TO '/tmp/funcsrc';
Downloading function source funcsrc to /tmp/funcsrc
```
