For the complete documentation index, see llms.txt. This page is also available as Markdown.

Transform$create

Transform$create(source_table, query=NULL) → self

Creates a new transform within the workflow.

Parameters:

source_table : str | Table Required. The transform's source table. Must be a valid table reference (as a string), or an instance of a Table. The table must already exist within the workflow; for tables belonging to a dataset, the dataset must first be added to the workflow.

query : str, default NULL If specified, the transform will be created with a single SQL step containing the specified query string. The query will be validated, and the transform will be marked as invalid if the query contains errors.

Returns:

self (a Transform)

Examples

workflow <- redivis$workflow("username.workflow_name")

# If no name is specified, a default name will be chosen.
transform <- workflow$transform("my_transform")$create(
  source_table = "my_table",
  query = "SELECT * FROM _source_table WHERE year > 2020"
)
transform$run()

Last updated

Was this helpful?