> ## Documentation Index
> Fetch the complete documentation index at: https://docs.prophecy.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Upload files gem for Data Analysis

> Upload files to your data warehouse from the visual canvas

You can add a source table to your primary SQL warehouse by uploading a file directly onto the visual canvas. This gives you greater control over your data and how you incorporate it into your model transformation.

When you upload your file through Prophecy, it's added directly to your SQL warehouse as a [table](/data-analysis/gems/source-target/source-target).

<Note>The recommended maximum file size is 100 MB.</Note>

<AccordionGroup>
  <Accordion title="Supported file formats">
    You can upload the following file formats:

    * CSV
    * Excel (XLS, XLSX)
    * JSON
    * Parquet
    * XML
  </Accordion>
</AccordionGroup>

## File upload

To upload your file:

1. Open a pipeline.
2. Drag and drop your file onto the canvas. This opens a new Source gem.

<img src="https://mintcdn.com/prophecy-62973bd0/TCE9ttntwn-TDkv6/data-analysis/gems/source-target/table/img/upload-file-drag-drop.png?fit=max&auto=format&n=TCE9ttntwn-TDkv6&q=85&s=47ba6e3c68955d8864042558ce96cc94" alt="Upload file by dragging and dropping" width="2620" height="1490" data-path="data-analysis/gems/source-target/table/img/upload-file-drag-drop.png" />

## Type and format

Once the Source gem opens, you can review the type and format of the file.

1. Optional: Replace or delete your uploaded file.
2. Optional: Change the type and format of the file.
3. Click **Next**.

<img src="https://mintcdn.com/prophecy-62973bd0/TCE9ttntwn-TDkv6/data-analysis/gems/source-target/table/img/upload-file-type-format.png?fit=max&auto=format&n=TCE9ttntwn-TDkv6&q=85&s=62a942e6745c4319d20146e20dc663e8" alt="Select your file type and format" width="2620" height="1493" data-path="data-analysis/gems/source-target/table/img/upload-file-type-format.png" />

## Location

Now, set the location where the table will be stored in the primary SQL warehouse configured in your fabric.

1. Choose the database.
2. Choose the schema.
3. Choose the table. You can either select an existing table or create a new one.

<img src="https://mintcdn.com/prophecy-62973bd0/TCE9ttntwn-TDkv6/data-analysis/gems/source-target/table/img/upload-file-location.png?fit=max&auto=format&n=TCE9ttntwn-TDkv6&q=85&s=f21db2877ad07e3b517d3dcf9d7350f5" alt="Select the table location" width="1310" height="745" data-path="data-analysis/gems/source-target/table/img/upload-file-location.png" />

<Warning>
  If you select an existing table, Prophecy deletes and recreates the table with your uploaded file.
</Warning>

## Properties

You can configure the table properties before completing the file upload.

1. Review the file's options. Depending on the file type and format, common defaults are already chosen for you.
2. Optional: Modify the options. For example, you can change the header row by selecting **First row is header**.
3. Optional: If you made any changes to the options, click **Infer Schema**. This will update the schema according to the defined options.

<img src="https://mintcdn.com/prophecy-62973bd0/TCE9ttntwn-TDkv6/data-analysis/gems/source-target/table/img/upload-file-properties.png?fit=max&auto=format&n=TCE9ttntwn-TDkv6&q=85&s=83f1ee308994593712e3906fda662870" alt="Configure the table properties" width="2620" height="1490" data-path="data-analysis/gems/source-target/table/img/upload-file-properties.png" />

## Preview

The preview step shows your table data and gives you the option to download it.

1. To generate the preview, click **Load**. This loads the data.
2. Check that your preview looks correct and click **Done**.
3. If you selected a table to write your uploaded file to, you'll need to confirm the upload in the pop-up window by clicking **Proceed**.

<img src="https://mintcdn.com/prophecy-62973bd0/TCE9ttntwn-TDkv6/data-analysis/gems/source-target/table/img/upload-file-preview.png?fit=max&auto=format&n=TCE9ttntwn-TDkv6&q=85&s=ac0709b414b3576585446230ab980ad2" alt="Preview the table" width="2620" height="1493" data-path="data-analysis/gems/source-target/table/img/upload-file-preview.png" />

The new table is now in your environment and available in Source/Target gems. You can upload another file or start working with your new source gem.
