redivis::table

redivis::table(table_reference) Table

Construct a new table instance. This method can only be called if default project / dataset is set (this is automatically set within a Redivis notebook to that notebook's project).

Parameters:

table_reference : str The reference to the table. Can often just be the table's name, but providing additional information in the reference will ensure that your code works if the table is renamed. In Redivis notebooks, the source table of the notebook can always be referenced as "_source_". Learn more about referencing resources >

Returns:

Table

Examples

# This assumes that either:
# - The env variable REDIVIS_DEFAULT_DATASET=demo.iris_species (or some other dataset with an "iris" table)
# - Or, that we're running this in a notebook whose project contains a table names "iris"
table <- redivis::table("iris")
table$to_tibble()
# 	Id	SepalLengthCm	SepalWidthCm	PetalLengthCm	PetalWidthCm	Species
# 0	33	5.2	        4.1	        1.5	        0.1	        Iris-setosa
# ...

# If in a Redivis notebook, you can always reference the source table as "_source_"
notebook_source_table <- redivis::table("_source_")

Last updated