No slash command · from erpl-odata
Pulls SAP Datasphere and SAP Analytics Cloud (SAC) data into DuckDB via erpl_odata: OAuth2 secrets, space/asset discovery, relational and analytical reads, and SAC planning/analytical/story data. Use when the user needs Datasphere or SAC data in DuckDB.
Ships in erpl-odata. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Extension: erpl_odata v2026.11.25 | DuckDB: v2.0.1 / v1.5.6
TYPE datasphere, PROVIDER oauth2
defaults to grant_type 'authorization_code': the first call opens a browser and runs a
callback server on http://localhost:65000. For CI, cron and containers create an OAuth
client of type Technical User in Datasphere and use GRANT_TYPE 'client_credentials'.http://localhost:65000 (or whatever you pass as REDIRECT_URI) on the OAuth client in
System → Administration → App Integration.datasphere_read_analytical; tables and relational views with
datasphere_read_relational. datasphere_describe_asset tells you which access an asset
supports (has_relational_access, has_analytical_access).datasphere_read_analytical returns the measures
aggregated by the dimensions you select. Choosing fewer dimensions returns fewer,
more aggregated rows. That is not data loss.params := MAP {'P_YEAR': '2024'}, or the service answers 400.sac_show_models, sac_show_stories,
sac_describe_model and sac_describe_story raise "not implemented yet" (GitHub #243),
and so does ATTACH ... (TYPE sac) (#252). Take model and story IDs from SAC itself
(the URL of the model or story).PROVIDER access_token works today. SAC
tokens are short-lived, so refresh the secret before long jobs.-- Interactive (desktop): opens a browser on first use, stores the refresh token
CREATE PERSISTENT SECRET dsp (
TYPE datasphere,
PROVIDER oauth2,
TENANT_NAME 'my-tenant', -- from https://my-tenant.eu10.hcs.cloud.sap
DATA_CENTER 'eu10',
CLIENT_ID 'sb-...',
CLIENT_SECRET '...',
REDIRECT_URI 'http://localhost:65000'
);
-- Unattended
CREATE SECRET dsp_tech (
TYPE datasphere,
PROVIDER oauth2,
TENANT_NAME 'my-tenant',
DATA_CENTER 'eu10',
CLIENT_ID 'sb-...',
CLIENT_SECRET '...',
GRANT_TYPE 'client_credentials'
);
TOKEN_URL overrides the token endpoint when your tenant does not follow the
tenant_name + data_center pattern. PROVIDER config (CONFIG_FILE) and
PROVIDER file (FILEPATH) keep credentials outside SQL.
SELECT * FROM datasphere_show_spaces(); -- name
SELECT * FROM datasphere_show_assets('SALES'); -- name, object_type, technical_name
SELECT * FROM datasphere_show_assets(); -- + space_name, across all spaces
SELECT * FROM datasphere_describe_space('SALES');
-- 15 columns: data URLs, relational_schema, analytical_schema (measures, dimensions,
-- variables), has_relational_access, has_analytical_access, ...
SELECT name, has_relational_access, has_analytical_access,
analytical_schema.measures, analytical_schema.dimensions
FROM datasphere_describe_asset('SALES', 'AM_REVENUE');
All of these accept secret := 'name' when there is more than one datasphere secret.
datasphere_read_relational(space_id, asset_id [, secret],
top := UBIGINT, skip := UBIGINT, params := MAP(VARCHAR, VARCHAR),
secret := VARCHAR) → TABLE
datasphere_read_analytical(space_id, asset_id [, secret],
metrics := VARCHAR[], dimensions := VARCHAR[],
top := ..., skip := ..., params := ..., secret := ...) → TABLE
-- Relational: WHERE and column selection push down as $filter / $select
SELECT CustomerID, Country, Revenue
FROM datasphere_read_relational('SALES', 'V_SALES_ORDERS')
WHERE Country = 'DE';
-- Analytical: metrics and dimensions become the $select of the analytic query
SELECT *
FROM datasphere_read_analytical('SALES', 'AM_REVENUE',
metrics := ['Revenue', 'Quantity'],
dimensions := ['Country', 'FiscalYear'],
params := MAP {'P_CURRENCY': 'EUR'});
CREATE SECRET my_sac (
TYPE sac,
PROVIDER access_token,
TENANT_NAME 'my-tenant',
REGION 'eu10', -- eu10, us10, ap10, ca10, jp10, au10, br10, ch10
ACCESS_TOKEN '...'
);
sac_read_planning_data(model_id, secret := , top := , skip := , params := ) → TABLE
sac_read_analytical(model_id, secret := , dimensions := 'A,B', measures := 'M1,M2',
top := , skip := , params := ) → TABLE
sac_read_story_data(story_id, secret := ) → TABLE
-- Planning model data
SELECT * FROM sac_read_planning_data('REVENUE_MODEL', secret := 'my_sac', top := 1000);
-- Analytic model: dimensions and measures are comma-separated strings here
SELECT *
FROM sac_read_analytical('SALES_CUBE', secret := 'my_sac',
dimensions := 'Territory,Product,Quarter',
measures := 'SalesAmount,UnitsShipped');
-- Data behind a story's widgets
SELECT * FROM sac_read_story_data('STORY_ID', secret := 'my_sac');
Note the inconsistency: Datasphere takes metrics / dimensions as VARCHAR[] lists;
SAC takes measures / dimensions as one comma-separated VARCHAR.
-- 1. Unattended secret (see gotcha 1)
CREATE SECRET dsp (TYPE datasphere, PROVIDER oauth2, TENANT_NAME 'my-tenant', DATA_CENTER 'eu10',
CLIENT_ID 'sb-...', CLIENT_SECRET '...', GRANT_TYPE 'client_credentials');
-- 2. Find the asset and check how it can be read
SELECT name, object_type, technical_name FROM datasphere_show_assets('SALES');
SELECT has_relational_access, has_analytical_access, analytical_schema
FROM datasphere_describe_asset('SALES', 'AM_REVENUE');
-- 3. Land an aggregated slice
CREATE OR REPLACE TABLE revenue_by_country AS
SELECT *
FROM datasphere_read_analytical('SALES', 'AM_REVENUE',
metrics := ['Revenue'],
dimensions := ['Country', 'FiscalYear', 'FiscalPeriod']);
From there, the anofox-forecast plugin's anofox-forecast-models skill forecasts the
series, and anofox-visualization's build-dashboard skill (available inside that
repository) builds a dashboard on top.
See also: erpl-odata-setup (secret basics, TLS), erpl-odata-production (unattended
tokens, scheduling, tracing), erpl-odata-sap-odp-replication (delta from S/4 sources that
feed Datasphere).
Reference docs:
README.md (SAP Datasphere, SAP Analytics Cloud)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub datazoode/erpl-odata --plugin erpl-odata8 skills in this plugin
/erpl-odata-dynamics-and-delta-sharingReading Microsoft Dynamics 365 Business Central (bc_show_companies, bc_show_entities, bc_describe, bc_read with company and expand, ATTACH TYPE business_central), Dataverse / Dynamics 365 CRM (crm_show_entities, crm_describe, crm_read) and Delta Sharing shares from Databricks, SAP Business Data Cloud and other providers (delta_share_show_shares, delta_share_show_schemas, delta_share_show_tables, delta_share_scan, profile files) into DuckDB with erpl_odata. Use when the user wants ERP data from Business Central, CRM records from Dataverse, or a table shared over the Delta Sharing protocol.
/erpl-odata-microsoft-365Using Microsoft 365 as a data source and sink from DuckDB with erpl_odata's Microsoft Graph functions: Excel workbooks on OneDrive/SharePoint (graph_show_files, graph_excel_worksheets, graph_excel_tables, graph_excel_read, graph_excel_range, graph_excel_add_rows, graph_excel_delete_rows, ATTACH TYPE excel_workbook, COPY TO FORMAT graph_excel_table), SharePoint lists (graph_show_sites, graph_show_drives, graph_show_lists, graph_describe_list, graph_sharepoint_list_read, graph_sharepoint_create_item / update_item / delete_item, ATTACH TYPE sharepoint_lists with INSERT/UPDATE/DELETE, COPY TO FORMAT graph_sharepoint_list), Planner (plans, buckets, tasks, creating tasks from SQL), Outlook mail, calendars and contacts, Teams channels and messages, and Entra ID users, groups, devices and sign-in logs; app-only vs delegated permissions. Use when the user wants to read or write Excel or SharePoint data, push query results into a list or workbook, create Planner tasks from data, or report on M365 directory, mail or Teams activity.
/erpl-odata-odata-and-restQuerying any OData v2/v4 service and any REST/JSON API from DuckDB SQL with erpl_odata: odata_read (top, skip, expand, count, max_page_size, strict_typing), automatic v2/v4 detection, what WHERE / SELECT / LIMIT push down as $filter / $select / $top, odata_describe, odata_attach and ATTACH ... (TYPE odata), plus http_get / http_head / http_post / http_put / http_patch / http_delete with headers, auth, timeouts, JSON bodies and unpacking JSON responses. Use when the user wants to explore or extract an OData service that is not SAP-specific, call a REST endpoint, page through an API, or turn a JSON response into a table.
/erpl-odata-productionRunning erpl_odata extractions unattended and operating them: job scripts for the DuckDB CLI, persistent DuckDB files or DuckLake as the landing zone, idempotent snapshot and delta (ODP) loads, scheduling with cron or systemd without overlapping runs, unattended credentials (client_credentials, secrets from environment variables, persistent secrets), run logs and monitoring, file tracing (erpl_trace_* settings, PRAGMA erpl_trace_status), and an error-to-fix playbook (401/403, TLS, 404 on /sap/opu, 202 polling, RODPS_REPL_ODP_OPEN, custom service URL guard, NULLs from type conversion). Also how to hand extracted data to other DataZoo tools: flapi to serve it as REST/MCP, anofox-tabular for data-quality gates, anofox-forecast for forecasting and anofox-visualization for dashboards. Use when the user wants to schedule or productionise an extraction, debug a failing job, or build an end-to-end pipeline from SAP or Microsoft data to an API, forecast or dashboard.
/erpl-odata-sap-gatewayReading SAP S/4HANA and ECC data through SAP Gateway OData services with erpl_odata: discovering services with odata_sap_show (v2 catalog and v4 service groups), URL anatomy of /sap/opu/odata (v2) and /sap/opu/odata4 (v4 RAP services), basic-auth secrets scoped to the SAP host, describing and attaching a service, SAP-specific quirks (draft entity sets, Edm.DateTime, sap-client, mandatory filters), activating services (/IWFND/MAINT_SERVICE, /IWFND/V4_ADMIN, SICF), and the ABAP trial (A4H) sandbox. Use when the user wants data out of an SAP system via OData, cannot find or reach a Gateway service, or gets 403/404 from /sap/opu. For delta extraction use erpl-odata-sap-odp-replication instead.
/erpl-odata-sap-odp-replicationReplicating SAP data with full and delta loads through ODP (Operational Data Provisioning) OData services with erpl_odata: odp_odata_show to find ODP-enabled entity sets, odp_odata_read (secret, force_full_load, import_delta_token, max_page_size) as a change stream with ODQ_CHANGEMODE and ODQ_ENTITYCNTR, the correct DELETE + INSERT merge into a persistent DuckDB table, subscription state (odp_odata_list_subscriptions, PRAGMA odp_odata_remove_subscription), ODQMON cleanup, HTTP 202 long-running extractions, why a delta never arrives (CDS changeDataCapture vs byElement, Preference-Applied), and provisioning an ODP service headlessly with erpl-adt. Use when the user wants incremental or CDC loads from SAP extractors (0D_*, 2LIS_*), BW InfoProviders or CDS extraction views, or a delta load returns everything again.
Other plugins' skills for the same job