# Transform

## *class* <mark style="color:purple;">Transform</mark>

An interface for working with transforms on Redivis.

## Constructors

<table data-header-hidden><thead><tr><th width="368">Method</th><th>Description</th></tr></thead><tbody><tr><td><a href="redivis/redivis.transform"><strong><code>redivis.transform</code></strong></a>(name)</td><td>Create a reference to a transform based on its (qualified) name</td></tr><tr><td><a href="workflow/worfklow.transform"><strong><code>Workflow.transform</code></strong></a>(name)</td><td>Return a transform within a specific <a href="workflow">workflow</a>. </td></tr><tr><td><a href="workflow/workflow.list_transforms"><strong><code>Workflow.list_transforms</code></strong></a>([max_results])</td><td>Returns a list of Transforms within a workflow</td></tr></tbody></table>

## Examples

```python
username = "imathews"
workflow_name = "example_workflow_climate_analysis:x7kh"
transform_name = "join_lat_lon:m9tz"

transform = redivis.transform(f"{username}.{workflow_name}.{transform_name}")
transform.run()
```

## Attributes

<table data-header-hidden><thead><tr><th>Name</th><th>Description</th></tr></thead><tbody><tr><td><strong><code>workflow</code></strong></td><td>A reference to the <a href="workflow">Workflow</a> instance that is associated with this transform.</td></tr><tr><td><strong><code>properties</code></strong></td><td>A dict containing the <a href="../../../resource-definitions/transform">API resource representation of the transform</a>. This will only be populated after certain methods are called, particularly the <code>get</code> method, and will otherwise be <code>None</code>.</td></tr><tr><td><strong><code>qualified_reference</code></strong></td><td><p></p><p>The <a href="../../../referencing-resources">fully qualified reference</a> to this transform</p><p>For example,</p><pre class="language-http"><code class="lang-http">imathews.example_workflow_climate_analysis:x7kh.join_lat_lon:m9tz
</code></pre></td></tr><tr><td><strong><code>scoped_reference</code></strong></td><td>The canonical reference for the transform, without any qualifiers. E.g., <code>join_lat_lon:m9tz</code></td></tr></tbody></table>

## Methods

<table data-header-hidden><thead><tr><th width="368">Method</th><th>Description</th></tr></thead><tbody><tr><td><a href="transform/transform.cancel"><strong><code>transform.cancel</code></strong></a>()</td><td>Cancel a running transform</td></tr><tr><td><a href="transform/transform.get"><strong><code>transform.get</code></strong></a>()</td><td>Fetches the transform, after which transform.properties will contain a dict with entries corresponding to the properties on the <a href="../../../resource-definitions/transform">transform resource definition</a>. Will raise an error if the transform does not exist.</td></tr><tr><td><a href="transform/transform.exists"><strong><code>transform.exists</code></strong></a>()</td><td>Check whether the transform exists.</td></tr><tr><td><a href="transform/transform.output_table"><strong><code>transform.output_table</code></strong></a>()</td><td>Get a reference to the transform's output table.</td></tr><tr><td><a href="transform/transform.run"><strong><code>transform.run</code></strong></a>([*, wait_for_finish=True])</td><td>Run a transform.</td></tr><tr><td><a href="transform/transform.referenced_tables"><strong><code>transform.referenced_tables</code></strong></a>()</td><td>Get an ordered list of tables referenced by the transform.</td></tr><tr><td><a href="transform/transform.source_table"><strong><code>transform.source_table</code></strong></a>()</td><td>Get the transform's source table.</td></tr><tr><td><a href="transform/transform.update"><strong><code>transform.update</code></strong></a>([*, name, source_table])</td><td>Update the transform's name and/or source.</td></tr></tbody></table>
