Automated creation of EntitySets from relational data stored in SQL databases
The featuretools_sql
library allows you to directly import your relational data into Featuretools to run automated feature engineering.
Install with pip:
python -m pip install "featuretools[sql]"
or from the Conda-forge channel on conda:
conda install -c conda-forge featuretools
Simply pass in the database connection information:
from featuretools_sql.connector import DBConnector
sql_connector = DBConnector(
system_name = "mysql",
host = "127.0.0.1:3306"
user = "root",
password = "password",
database = "db"
)
entityset = sql_connector.get_entityset()
The entityset
object will have the relationships
and DataFrames
already populated, allowing you to call featuretools.DFS and run automated feature generation.
import featuretools as ft
feature_defs, feature_matrix = ft.dfs(
entityset=entityset,
target_entity='target_table_name'
)
We currently supports importing data from the following relational database systems:
MySQL
PostgreSQL
Snowflake
The Featuretools community is happy to provide support to users. Project support can be found in four places depending on the type of question:
- For usage questions, use Stack Overflow with the
featuretools
tag. - For bugs, issues, or feature requests start a Github issue.
- For discussion regarding development, use Slack.
- For everything else, the core developers can be reached by email at [email protected]
featuretools_sql
is an open source project maintained by Alteryx. To see the other open source projects we’re working on, visit Alteryx Open Source. If building impactful data science pipelines is important to you or your business, please get in touch.