This is an automated email from the ASF dual-hosted git repository.

kaxilnaik pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/airflow.git


The following commit(s) were added to refs/heads/master by this push:
     new 714a075  Add note in Updating.md about FAB datamodel change (#14478)
714a075 is described below

commit 714a07542c2560b50d013d66f71ad9a209dd70b6
Author: Dr. Dennis Akpenyi <[email protected]>
AuthorDate: Wed Mar 3 01:29:54 2021 +0100

    Add note in Updating.md about FAB datamodel change (#14478)
    
    Use of CustomSQLAInterface instead of SQLAInterface to create custom data 
model.
    
    From Airflow 2.0, if you want to define your own Flask App Builder
    models you need to use CustomSQLAInterface instead of SQLAInterface.
    
    For Non-RBAC replace:
    
    `from flask_appbuilder.models.sqla.interface import SQLAInterface`
    `datamodel = SQLAInterface(your_data_model)`
    
    with RBAC (in 1.10):
    
    `from airflow.www_rbac.utils import CustomSQLAInterface`
    `datamodel = CustomSQLAInterface(your_data_model)`
    
    and in 2.0:
    
    `from airflow.www.utils import CustomSQLAInterface`
    `datamodel = CustomSQLAInterface(your_data_model)`
---
 UPDATING.md | 29 +++++++++++++++++++++++++++++
 1 file changed, 29 insertions(+)

diff --git a/UPDATING.md b/UPDATING.md
index 77bad87..ccd4308 100644
--- a/UPDATING.md
+++ b/UPDATING.md
@@ -417,6 +417,35 @@ executor = my_acme_company.executors.MyCustomExecutor
 
 The old configuration is still works but can be abandoned at any time.
 
+#### Use `CustomSQLAInterface` instead of `SQLAInterface` for custom data 
models.
+
+From Airflow 2.0, if you want to define your own Flask App Builder data models 
you need to use CustomSQLAInterface
+instead of SQLAInterface.
+
+For Non-RBAC replace:
+
+```python
+from flask_appbuilder.models.sqla.interface import SQLAInterface
+
+datamodel = SQLAInterface(your_data_model)
+```
+
+with RBAC (in 1.10):
+
+```python
+from airflow.www_rbac.utils import CustomSQLAInterface
+
+datamodel = CustomSQLAInterface(your_data_model)
+```
+
+and in 2.0:
+
+```python
+from airflow.www.utils import CustomSQLAInterface
+
+datamodel = CustomSQLAInterface(your_data_model)
+```
+
 #### Drop plugin support for stat_name_handler
 
 In previous version, you could use plugins mechanism to configure 
``stat_name_handler``. You should now use the `stat_name_handler`

Reply via email to