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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
ozmike
Resolver I
Resolver I

Using Source = SapHana.Database(ServerName ,Query ),

Hi does anyone know how to select from using this method?

 

SapHana.Database(ServerName ,Query ),

 

 

 

 

 

 

1 ACCEPTED SOLUTION

let
Source = SapHana.Database("myhanaserver:12345",
[Query="select ""mycolumn"" from ""ZXXX.ZXXX_REP.bp::BPAddresses2"""])
in
Source

 

 Note the above syntax will work..

 

If you get this error

DataSource.Error: ODBC: ERROR [S1000] [SAP AG][LIBODBCHDB DLL][HDBODBC] General error;260 invalid column name: Business Partner: line 1 col 8 (at pos 7)
Details:
    DataSourceKind=SapHana
    DataSourcePath=xx:123
    OdbcErrors=Table

 

 Note SAP hana internal names don't have spaces so

 

""my column"" should be ""mycolumn""

 

This is because Power Bi displays the SAP HANA column "label" not the column name, so you may need to ask a SAP hana developer the actual column name its not always a simple case of removing spaces.

 

Does anyone know if you can select form the system catalogs to get the real column names? and what is the HANA SQL?

View solution in original post

3 REPLIES 3
dexterz
Helper II
Helper II

you should create sap hana info-view

Sorry don't have write access to SAP-HANA..

 

Thats why I need this method..

let
Source = SapHana.Database("myhanaserver:12345",
[Query="select ""mycolumn"" from ""ZXXX.ZXXX_REP.bp::BPAddresses2"""])
in
Source

 

 Note the above syntax will work..

 

If you get this error

DataSource.Error: ODBC: ERROR [S1000] [SAP AG][LIBODBCHDB DLL][HDBODBC] General error;260 invalid column name: Business Partner: line 1 col 8 (at pos 7)
Details:
    DataSourceKind=SapHana
    DataSourcePath=xx:123
    OdbcErrors=Table

 

 Note SAP hana internal names don't have spaces so

 

""my column"" should be ""mycolumn""

 

This is because Power Bi displays the SAP HANA column "label" not the column name, so you may need to ask a SAP hana developer the actual column name its not always a simple case of removing spaces.

 

Does anyone know if you can select form the system catalogs to get the real column names? and what is the HANA SQL?

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.