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.
Best Answers
-
@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?
**Check out my Domo Tips & Tricks Videos
**Make sure to any users posts that helped you.
**Please mark as accepted the ones who solved your issue.0 -
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!**2
Answers
-
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.
**Check out my Domo Tips & Tricks Videos
**Make sure to any users posts that helped you.
**Please mark as accepted the ones who solved your issue.1 -
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
0 -
@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?
**Check out my Domo Tips & Tricks Videos
**Make sure to any users posts that helped you.
**Please mark as accepted the ones who solved your issue.0 -
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!**2 -
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
0
Categories
- All Categories
- 1.8K Product Ideas
- 1.8K Ideas Exchange
- 1.5K Connect
- 1.2K Connectors
- 297 Workbench
- 6 Cloud Amplifier
- 8 Federated
- 2.9K Transform
- 100 SQL DataFlows
- 614 Datasets
- 2.2K Magic ETL
- 3.8K Visualize
- 2.5K Charting
- 729 Beast Mode
- 53 App Studio
- 40 Variables
- 677 Automate
- 173 Apps
- 451 APIs & Domo Developer
- 45 Workflows
- 8 DomoAI
- 34 Predict
- 14 Jupyter Workspaces
- 20 R & Python Tiles
- 394 Distribute
- 113 Domo Everywhere
- 275 Scheduled Reports
- 6 Software Integrations
- 121 Manage
- 118 Governance & Security
- Domo Community Gallery
- 32 Product Releases
- 10 Domo University
- 5.4K Community Forums
- 40 Getting Started
- 30 Community Member Introductions
- 108 Community Announcements
- 4.8K Archive