First published on TECHNET on Aug 02, 2018 This post is a contribution from Jing Wang, an engineer with the SharePoint Developer Support team
Recently I worked with two customers who wanted to show their external data on SharePoint Online web sites, one from on-premise SQL Database and one from their secured internal data source. They did not want to migrate their SQL Database to SQL Azure.
We researched for few possible options and chose the most feasible, easy to implement and secure solution - "Create custom OData WCF service accessing external data source and generate BDC external content type through SharePoint hosted Add-in.". Note this solution will also work for SharePoint On Premises but is especially suitable for SharePoint Online as we have some constraints on the kind of customization that can be done in SharePoint Online.
Here is the high level overview of the steps involved: