Importing external edmx files to your CAP project using the CDS Graphical Modeler
In this blog post, we will demonstrate how to import external edmx files into CDS model and expose the entities defined in the edmx file as projections.
Importing EDMX Files into the CDS Model
Suppose you have downloaded API_BUSINESS_PARTNER.edmx file from https://api.sap.com/api/API_BUSINESS_PARTNER/overview, and you would like to use it as an external file in your CAP project. First open your cds service model srv/cat-service.cds using the CDS Graphcal Modeler:
Now drag the edmx file from the file explorer into the CDS Graphical Modeler, and you will see below import dialog:
Click OK button to dismiss the dialog. Now you will be able to see the imported namespace from the edmx file in the graphical modeler:
We can now create a projection for the entities defined in the edmx file:
In this blog post, we demonstrate how to import an external edmx file downloaded from https://api.sap.com and import it to the CDS model in your CAP project through the CDS Graphical Modeler, and we also demonstrate how to create a projection for a entity defined in the external edmx file after the file is imported.
HI Xiao-fei, I tried importing the EDMX file but it doesn't work. do we need an extension for this ?
What kind of error did you see? Where did you download the EDMX file?