How to pass dynamic parameters to a prebuilt connector

Hi, 

we need to call a prebuilt (standard) connector where the the date range "start_date" is not at fixed distance from the "end_date". 

For example : "Last Week" is different from "Last 7 days", ok?.

So, is there a way to call the connector not directly from the schedule, but from a program (a script) where I have set up the logic to define the date range?

I don't want to define a fully custom connector, but just wish to define only the interface to call the prebuilt connector.


Thanks.


Stefano G.

Tagged:

Best Answers

  • MarkSnodgrass
    MarkSnodgrass Portland, Oregon 🥷
    Answer ✓

    @GrantSmith has more direct API experience than I do and he might have done this before. Grant, do you have an example that you might be able to share?

    **Make sure to <3 any users posts that helped you.
    **Please mark as accepted the ones who solved your issue.
  • GrantSmith
    GrantSmith Indiana 🥷
    Answer ✓

    @StefanoG

    So there isn't a "supported" API call via the CLI or pydomo that will do what you're asking. I'm assuming the connector has a start / end date that you're wanting to call but essentially you'd need to make two API calls, one to update the connector definition via JSON request and then another to run the connector. I don't know what connector you're attempting to use but if you right click on the connector page (before you hit save) and select Inspect / Inspect Element and then select the network tab you can see what API requests are being made to Domo. You then just find the one that's saving the definition and make sure to change the parameters to the values you're wanting. Then you can click "Run Now" and see what API call is being made for that request and call that as part of your script. The limitation being that your connector needs to be able to accept the request you give it as a potential option.

    Fair warning: These are all unsupported and can change at any time. Use at your own risk.

    **Was this post helpful? Click Agree or Like below**
    **Did this solve your problem? Accept it as a solution!**

Answers

  • MarkSnodgrass
    MarkSnodgrass Portland, Oregon 🥷

    I would suggest looking into two different options, leveraging the Domo API or using the Java CLI tool:

    Here's a link to the API documentation:https://developer.domo.com/

    Here's a link to the Java CLI Tool: https://domohelp.domo.com/hc/en-us/articles/360043437733-Command-Line-Interface-CLI-Tool

    Hopefully one of these works for you.

    **Make sure to <3 any users posts that helped you.
    **Please mark as accepted the ones who solved your issue.
  • Hi Mark,

    two questions, from https://developer.domo.com/ I haven't seen an API to script a code to execute with schedule to call the connectow with custom parametes

    The commands of the CLI Tool are for execute a command from a client machine, not for submit a script that call the connector.

    Or at least that's what I see.


    The easiest thing would be the possibility to have a wrapper for a prebuilt connector, so You don't need to build another one for these simple things.


    Stefano

  • Hi @GrantSmith

    This is near at what I wish to have. I wish a wrapper to schedule a standard connector (i.e. /appstore/connectors/com.domo.connector.adobeanalyticsv2.jwt) where the date range is not "last X days", but is calculated by the wrapper

    A kind of custom connector where as service I call the API of the standard connector. 

    But I must do this not as POC so I can't take the risk of:

    "These are all unsupported and can change at any time".

    So i will wait that DOMO thinks about a this kind of feature a maybe give us this opportunity in one of the next releases.

    Thanks