Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

Reply
Anonymous
Not applicable

SQLite Imports

Hello all,

 

I am currently working on a database modeling project with Power BI and SQLite. My goal is to have my SQLite database relationships (which I import through ODBC) modeled by exclusively using the primary & foreign keys of the database once it is imported.

 

I have a number of fields accross database tables with similar names so I turned off the autodetect relationship setting inside of the Data Load menu to prevent automatic relationships between these:

1.PNG

 

However, once I load the data with this setting turned off, no relationships are created between my tables:

2.PNG

I also ensured that my ODBC data source has foreign keys enabled:

3.PNG

 

Since SQLite wasn't working how I expected, I wanted to try this same database out with MySQL. I turned off the same Data Load setting and it seemed to import the primary/foreign key relationships without a problem:

4.PNG

I've been searching around in the Power BI Community for answers related to this problem, but I have yet to find a solution. Ideally, I'd like to keep using SQLite since it is compact and doesn't rely on a running server like MySQL. If anyone has any thoughts or suggestions on how I may resolve this issue it would be much appreciated.

 

Thank you!

2 REPLIES 2
QuantDev1984
Regular Visitor

I have the same issue where Power BI does not recognise the foreign key relationships.  I think it might be related to having a primary key (which the foreign keys link to) in one table that is recognised as decimal instead of integer. The create table statement for that column is defined as "MetaID INTEGER PRIMARY KEY AUTOINCREMENT,"  so I'm not sure why Power BI thinks its a decimal.  Other tools that open the database don't make this error. 

V-lianl-msft
Community Support
Community Support

Hi @Anonymous ,

 

According to my attempt, I can't reproduce your issue.Power BI Desktop will try to find existing relationships in the tables that are about to be imported.

 

Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors