SAP-samples / data-warehouse-cloud-connectors

Connecting third party clients to SAP Data Warehouse Cloud.
Apache License 2.0
11 stars 4 forks source link

Error for connection to analytical models #15

Closed sknoepfler closed 11 months ago

sknoepfler commented 12 months ago

Issue Description:

With the release of SAP Datasphere 2023.25, "Analytic Models" are now accessible through the OData API ("The analytic model is now exposed for analytic access and the catalog service to the OData API.")

Problem: The analytical model appears correctly in the "SAP Datasphere - Catalog (1.50) (Beta)" connector. But when attempting to connect to it with the "SAP Datasphere - Data (1.50) (Beta)"-connector, the following error is encountered:

"We cannot convert the value null to type Text."

It's worth noting that

ghost commented 12 months ago

Hi sknoepfler,

the version currently published access views in "relational" mode (see docu here).

Background: This mode works for relational views and for analytical dataset (they always generate a relational and an analytical artefact). The Analytical model comes only with an analytical artefact - and hence can't be reached via the current OData connector.

Current Workaround: Change the access path of the odata connector from relational to analytical. With the analytical access, it should be possible to read Analytical Datasets and Analytical Models. Be aware that the result set might be different, as the analytical access will aggregate data. In case you just retreive a subset of columns, you will see a reduced number of rows and measures showing aggregated values. Relational views only can't the accessed any more.

How to Implemenent: Unzip the connector file, open the file with source code and search for /relational/ - replace it with /analytical/

An updated version is in preparation,

Best regards, Olaf

sknoepfler commented 11 months ago

Hi @OlafFischer

Thank you for your response. I recently installed the new version of the connector, but I am unable to find the connector in Power BI following the installation instructions.

I noticed that there is a file named "dwc.m" that is only available in the newer version. When I omit this file from the ".mez" file, the connector appears but does not work with analytical models.

I was wondering if there are any specific guidelines or considerations to be aware of when installing the new version of the connector that I may have missed.

Thank you for your help.

Kind regards,

Sven

ghost commented 11 months ago

Hi Sven, I have updated the connector to version 1.70. As described in the installation instructions, download all files of the folder , adjust the connection.json configuration. Once done, zip all files (only the files - not the folder itself) and change the type to .mez. The result is the new version of the custom connector. Have you followed these steps? Best regards, Olaf

sknoepfler commented 11 months ago

Hi Olaf,

yes I have followed alle these steps.

To be sure, i followed them once for 1.5 where it worked flawlessly. And then again with 1.7, where the connector just does not appear in my case.

Kind regards Sven

sknoepfler commented 11 months ago

Hi Olaf,

just tested version 1.70 on another computer, same problem here. I cannot get it to appear in PowerBI.

Kind regards Sven

sknoepfler commented 11 months ago

Hi Olaf,

I got a step further after the following steps:

  1. deleting file dwc.pq
  2. renaming file dwc.m to dwc.pq
  3. zip all the files and rename it to .mez

Now the connector appears as version 1.7. in PowerBI

I can successfully connect with a relational dataset.

But when I try to connect to an anayltical model, the following error message appears:

Details: "Microsoft.Mashup.Engine1.Library.Resources.HttpResource: Fehler bei der Anforderung: OData-Version: 3 und 4, Fehler: Der Remoteserver hat einen Fehler zurückgegeben: (500) Interner Serverfehler. (Internal Server Error Error: Result cannot be empty) OData-Version: 4, Fehler: Der Remoteserver hat einen Fehler zurückgegeben: (500) Interner Serverfehler. (Internal Server Error Error: Result cannot be empty) OData-Version: 3, Fehler: Der Remoteserver hat einen Fehler zurückgegeben: (500) Interner Serverfehler. (Internal Server Error Error: Result cannot be empty)"

Any idea, what I might be doing wrong?

Thanks and kind regards Sven

ghost commented 11 months ago

Hi Sven, I seems that uploaded an inconsistent state - I will check to provide an update hopefully today, Best regards, Olaf

EmmJayJay commented 11 months ago

Hi Olaf,

I got a step further after the following steps:

  1. deleting file dwc.pq
  2. renaming file dwc.m to dwc.pq
  3. zip all the files and rename it to .mez

Now the connector appears as version 1.7. in PowerBI

I can successfully connect with a relational dataset.

But when I try to connect to an anayltical model, the following error message appears:

Details: "Microsoft.Mashup.Engine1.Library.Resources.HttpResource: Fehler bei der Anforderung: OData-Version: 3 und 4, Fehler: Der Remoteserver hat einen Fehler zurückgegeben: (500) Interner Serverfehler. (Internal Server Error Error: Result cannot be empty) OData-Version: 4, Fehler: Der Remoteserver hat einen Fehler zurückgegeben: (500) Interner Serverfehler. (Internal Server Error Error: Result cannot be empty) OData-Version: 3, Fehler: Der Remoteserver hat einen Fehler zurückgegeben: (500) Interner Serverfehler. (Internal Server Error Error: Result cannot be empty)"

Any idea, what I might be doing wrong?

Thanks and kind regards Sven

Hi Sven. I encountered that error on the 1.50 version with the manual fix for analytic models. I re-deployed the analytic model and the error went away.

sknoepfler commented 11 months ago

@EmmJayJay Thank you very much for your hint. That helped! I can access now analytical models with the version 1.7.

ghost commented 11 months ago

Hi Sven, the repo contained files of the project definition and of the build output of the connector at the same time. I have deleted all unwanted files and tested the remaining list. It worked on development machine. Could you please verify this as well? Thanks a lot and sorry for the inconvenience, Olaf

ghost commented 11 months ago

Please re-open the issue if the problem still persists. Best regards, Olaf

sknoepfler commented 11 months ago

@OlafFischer : it works perfectly fine now, thank you Olaf!