# Workflow\.datasource

### Workflow.<mark style="color:purple;">datasource</mark>(*source*) → [Datasource](https://docs.redivis.com/api/client-libraries/redivis-python/reference/datasource)

Create a reference to a datasource within a workflow.

### **Parameters:**

**`source` :&#x20;*****str*** ***|*** [***Dataset***](https://docs.redivis.com/api/client-libraries/redivis-python/reference/dataset) ***|*** [***Workflow***](https://docs.redivis.com/api/client-libraries/redivis-python/reference/workflow)\
A [fully qualified reference](https://docs.redivis.com/api/referencing-resources) to the source dataset *or* workflow associated with this datasource, or a corresponding Dataset or Workflow instance.

### **Returns:**

[**Datasource**](https://docs.redivis.com/api/client-libraries/redivis-python/reference/datasource)

### Examples

```python
workflow = redivis.user("imathews").workflow("example_workflow_climate_analysis")

datasource = workflow.datasource("Demo.ghcn_daily_weather_data:v1_0")

# Update to a new version
datasource.update(source_dataset="Demo.ghcn_daily_weather_data:v2_0")
```
