For the complete documentation index, see llms.txt. This page is also available as Markdown.

Sub functions with subservices

Syntax: Xinput_<subservice>.<parameter> and Xoutput_<subservice>.<parameter>

You can separate different groups of calculations into sub functions known as subservices. This is powerful because a Spark service can now perform multiple separate calculations through the same integration.

Sample file

PRODUCT subservice, result = PRODUCT(a, b)
SUM subservice, result = SUM(c, d)

Xinput_product.a

Xinput_sum.c

Xinput_product.b

Xinput_sum.d

Xoutput_product.result

Xoutput_sum.result

Submit API requests for subservices in the API Tester

  1. The Customize the request, has a dropdown for Subservices.

    • If a Spark service has subservices, a dropdown is visible with Default as the default value. Inputs and outputs not mapped to a subservice are assigned to the Default subservice.

  2. Use the dropdown to select which subservices to include in the API call. The request_meta parameter service_category will be updated.

  3. Spark filters the displayed inputs and outputs based on the selected subservices.

  4. Make changes to the inputs.

  5. Submit the API call.

  6. Note that the response will only contain the outputs for the selected subservice(s).

Metadata subservice

Syntax: Xoutput_metadata.<parameter>

Use the metadata subservice together with the Metadata APIs for static data that doesn't change when inputs change. This subservice is much faster than using the full Execute API, since it does not perform any calculations.

The metadata outputs should only contain static data.

  • If the metadata output contains a formula, Spark will evaluate it upon upload and save the value.

  • However, any other subservices that depend on cells marked as metadata will still evaluate the underlying formula.

Last updated