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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
manandhu
New Member

How to Save Custom Connector Credential/Connections into a Local Database(Read/Write) in PowerQuery

Hi everyone,

I’m developing a Power BI custom connector using Power Query SDK and I need to store the user’s connection configurations (Service URL, Username, Password, Connection Notes, etc.) inside a local database so that the connector can:

  1. Read existing saved connections, and

  2. Write new connections into the database.

So far, I can read data from the database using Odbc.Query, but I’m running into issues when trying to INSERT or UPDATE records. It seems that Power Query doesn’t execute non-SELECT statements normally through ODBC, especially with SQLite.

My questions:

  • What is the correct or recommended way to write to a local database from a custom connector?

  • Are there any built-in or default mechanisms in Power Query SDK for persisting user-created connections?

  • Has anyone successfully implemented read/write logic (INSERT/UPDATE/DELETE) inside a custom connector?

  • If so, could you please share a sample implementation?

I want to build behavior similar to “Add Connection” → save into DB → show in navigation list.

Any guidance, best practices, or example code would be greatly appreciated!

Thanks!

3 REPLIES 3
v-echaithra
Community Support
Community Support

Hi @manandhu ,

May I ask if you have resolved this issue? Please let us know if you have any further issues, we are happy to help.

Thank you.

v-echaithra
Community Support
Community Support

Hi @manandhu ,

Thank you @PhilipTreacy  for your inputs.

Just following up to see if the Response provided by community members were helpful in addressing the issue. if the issue still persists Feel free to reach out if you need any further clarification or assistance.


Best regards,
Chaithra E.

PhilipTreacy
Super User
Super User

Hi @manandhu 

 

PQ can't INSERT/UPDATE/DELETE through a connector.

 

To read existign connections you can use Extension.CurrentCredential() 

 

Handling authentication for Power Query connectors - Power Query | Microsoft Learn

 

In your connector you can use things like DataSource.Kind and DataSource.Path which are saved in the PBIX or Service.

 

Using a Data source path for Power Query connectors - Power Query | Microsoft Learn

 

Phil

 

 

 



Did I answer your question? Then please mark my post as the solution.
If I helped you, click on the Thumbs Up to give Kudos.


Blog :: YouTube Channel :: Connect on Linkedin


Proud to be a Super User!


Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.