Manage your data source - SAP HANA


We've split the on-premises data gateway docs into content that's specific to Power BI and general content that applies to all services that the gateway supports. You're currently in the Power BI content. To provide feedback on this article, or the overall gateway docs experience, scroll to the bottom of the article.

After you install the on-premises data gateway, you need to add data sources that can be used with the gateway. This article looks at how to work with gateways and SAP HANA data sources that are used either for scheduled refresh or for DirectQuery.

Add a data source

For more information about how to add a data source, see Add a data source. Under Connection type, select SAP HANA.

 Screenshot of Add the SAP HANA data source.

After you select the SAP HANA data source type, fill in the Server, Username, and Password information for the data source.


All queries to the data source run using these credentials. To learn more about how credentials are stored, see Store encrypted credentials in the cloud.

 Screenshot of Filling in the data source settings.

After you fill in everything, select Create. You can now use this data source for scheduled refresh or DirectQuery against an SAP HANA server that is on-premises. You see Created New data source if it succeeded.

 Screenshot of Displaying the connection status.

Advanced settings

Optionally, you can configure the privacy level for your data source. This setting controls how data can be combined. It's only used for scheduled refresh. The privacy-level setting doesn't apply to DirectQuery. To learn more about privacy levels for your data source, see Set privacy levels (Power Query).

 Screenshot of Setting the privacy level.

Use the data source

After you create the data source, it's available to use with either DirectQuery connections or through scheduled refresh.


The server and database names must match between Power BI Desktop and the data source within the on-premises data gateway.

The link between your dataset and the data source within the gateway is based on your server name and database name. These names must match. For example, if you supply an IP address for the server name within Power BI Desktop, you must use the IP address for the data source within the gateway configuration. If you use SERVER\INSTANCE in Power BI Desktop, you also must use it within the data source configured for the gateway.

This requirement is the case for both DirectQuery and scheduled refresh.

Use the data source with DirectQuery connections

Make sure that the server and database names match between Power BI Desktop and the configured data source for the gateway. You also need to make sure your user is listed in the Users tab of the data source to publish DirectQuery datasets. The selection for DirectQuery occurs within Power BI Desktop when you first import data. For more information about how to use DirectQuery, see Use DirectQuery in Power BI Desktop.

After you publish, either from Power BI Desktop or Get Data, your reports should start to work. It might take several minutes after you create the data source within the gateway for the connection to be usable.

Use the data source with scheduled refresh

If you're listed in the Users tab of the data source configured within the gateway and the server name and database name match, you see the gateway as an option to use with scheduled refresh.

Screenshot displays the users in the Gateway connection dialog.

More questions? Try asking the Power BI Community.