kaxil commented on PR #24613: URL: https://github.com/apache/airflow/pull/24613#issuecomment-1164774673
> > Question: Do we want this model to be used directly in DAGs by authors, or do we want a different class to be used there? > > Main reason we might want to avoid using this: > > > > * Loading SQLA and all of the models is slow (Airflow does this right now at "boot" anyway, but I am working on making that not be the case) > > * The import path (`airflow.models.dataset`) though we can fix that with a lazy import in `airflow/__init__.py` like we do DAG and XComArg. > > I don't have a strong opinion about it but I don't think think the speed of the import right now is at all close to "problematic" for the dag author experience. And yeah we can add that import. But you tell me, what do you think? You would add Dataset and DatasetModel, like is done with DAG now? Where would you locate the dataset class? I would slightly favour a separate `DatasetModel` and `Dataset` so `Dataset` becomes an extensible class, and `DatasetModel` just stores the info about the class. So users don't need to care about SQLAlchmey stuff when extending it. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
