Export data

Export data from the Exabel platform

The Exabel SDK exposes signal exports backed by the v2 export endpoint (POST /v2/export/signals). This page documents export_signals_v2, which is the recommended path for most use cases. For lower-level access — raw bytes via export_signals_v2_bytes() or unflattened multi-level columns via run_export_signals_v2() — see the Exabel SDK reference.

The export signals endpoint can provide the following:

  • address entities by resource name via the entities parameter
  • evaluate multi-time-series signals (one column per child entity)
  • mix saved library signals and ad-hoc DSL expressions in one request
  • export several signals across several entities (or tags) in one request
📘

Requires pyarrow

The v2 endpoints serialize over parquet. Install the optional [export] extra to pull pyarrow in:

pip install 'exabel[export]'

pyarrow is required by export_signals_v2() and run_export_signals_v2(), which deserialise the parquet response into pandas. export_signals_v2_bytes() writes the raw response straight to disk without parsing it, so it works without pyarrow for every file_format.

The following examples assume the client is instantiated like this:

from exabel import ExabelClient

client = ExabelClient()

export_signals_v2

export_signals_v2(
    signals,
    *,
    start_time,
    end_time,
    entities=None,
    tags=None,
    version=None,
) -> pd.DataFrame

Parameters

ParameterNotes
signalsOne signal label, an inline DerivedSignal, or a list of either. A plain string is interpreted as the label of a derived signal saved in your library; a DerivedSignal lets you specify an inline DSL expression with a label that becomes the column header. At least one signal must be provided.
start_timeFirst date to retrieve data for. ISO date strings (e.g. "2024-01-01") are accepted.
end_timeLast date to retrieve data for.
entitiesOne or more entity resource names, e.g. entityTypes/company/entities/F_000C7F-E. Combine with tags to evaluate against the union of both sets.
tagsOne or more tag resource names. The signals will be evaluated for every entity that belongs to the tag.
versionPoint-in-time at which to evaluate the signals. Only data with known-time ≤ version is used. A single version per call — loop if you need several.

At least one of entities or tags must be set, unless the signals do not depend on any entity.

Basic example

The most general pattern: a DSL data(...) expression evaluated against an entity resource name. Substitute your own namespace (ns), signal, and entity type:

result = client.export_api.export_signals_v2(
    signals="data('ns.visits')",
    entities="entityTypes/ns.brand/entities/ns.acme",
    start_time="2024-01-01",
    end_time="2024-12-31",
)

signals accepts either a plain string (treated as a saved label or, failing that, a DSL expression) or a DerivedSignal — see Specifying signals below for the trade-off.

Example: Visible Alpha for a company

Export the Visible Alpha actual and consensus revenue for a company:

📘

Requires Visible Alpha subscription

The va_actual() and va_consensus() DSL functions return Visible Alpha data and require a Visible Alpha subscription.

# Find the company entity
companies = client.entity_api.search.company_by_bloomberg_ticker("AAPL US")
company = companies["AAPL US"]

# Export data related to this company entity
result = client.export_api.export_signals_v2(
    signals=["va_actual('Total revenue')", "va_consensus('Total revenue')"],
    entities=company.name,
    start_time="2024-01-01",
    end_time="2025-12-31",
)

Specifying signals: str vs DerivedSignal

The signals parameter accepts two forms, and the choice affects the column name in the result but not the data:

Plain string

A string is sent to the server as a label. The server first tries to resolve it as a saved derived signal in your library; if no such label exists, the string is evaluated as a DSL expression. The same value is used as both the label and the expression.

result = client.export_api.export_signals_v2(
    signals="data('ns.visits')",
    entities="entityTypes/ns.brand/entities/ns.acme",
    start_time="2024-01-01",
    end_time="2024-12-31",
)

DerivedSignal

DerivedSignal(name=None, label=..., expression=...) lets you decouple the column header (label) from the DSL expression (expression). The name=None placeholder marks the signal as inline — i.e. not stored in the library.

from exabel.client.api.data_classes.derived_signal import DerivedSignal

result = client.export_api.export_signals_v2(
    signals=DerivedSignal(
        name=None,
        label="visits",
        expression="data('ns.visits')",
    ),
    entities="entityTypes/ns.brand/entities/ns.acme",
    start_time="2024-01-01",
    end_time="2024-12-31",
)
👍

When to prefer DerivedSignal

  • you want clean, readable column names
  • the expression is long or repeated across multiple calls and a short alias improves the resulting frame

Library signal labels and inline DerivedSignal expressions can be freely mixed inside a list passed to the signals parameter.

Multiple entities

Pass a list of resource names:

result = client.export_api.export_signals_v2(
    signals=DerivedSignal(name=None, label="visits", expression="data('ns.visits')"),
    entities=[
        "entityTypes/ns.brand/entities/ns.acme",
        "entityTypes/ns.brand/entities/ns.contoso",
    ],
    start_time="2024-01-01",
    end_time="2024-03-31",
)

The result has a (name, time) MultiIndex whenever entities or tags is set, regardless of how many entities resolve.

Point-in-time evaluation

By using the version parameter, only data points with a known-time on or before version participate in the evaluation.

client.export_api.export_signals_v2(
    signals="data('ns.visits')",
    entities="entityTypes/ns.brand/entities/ns.acme",
    start_time="2023-01-01",
    end_time="2026-03-31",
    version="2024-01-01",
)

Use SDK script

The same v2 export is exposed as a script:

python -m exabel.scripts.export_signals_v2 \
    --expression "visits=data('ns.visits')" \
    --signals "data('ns.unique_visitors')" \
    --entities "entityTypes/ns.brand/entities/ns.acme" \
    --filename visits.parquet \
    --start-date 2024-01-01 \
    --end-date 2024-12-31

--expression LABEL=EXPRESSION adds a DSL expression with an explicit label; --signals VALUE takes one or more labels that the server resolves as either a saved library signal or a DSL expression.