How can i use Macro to pass JDBC Driver name in Database operator stage in Datafusion

32 Views Asked by At

I'm trying to use the Data fusion Database stage to connect to a SAP HANA db. I imported the jdbc driver and as shown in the image I attach, it is now possible to select the jdbc driver name just imported (in this case SAP_HANA). This way everything works. However, I need to create a dynamic pipeline and I would like to use the macros for the JDBC Driver Name instead of selecting it from the drop list. I configured an argument setter and created a json with a type.driver parameter containing the string 'SAP_HANA'. I tried passing the argument inside the JDBC Driver Name parameter of the stage database by inserting ${type.driver} but it doesn't work. Why does it only work by selecting SAP_HANA from the dropList? Has anyone tried to do something similar?

I imported the jdbc driver and as shown in the image I attach, it is now possible to select the jdbc driver name just imported (in this case SAP_HANA). This way everything works. However, I need to create a dynamic pipeline and I would like to use the macros for the JDBC Driver Name instead of selecting it from the drop list. I configured an argument setter and created a json with a type.driver parameter containing the string 'SAP_HANA'. I tried passing the argument inside the JDBC Driver Name parameter of the stage database by inserting ${type.driver} but it doesn't work. Why does it only work by selecting SAP_HANA from the dropList? Has anyone tried to do something similar?

1

There are 1 best solutions below

0
On

Have you successfully attached the image? I could not see it from the question. Could you please try uploading it again?

Currently I believe dynamic jdbc driver using macros is not supported in Data Fusion. In order deploy a pipeline, it needs to pass validation and be certain about the jdbc driver to use at the Database stage.

You can please try using Conditional in Conditions and Actions in the pipeline studio and put desiring conditional checks to choose which jdbc driver to use.