to_sql¶
-
Features.
to_sql
(targets=True, subfeatures=True)[source]¶ Returns SQL statements visualizing the features.
- Args:
- targets (boolean):
Whether you want to include the target columns in the main table.
- subfeatures (boolean):
Whether you want to include the code for the subfeatures of a snowflake schema.
Examples:
my_pipeline.features.to_sql()
- Raises:
- IOError: If the pipeline could not be found
on the engine or the pipeline could not be fitted.
- KeyError: If an unsupported instance variable is
encountered.
TypeError: If any instance variable is of wrong type.
- Returns:
SQLCode
Object representing the features.
- Note:
Only fitted pipelines (
fit()
) can hold trained features which can be returned as SQL statements. The dialect is based on the SQLite3 standard.