Skip to main content
Version: 0.7

tecton.TectonDataFrame

A thin wrapper around Pandas, Spark, and Snowflake dataframes.

Attributes​

NameData TypeDescription
columnsList[str]The columns of the dataframe

Methods​

NameDescription
__init__(...)Method generated by attrs for class TectonDataFrame.
explain(...)Prints the query tree.
get_time_range(...)
subtree(...)Creates a TectonDataFrame from a subtree of prior querytree labeled by a node id in .explain().
to_pandas()Returns data as a Pandas DataFrame.
to_snowpark()Returns data as a Snowpark DataFrame.
to_spark()Returns data as a Spark DataFrame.

__init__(...)​

  • spark_df (Default: None)
  • pandas_df (Default: None)
  • snowflake_df (Default: None)
  • querytree (Default: None)
  • temp_table_registered (Default: None)

Method generated by attrs for class TectonDataFrame.

explain(...)​

Prints the query tree. Should only be used when this TectonDataFrame is backed by a query tree.

Parameters​

  • node_id (bool) – If True, the unique id associated with each node will be rendered. (Default: True)

  • name (bool) – If True, the class names of the nodes will be rendered. (Default: True)

  • description (bool) – If True, the actions of the nodes will be rendered. (Default: True)

  • columns (bool) – If True, the columns of each node will be rendered as an appendix after tree itself. (Default: False)

get_time_range(...)​

Parameters​

  • timestamp_key

subtree(...)​

Creates a TectonDataFrame from a subtree of prior querytree labeled by a node id in .explain().

Parameters​

  • node_id

to_pandas()​

Returns data as a Pandas DataFrame.

Returns​

A Pandas DataFrame.

to_snowpark()​

Returns data as a Snowpark DataFrame.

Returns​

A Snowpark DataFrame.

to_spark()​

Returns data as a Spark DataFrame.

Returns​

A Spark DataFrame.

Was this page helpful?

🧠 Hi! Ask me anything about Tecton!

Floating button icon