SAP-archive / sap-devtoberfest-2020

The home of Devtoberfest 2020 - an open celebration of what makes us developers – coding and collaboration!
Apache License 2.0
180 stars 86 forks source link

cds deploy Terminal command doesn't work. #63

Closed gsharan007 closed 3 years ago

gsharan007 commented 3 years ago

Dear Thomas,

I was going through CAP exercise -04 and was trying to deploy file data to SQLite DB but using command cds deploy I get error. In video I can see it works but not now. It could be due to some recent changes. Please let me know how to deploy file data to DB?

user: bookshop $ cds deploy [ERROR] Please specify a database kind or url, e.g.:

cds deploy --to sql
cds deploy --to sqlite
cds deploy --to sqlite:db/my.db

at Object.deploy (/home/user/.node_modules_global/lib/node_modules/@sap/cds-dk/bin/deploy/index.js:63:44)
at Object.exec (/home/user/.node_modules_global/lib/node_modules/@sap/cds-dk/bin/cds.js:30:17)
at Module.module.exports.Object.assign._ [as exports] (/home/user/.node_modules_global/lib/node_modules/@sap/cds-dk/bin/cds.js:65:49)
at Object.<anonymous> (/home/user/.node_modules_global/lib/node_modules/@sap/cds-dk/bin/cds.js:73:29)
at Module._compile (internal/modules/cjs/loader.js:778:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
at Module.load (internal/modules/cjs/loader.js:653:32)
at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
at Function.Module._load (internal/modules/cjs/loader.js:585:3)
at Function.Module.runMain (internal/modules/cjs/loader.js:831:12)
maxstreifeneder commented 3 years ago

Hi @gsharan007,

could you please try cds deploy --to sqlite:bookshop.db?

Cheers, Max

gsharan007 commented 3 years ago

Hi @maxstreifeneder ,

Thank you for quick reply, It worked !

Just wanted to know.. is there any way to deploy or move data from file to DB without using cds deploy? please advise.

Thanks Gaurav

jung-thomas commented 3 years ago

@gsharan007 if you are deploying to HANA you can of course call the HDI Deployer directly without using cds deploy as well. That's really what the cds deploy is calling internally anyway.