Xcall now supports array inputs
Xcall now supports array inputsPreviously, Xcall users could only make one API call per user-defined function, and each input and output needed to be defined individually. This made Xcalls for models with multiple inputs and outputs somewhat complicated to set up and especially challenging to debug. Now that Xcall works as an array function, users can select multiple input names and values at the same time, and Xcall will match the inputs and the values based on their position. This means you can make multiple Xcalls from a single UDF! You can also specify your output template as an array, drastically simplifying your Xcall UDFs. For example, let’s say you have a model with 13 inputs and 7 outputs. Previously, running 10 scenarios through this model would have required setting up 28+ parameters for each output and resulted in 70 UDFs. Using arrays, the same result can be achieved using a single UDF and only 4 parameters. Execute API v4This month, we’re excited to roll out a new version of our Execute API! Version 4 can ingest multiple inputs simultaneously and provide all of the results in one response. This significantly reduces processing time compared to v3. This version is ideal for handling up to several thousand inputs, however for truly massive amounts of data, we recommend using our new Batch API. Please see below for an explanation of the differences between the two APIs. Introducing Batch!Our new Batch API allows you to process large numbers of inputs in parallel, thus speeding up processing time significantly. With Batch you can submit huge numbers of inputs (without running into rate limits) and add additional inputs (in chunks of varying sizes) before closing the batch and getting your results. You can also choose to get results as soon as they’re ready if you prefer. Depending on the size of the data payload, Batch uses cloud technology to scale horizontally, adding additional computing power to handle the volume.To understand the differences between v3 and v4 Execute API and Batch, imagine submitting API requests to Spark like sending vehicles through a toll booth. Using Execute v3, each input is one passenger, each is driving their own car and must pay their own toll. Everyone gets through, but it can take quite a while if there’s a lot of traffic. Using Execute v4, each input is still a passenger, but now they’re all on a bus together and the bus driver pays the toll collectively. As a result, everyone gets through much faster than if they were in their own cars, but only one bus gets through at a time. Batch, on the other hand, is like driving a caravan through a toll plaza. The first vehicle calls ahead to let the toll plaza know they’re coming and the plaza agrees to open up as many toll booths as possible, letting all of the busses, cars, and trucks through simultaneously. Once the last vehicle has passed through, the additional lanes are all closed down. Python SDKOur new Python SDK gives developers everything they need to integrate our v3 and v4 Execute APIs and our Batch API into their code. The Python SDK makes using Batch a breeze. After importing the package and configuring a few variables, you can create a batch and add data to it with just two lines of code. The SDK also includes tools to receive all results and close the batch, receive partial results as they become available, add additional inputs, get information about or check the status of a batch, and close or cancel a batch. Contact your Customer Success representative to request access to the Python SDK.# Example code snippet:# Create a Batch from Spark and add data to the batch# If successful, batch_execute will return a Batch instancebatch = sdk.Service.batch_execute(input=list[dict] | pd.DataFrame , meta=object)# Get all the results from the batchresults = batch.get_all_results()print(results) Other changes Following last month’s new feature allowing admins to set an expiration date for user access, we’ve also improved some of the behaviors surrounding this. Now, as soon as a user is given tenant administrator rights, any expiration date set for them is automatically removed. Because a tenant administrator's access can never expire, the option to set this up also disappears from the Edit User screen. Small inconsistencies in metadata have been removed between the Testing, Integration, and Documentation tabs in the API Tester. For enhanced security and to enforce best practices, supervisor:pf will now no longer appear for selection in the “User Groups” section when setting up API Key Groups. Instead of creating one key with universal rights, tenant admins should create new API keys for specific purposes, following the principle of least privilege. This change does not affect existing API key groups.