# Create an SFTP Data Stream

Create a data stream in Data 360 to start the flow of data from your SFTP-enabled server source.

- Make sure an SFTP connection is set up. See [Set up an SFTP Connection](https://help.salesforce.com/s/articleView?id=c360\_a_set_up_sftp_connection.htm\&type=5).

1. In Data Cloud, on the Data Streams tab, click **New**.

   You can also use App Launcher to find and select Data Streams.

2. Select **Secure File Transfer (SFTP)**, and click **Next**.

3. Choose from the available SFTP connections.

4. Enter the import details.

   | Field                 | Description                                                                                                                                                                                                                                                             |
   | --------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
   | Import from Directory | (Optional) Remaining folder path under the parent directory that points to a file’s specific location. **Note**: If you leave this field empty, the stream will use the parent directory (configured in the connection) as the extract/ingest path.                     |
   | File Name             | The file name to retrieve. The file name supports wildcards, and CSV/Parquet file formats. For example, you can use *abc*.csv to retrieve all file names containing “abc.” Each time the stream runs, all files that match the name, including wildcards, are imported. |
   | Source                | The external system where data is sourced. Multiple data streams can have the same source.                                                                                                                                                                              |

5. Click **Next**.

6. Create a data lake object (DLO) or use an existing DLO.

   If you’re creating a DLO, see [Naming standards for data lake objects](https://help.salesforce.com/s/articleView?id=data.c360\_a_data_lake_object_naming.htm\&type=5). If you’re using an existing DLO, see [Using existing data lake object to create a data stream](https://help.salesforce.com/s/articleView?id=data.c360\_a_guardrails_existing_data_lake_object.htm\&type=5).

7. If you’re creating a DLO, edit the fields identified in the table.

8. Enter a DLO label, API name, and object details.

   | Field                        | Description                                                                                                                                                                                          |
   | ---------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
   | Category                     | Identify the type of data in the data stream.                                                                                                                                                        |
   | Primary Key                  | Select a unique field to identify a record.                                                                                                                                                          |
   | Record Modified Field        | If data is received out of order, the system uses the record modified field as a reference point to determine whether to update the record. The record with the most up-to-date timestamp is loaded. |
   | Organization Unit Identifier | Select the business unit to use for a record’s data lineage.                                                                                                                                         |

9. (Optional) Add formula fields.

10. Click **Next**.

11. Enter the deployment details, and click **Deploy**.
    Your data stream is created, and you can now map your DLO to the semantic data model to use the data in segments, calculated insights, and other use cases.

## Refresh an SFTP Data Stream

Perform this procedure any time, you want to stop the current data stream and refresh it.

1. From a specific data stream details page, click **Refresh Now** button in the menu bar.
2. A popup menu opens, and you are presented with two choices:

- Refresh only new files -- choose this option is you have new files in the SFTP server and you want to make sure they are immediately included in the data stream.
- Refresh all files -- choose this option to refresh all files (new, changed, and unchanged).

3. Click **Refresh Now** at the bottom of the screen to start the refresh.

## See Also

- [Salesforce Help: Data Stream Settings and Refresh Modes](https://help.salesforce.com/s/articleView?id=data.c360\_a_data_stream_edit_settings.htm\&type=5)
- [Knowledge Article: Best Practices for Managing SFTP Data Stream](https://help.salesforce.com/s/articleView?id=002627932\&type=1)
- [Knowledge Article: Handling Multi-Line Data in File Upload vs. SFTP Data Stream](https://help.salesforce.com/s/articleView?id=004519294\&type=1)
- [Knowledge Article: Troubleshooting SFTP Data Stream Ingestion Errors](https://help.salesforce.com/s/articleView?id=004947530\&type=1)
