> For the complete documentation index, see [llms.txt](https://datalab-docs.datacamp.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://datalab-docs.datacamp.com/connect-to-data/files.md).

# Files

A files data source allows you to share files in a read-only way between multiple workbooks within a single account context.

## Set up a file data source

Select **Data Sources** in the sidebar and click on **New Data Source** in the screen that follows. You'll be prompted to select the type of the data source. Either drag in files you want to use to create a data source or press **browse files** to select the files you want to upload.

<figure><img src="https://4179539225-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MZqboFGZzD87nn7oPsm%2Fuploads%2FJQR2TTGVerITDInx7Xfw%2FScreenshot%202024-08-19%20at%2013.46.36.png?alt=media&amp;token=4fcffd05-9d7b-43d1-bd86-6ae636d8649b" alt=""><figcaption></figcaption></figure>

A *files* data source will be created and you'll see an overview on the following screen. Here you can update the name, change the description, upload more files or just browse a preview of the data.

<figure><img src="https://4179539225-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MZqboFGZzD87nn7oPsm%2Fuploads%2F7Ebuh8CDVhxq4mPU73rj%2FScreenshot%202024-08-19%20at%2013.49.19.png?alt=media&amp;token=00e03cfb-d9a2-46ed-860f-af9ead99b4b8" alt=""><figcaption></figcaption></figure>

## Query a files data source

You can now query your files data source with a [SQL cell](/work/sql-cell.md). Select it in the **Select source** dropdown in the top left corner of a SQL cell. You can query the individual files by specifying their name in the `FROM` clause. The schema of the data source is also available by clicking on **Browse Files**, from here it's also easy to start querying individual files.

<figure><img src="https://4179539225-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MZqboFGZzD87nn7oPsm%2Fuploads%2Fg6lTAAHRwWmW2BeFghc5%2FScreenshot%202024-08-19%20at%2013.52.19.png?alt=media&amp;token=24b54228-25bf-427e-b35d-1fd016e5998b" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://datalab-docs.datacamp.com/connect-to-data/files.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
