# 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/redivisusdtransform"><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/workflowusdtransform"><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/workflowusdlist_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

```r
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/transformusdcancel"><strong><code>transform$cancel</code></strong></a>()</td><td>Cancel a running transform</td></tr><tr><td><a href="transform/transformusdexists"><strong><code>transform$exists</code></strong></a>()</td><td>Check whether the transform exists.</td></tr><tr><td><a href="transform/transformusdget"><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/transformusdoutput_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/transformusdreferenced_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/transformusdrun"><strong><code>transform$run</code></strong></a>([wait_for_finish=True])</td><td>Run a transform.</td></tr><tr><td><a href="transform/transformusdreferenced_tables"><strong><code>transform$source_table</code></strong></a>()</td><td>Get the transform's source table</td></tr><tr><td><a href="transform/transformusdreferenced_tables"><strong><code>transform$update</code></strong></a>([name, source_table])</td><td>Update the transform's name and/or source.</td></tr></tbody></table>
