Forum Discussion
SAP HANA source tables not found using the SAP HANA database connector
Hi,
in my Fabric solution I've created a SAP HANA connection to get data from an on-premise SAP HANA source, specifying the received server, port, user and password for basic authentication.
I can use rightly a such connection in a pipeline and so I can read data from SAP HANA tables having a fixed schemas and a name read from a configuration table.
If I use this SAP HANA connection in a dataflow gen2 I can see only SAP BW cubes not SAP HANA tables, also if I try to search them; moreover, I've noticed that the used port is different respect to 30013 port (single container) and 30015 port (multi-container system database).
Now, any suggests to me in order to solve a such issue, please? Thanks
Regarding this:
There is currently no supported option in Fabric to force Dataflow Gen2 to enumerate raw SAP HANA tablesOne way to query raw SAP HANA tables within a Dataflow Gen 2 is to use the SAP HANA Power Query connector support for native queries. Simply create a native query that can be as simple as "select * from table", and make sure EnableFolding is set to true. Then you can apply operators from the Power Query UX and most will "fold" to the HANA database. It supports parameterized queries (even when EnableFolding is true), as documented here:
https://learn.microsoft.com/en-us/power-query/connectors/sap-hana/overview#native-query-support-in-the-sap-hana-database-connector
Using this approach, you could even join two tables and the join will fold, just keep a look at the query folding indicators to make sure the operations are getting folded.
For example:let SalesNativeQuery = Value.NativeQuery( SapHana.Database(":", [Implementation = "2.0"]), "select ""MAKE"", ""MODEL"", ""CITY"" from ""AN_SALES"" where ""GENDER"" = ? and ""MODEL"" = ?", {"F", "Carretera"}, [EnableFolding = true] ), ProductNativeQuery = Value.NativeQuery( SapHana.Database(":", [Implementation = "2.0"]), "select ""MAKE"", ""PRODUCT_LINE"", ""CATEGORY"" from ""PRODUCT_CATALOG"" where ""CATEGORY"" = ?", {"Bikes"}, [EnableFolding = true] ), Merge = Table.NestedJoin( SalesNativeQuery, {"MAKE"}, ProductNativeQuery, {"MAKE"}, "Product", JoinKind.LeftOuter ), #"Expanded Product" = Table.ExpandTableColumn( Merge, "Product", {"PRODUCT_LINE", "CATEGORY"}, {"Product.PRODUCT_LINE", "Product.CATEGORY"} ) in #"Expanded Product"
5 Replies
- jjgbMicrosoft Employee
Regarding this:
There is currently no supported option in Fabric to force Dataflow Gen2 to enumerate raw SAP HANA tablesOne way to query raw SAP HANA tables within a Dataflow Gen 2 is to use the SAP HANA Power Query connector support for native queries. Simply create a native query that can be as simple as "select * from table", and make sure EnableFolding is set to true. Then you can apply operators from the Power Query UX and most will "fold" to the HANA database. It supports parameterized queries (even when EnableFolding is true), as documented here:
https://learn.microsoft.com/en-us/power-query/connectors/sap-hana/overview#native-query-support-in-the-sap-hana-database-connector
Using this approach, you could even join two tables and the join will fold, just keep a look at the query folding indicators to make sure the operations are getting folded.
For example:let SalesNativeQuery = Value.NativeQuery( SapHana.Database(":", [Implementation = "2.0"]), "select ""MAKE"", ""MODEL"", ""CITY"" from ""AN_SALES"" where ""GENDER"" = ? and ""MODEL"" = ?", {"F", "Carretera"}, [EnableFolding = true] ), ProductNativeQuery = Value.NativeQuery( SapHana.Database(":", [Implementation = "2.0"]), "select ""MAKE"", ""PRODUCT_LINE"", ""CATEGORY"" from ""PRODUCT_CATALOG"" where ""CATEGORY"" = ?", {"Bikes"}, [EnableFolding = true] ), Merge = Table.NestedJoin( SalesNativeQuery, {"MAKE"}, ProductNativeQuery, {"MAKE"}, "Product", JoinKind.LeftOuter ), #"Expanded Product" = Table.ExpandTableColumn( Merge, "Product", {"PRODUCT_LINE", "CATEGORY"}, {"Product.PRODUCT_LINE", "Product.CATEGORY"} ) in #"Expanded Product" - v-hashadapuCommunity Support
Hi pmscorca , Thank you for reaching out to the Microsoft Community Forum.
Although Microsoft Fabric supports an SAP HANA connection in both pipelines and Dataflow Gen2, they do not expose SAP HANA in the same way. When you use the connection in a pipeline, Fabric connects through the HANA SQL interface and behaves like a classic database connector. This is why you can enumerate schemas and read HANA tables directly using the standard SQL ports such as 30013 or 30015.
When you use the same SAP HANA connection in Dataflow Gen2, the experience is driven by Power Query Online. In this context, the connector surfaces analytic and semantic artifacts (such as calculation views or BW style objects) rather than browsing the full transactional table catalogue. As a result, you only see BW cubes or analytic objects and not native HANA tables, even if the credentials and gateway are correct. The different port you observed further confirms that Dataflow Gen2 is not using the HANA SQL engine in the same way as pipelines.
There is currently no supported option in Fabric to force Dataflow Gen2 to enumerate raw SAP HANA tables like a pipeline does. If you need direct access to HANA tables, pipelines are the correct tool. Dataflow Gen2 is better suited once data has already been landed or when working with analytic views rather than transactional tables.
SAP HANA database connector overview - Microsoft Fabric | Microsoft Learn
Extract SAP data to Microsoft Fabric | Microsoft Learn
Set up your SAP HANA database connection - Microsoft Fabric | Microsoft Learn
- pmscorcaKudo Kingpin
Hi, I'd like exploring and querying SAP HANA tables without any data ingestions or mirroring, simply using a SAP HANA connection. As suggested me, I think to use a dataflow gen2 to explore SAP HANA tables operating in Fabric, without using any specific SAP client tools.
Thanks
- v-hashadapuCommunity Support
Hi pmscorca , Thank you for reaching out to the Microsoft Community Forum.
I think you may have drawn wrong conclusion from what I said. Fabric does not currently offer a way to explore or query native SAP HANA tables in a read only, zero copy manner, similar to a SQL client, without ingesting or mirroring data. Although Dataflow Gen2 can connect to SAP HANA, it is designed for data ingestion and transformation via Power Query and for HANA sources it exposes analytic or BW style objects rather than the full set of transactional tables. Pipelines can read HANA tables, but they are also ingestion oriented and do not provide an interactive exploration experience.
So, if you want to simply browse or query SAP HANA tables without landing data in Fabric, that capability does not exist today. For that type of exploration, SAP native or database client tools are still required outside of Fabric.