restcurlgoogle-cloud-platformgoogle-cloud-data-fusioncdap

CDAP API Calling in GCP failing


I am trying to create a sample Pipeline in my Data Fusion instance, as part of my Project POC. I am using CDAP API for automate the pipeline creation. I am facing issue while calling below CDAP API in GCP,

curl -H "Authorization: Bearer $(gcloud auth print-access-token)" -w"\n" -X PUT "[My-GCP-Data-Fusion-Endpoint]/v3/namespaces/default/apps/MyPipeline" -H "Content-Type: application/json" -d @/home/saji_s/config.jason

The content in config.jason is,

{ "name": "MyPipeline", "artifact": { "name": "cdap-data-pipeline", "version": "6.0.0", "scope": "system" }, "config": { . . . "connections": [ . . . ], "engine": "mapreduce", "postActions": [ . . . ], "stages": [ . . . ], "schedule": "0 * * * *", }, "ui": { . . . } }

I am getting Error Like, " Error 400 (Bad Request)!!1 "

Could you please help me here, I just want to create a sample Pipeline in my Data Fusion instance, as part of my Project POC.


Solution

  • The issue resolved, the issues was with the jason file and after preparing the correct jason file the scipt executed and the pipeline deployed successfully