cancel
Showing results for 
Search instead for 
Did you mean: 

CAP Projects and Hanatrial

0 Kudos

Hi Folks, I am working on a small CAP project and it's unclear to me how to specify hanatrial as your repository for deployment. I have used the "CF Service" command to create the hdi container on CF. So now that I have the service there, I want to link it to the CAP project so that when I trigger the push it will end up attached to the correct container. However, at the moment in the MTA.yaml file, it is pointing to a default name generated by the cds init command...in my case "Garage-DB"....where/how do I specify the service name so that when I run the build command, it picks up the correct name and places it into the yaml file correctly.

Accepted Solutions (0)

Answers (1)

Answers (1)

qmacro
Developer Advocate
Developer Advocate
0 Kudos

Hi Scott, the configuration that I think you're looking for sits across a couple of files - the main (root) package.json file and the multi target application configuration file mta.yaml. In the former you can add a section for "production", for example, to point to a HANA based persistence layer, while keeping SQLite for non-production, and in the latter you can describe the requirement for a "hanatrial" service. Take a look at exercise 10 of the CodeJam content here which might put that into context for you too.

0 Kudos

Hi DJ, yup. I've taken a look there and indeed exactly as you say you can specify the use of the "hanatrial" service but I just can't seem to see where you specify the name of the actual Hanatrial service that will get created. At the moment, when I generate a project, inside the "Gen" folder, you can see a manifest.yaml file that generates the Hanatrial service name based on the name of the project. Is there a way via configuration to change that generated value?

gregorw
Active Contributor

Hi Dillon,

why would you like to change the name of the HDI container? I think having it named like the whole project is OK. Do you have any existing data in another HDI container? If yes, then use synonyms to access that.

Best regards
Gregor