No logo available for SAP Concur to DuckDB connector icon

Load SAP Concur data to DuckDB

Build a SAP Concur to DuckDB pipeline with your coding agent. One prompt scaffolds it with the dltHub AI harness, plus the SAP Concur API base URL, auth, endpoints, and incremental loading.

SourceSAP ConcurSAP Concur API DocumentationDestinationDuckDBIn-process analytical database. The default local destination for dlt pipelines.

SAP Concur REST APIs allow clients and partners to access data and functions within the SAP Concur product ecosystem. Everything needed to build a working SAP Concur → DuckDB pipeline is on this page: the API's base URL, authentication, endpoints, pagination and incremental field — plus a prompt that hands the whole job to your coding agent.


Build your SAP Concur to DuckDB pipeline

Paste this prompt into Claude, Codex, or Cursor. The agent does the rest.

Prompt
Run uvx dlthub-init@latest to build a pipeline from SAP Concur to DuckDB and run it on dltHub

That scaffolds a dltHub workspace and installs the dltHub AI harness — the project rules, the secrets-management skill, and the dlt MCP server your agent needs to work safely. From there it reads the SAP Concur API, proposes the endpoints to load, then writes, runs and validates the pipeline while you review rather than type. Credentials are inspected through MCP tools, so your agent never reads secrets.toml itself. How the LLM-native workflow works →

Prefer to write it yourself? Every fact the agent uses is below.


SAP Concur API at a glance

Base URLThe base URL is geolocation-specific (e.g., https://us.api.concursolutions.com). The correct base URL must be determined from the geolocation assigned to the application or the token.
Example endpointGET /common/connection-requests
AuthenticationAll requests require a Bearer token obtained via the OAuth2 token endpoint — sent in the Authorization header, prefixed Bearer
PaginationOffset-based
Incremental fieldoffset
API referencehttps://developer.concur.com/api-reference/authentication/getting-started.html

These values come from the SAP Concur API reference — the authoritative source if anything here looks out of date.


How do I authenticate with the SAP Concur API?

Authentication is performed via OAuth2 where you obtain an access token and use it in the Authorization header as 'Authorization: Bearer <access_token>'. All API requests require this header.

1. Get your credentials

To obtain credentials, first log in to your SAP Concur admin portal. You must register an application within the SAP Concur App Management/Developer portal. In many cases, you will need to contact your SAP Concur Partner Enablement Manager or implementation team to complete this process and receive your initial OAuth2 client_id and client_secret. Once the application is registered, use the App Management interface to generate additional required parameters such as a Company Request Token or to manage your existing application scopes and grants.

2. Add them to .dlt/secrets.toml

[sources.sap_concur_source] client_id = "your-client-id-here" client_secret = "your-client-secret-here" base_uri = "https://us.api.concursolutions.com" refresh_token = "your-refresh-token-here"

dlt reads this file automatically at runtime. With the harness, the setup-secrets skill prompts you for the values and never handles the raw credential in chat. For production, see setting up credentials with dlt.


What SAP Concur data can I load into DuckDB?

These are the SAP Concur endpoints dlt can load into DuckDB:

ResourceEndpointMethodData selectorDescription
expense_reports/expense/reportsGETList of expense reports
receipts/v4/users/:userIdGETGet a user's receipts
requests/travelrequest/v4/requestsGETList of travel requests
connection_requests/common/connection-requestsGETList of connection requests
itinerary/travel/v4/itinerariesGETList of travel itineraries

How do I load only new SAP Concur records?

SAP Concur exposes offset on /common/connection-requests, so dlt can request only the records that changed since the last run. Set it as the cursor_path and dlt tracks the high-water mark for you between runs.

{"name": "connection_requests", "endpoint": { "path": "/common/connection-requests", "incremental": {"cursor_path": "offset", "initial_value": "2024-01-01T00:00:00Z"}, }}

On the first run dlt loads everything from initial_value; on every run after that it requests only what changed and appends with write_disposition="merge" if you set a primary key. See incremental loading.


What does the generated SAP Concur pipeline look like?

A standard dlt REST API pipeline — the same code you would write by hand, loading /oauth2/v0/token and /api/v3.0/expense/reports from the SAP Concur API into DuckDB:

import dlt from dlt.sources.rest_api import RESTAPIConfig, rest_api_resources @dlt.source def sap_concur_source(client_id=dlt.secrets.value): config: RESTAPIConfig = { "client": { "base_url": "The base URL is geolocation-specific (e.g., https://us.api.concursolutions.com). The correct base URL must be determined from the geolocation assigned to the application or the token.", "auth": {"type": "bearer", "token": client_id}, }, "resources": [ {"name": "connection_requests", "endpoint": {"path": "/common/connection-requests"}}, {"name": "expense_reports", "endpoint": {"path": "/expense/reports"}} ], } yield from rest_api_resources(config) def load_sap_concur_to_duckdb() -> None: pipeline = dlt.pipeline( pipeline_name="sap_concur_pipeline", destination="duckdb", dataset_name="sap_concur_data", ) load_info = pipeline.run(sap_concur_source()) print(load_info) if __name__ == "__main__": load_sap_concur_to_duckdb()

Run it with python sap_concur_pipeline.py. The agent iterates on this until it loads cleanly — you review and approve, rather than write it from scratch.


How do I query SAP Concur data in DuckDB?

dlt creates one table per resource. Query the loaded data with Python or SQL — or ask your agent to, through the MCP server's execute_sql_query tool.

Python (pandas DataFrame):

import dlt data = dlt.pipeline("sap_concur_pipeline").dataset() df = data.expense_reports.df() print(df.head())

SQL:

SELECT * FROM sap_concur_data.expense_reports LIMIT 10;

See querying your data with dataset and exploring it in marimo notebooks.


How do I deploy the SAP Concur to DuckDB pipeline in production?

The pipeline runs locally, which is ideal for prototyping and one-off analysis. When you need it on a schedule, monitored on every load, and shared with your team, deploy the same dlt code on the dltHub platform — no infrastructure to maintain. The prompt above already ends with "run it on dltHub", so your agent can take it there directly.

  • Deploy & schedule — run the pipeline as a managed job with automatic retries.
  • Monitor — observable job queues, alerting, and load metrics for every run.
  • Transform — promote raw SAP Concur loads into governed, documented models.
  • Visualize & share — explore data in notebooks and publish live dashboards instead of static screenshots.

Book a demo →


What other destinations can I load SAP Concur data to?

dlt loads into any of these — only the destination argument changes:

DestinationExample value
PostgreSQL"postgres"
BigQuery"bigquery"
Snowflake"snowflake"
Redshift"redshift"
Databricks"databricks"
Filesystem (S3, GCS, Azure)"filesystem"

Set dlt.pipeline(destination="snowflake") and add credentials in .dlt/secrets.toml. On the dltHub platform the same pipeline runs against a managed Iceberg lakehouse. See the full destinations list.


Next steps

Was this page helpful?

Community Hub

Need more dlt context for SAP Concur to DuckDB?

Request dlt skills, commands, AGENT.md files, and AI-native context.