Introduction to XConnector
XConnector is an integration pattern that allows Spark services to interact with external applications or services.
Unlike traditional Spark services, where execution logic is derived directly from an Excel model and compiled into a WebAssembly module, the XConnector pattern enables Spark to invoke externally hosted code outside of the Spark platform. This allows organizations to integrate Spark calculations with existing systems, custom logic, and external data sources while maintaining a consistent API interface through Spark. Because execution occurs outside the Spark platform, ownership and operational responsibility for that external code lies with the customer.
Spark acts as an integration layer that forwards requests to an external application.
XConnector as an integration pattern
Traditional Spark services operate as follows:
With the XConnector integration pattern Spark:
Defines the API structure.
Maps inputs and outputs.
Forwards requests to an external system.
The actual execution logic runs outside of the Spark platform in a remote application.
Use cases
XConnector is an extremely powerful capability when combined with existing Spark services. Code written in programming languages (such as C#, Node.js, or Python) can be executed, with results returned to Spark.
Recommended use cases:
Provide consistent access to internal and external calculations and/or data for Spark users in Excel via Coherent Assistant.
Deploy knowledge produced in Excel and Python using consistent API structures.
Incorporate external data as part of the logic for an existing Spark service.
Centralize a conditional multiple step process using Spark services that orchestrate other Spark services and external data.
Architecture and information flow
Client application invokes a Spark API endpoint and sends input data.
Spark evaluates the Spark XConnector service configuration associated with the service.
Spark constructs an HTTP request containing the input payload and authentication token.
Request is sent to the proxy service.
Proxy service validates the request and forwards to the Remote application.
Remote application processes the request and returns a response.
Response is returned through the Proxy service and Spark back to the client application.
Spark acts as an orchestration layer, while the remote application performs the actual computation.
Spark XConnector service
An XConnector service in Spark resembles a standard Spark service but has a different purpose. Instead of executing a WebAssembly module derived from an Excel model, the service is used to:
Define the input and output schema.
Configure the remote service endpoint.
Forward requests to the external service.
The Excel workbook associated with the XConnector service is typically used only to define input and output mappings (see Tutorial: Map inputs and outputs) as well as XConnector configurations. No computational logic needs to exist in the workbook. From the perspective of a client application, the XConnector service behaves like a normal Spark API endpoint.
Remote application
The remote application is the system that performs the actual computation. It must expose an HTTPS endpoint that can:
Accept JSON input.
Execute business logic.
Return JSON output.
Proxy service
Place a proxy or API gateway between Spark and the Remote application. The proxy service acts as a secure relay between Spark and the remote application.
Authentication and authorization validation.
Token issuer validation.
Rate limiting and traffic control.
Request transformation.
Monitoring and logging.
Protection of internal infrastructure.
Shared responsibility model
Because the XConnector architecture involves systems outside the Spark platform, responsibilities are divided between Coherent and the customer. Spark provides the integration mechanism, but external systems remain under the customer’s operational control.
Spark platform
✅ Responsible
Spark API infrastructure
✅ Responsible
Infrastructure hosting remote services
✅ Responsible
Secrets, API keys, and credentials
✅ Responsible
Compliance and regulatory controls
✅ Responsible
Last updated
