Context, Railway Error and Task
Data Context is an object injected into logic functions at runtime, which containes some key components:
Data Context is an object injected into logic functions at runtime, which containes some key components:
Connecting external databases with built-in drivers. Currently the following databases are supported:
For executing a select/action query given by another logic and write the query result (if any) to session storage.
Emit and query LOC data events.
Accessing and writing files. Supports the following storages:
For sending HTTP requests to specific hosts.
LOC SDK is a downloadable NPM package that defines the interfaces of data context as well as agents - a series of features provided by LOC's logic runtime that can read and/or write internal and external storages.
For sharing data between tasks of one data process, which can stay persistent for a period of time.
Log (debugging) messages to LOC.
Read a local environment variable (not to be confused with local storage data or secrets in agent configurations). These variable can be set via Studio or CLI, which are useful for configuring a data process' behavior without modifying the logic code.
Sending emails with a SMTP server.
Payload is a lazy-loaded object which contains metadata and payload data (if any) from a trigger as the initial input of the data process and for determining how the data process is triggered.
Parse trigger payload to JSON and write to the session storage.
Parse QueryString from the HTTP request into an object.
- To create your first data process in LOC.
Finalise a JSON object as the task result data. If the trigger is synchronized API route or message queue, it will be returned to the trigger, otherwise stored in LOC to be retrieved later.
Parse trigger payload to JSON and write to the session storage.
For sharing data between logic during a task (execution) of a data process.