-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue: FAB cannot read tables with primary key columns with spaces #2152
Comments
Seems like primary keys with different names then their model fields is not supported. I'll try to find time to fix/support this. |
Thank you @dpgaspar for such prompt reply 👍 . You are 100% right in pointing out the underlying issue, which is not quite to do with whitespace. F.A.B doesn't support if I change line #25 to In our case, our source EDW holds thousands of tables with columns named like [Primary key x], [Column name x] which makes impossible for me to change the underlying column names. Plus there is an increasing popularity of using space as naming convention due to how MS SQL server handles metadata for Power BI. I have been scratching my head for days trying to have a workaround so I am very excited to hear that this feature is going to be supported....! |
I have some existing MS SQL server tables that I need to migrate from Flask-admin to Flask-appbuilder. These tables contain columns with spaces such as [Column name 1], [Column name2].
While the app is working fine with flask-admin and SQLalchemy, I realised that the primary key column with such naming convention doesn't work with F.A.B
Environment
Flask-Appbuilder version:
Flask-AppBuilder==4.3.9
pip freeze output:
werkzeug==2.3.7
Flask-AppBuilder==4.3.9
Describe the expected results
The F.A.B should display a table with three columns as shown in the script below.
Tell us what should happen.
The line #23 in the script below is the cause of the issue. After replacing it with line #24, the problem goes away. However, we cannot change the naming convention from
Primary key 1
toprimary_key_1
as this is the convention used in the EDW.Steps to reproduce
pip install -r requirements.txt
using therequirements.txt
provided belowpython app.py
requirements.txt
app.py
The text was updated successfully, but these errors were encountered: