No logo available for Oracle Primavera Cloud to DuckDB connector icon

Load Oracle Primavera Cloud data to DuckDB

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

SourceOracle Primavera CloudOracle Primavera Cloud API DocumentationDestinationDuckDBIn-process analytical database. The default local destination for dlt pipelines.

Oracle Primavera Cloud REST API provides a flexible interface to Oracle Primavera Cloud functionality. Everything needed to build a working Oracle Primavera Cloud → 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 Oracle Primavera Cloud 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 Oracle Primavera Cloud 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 Oracle Primavera Cloud 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.


Oracle Primavera Cloud API at a glance

Base URLhttps://<SERVER_URL>/api/restapi/
Example endpointGET activity/project/{projectId}
Authenticationuses OAuth-based Bearer token authentication obtained via Basic Authentication or an OIDC/Lobby-based token endpoint — sent in the Authorization header, prefixed Bearer
PaginationOffset-based via start, page size via limit. The Oracle Primavera Cloud API uses two distinct pagination methods depending on the service. The standard REST API endpoints (e.g., /activity/project/{id}) use query parameters 'limit' and 'start'. The Data Service API uses a POST-based JSON request body containing 'pageSize', 'nextTableName', and 'nextKey'. The documentation for the REST API indicates a maximum limit of 5000 objects, while the Data Service API specifies a range of 1 to 10000.
Incremental fieldstart
API referencehttps://docs.oracle.com/en/industries/construction-engineering/primavera-cloud/rest-api/

These values come from the Oracle Primavera Cloud API reference — the authoritative source if anything here looks out of date.


How do I authenticate with the Oracle Primavera Cloud API?

Requests require the 'Authorization' header with a 'Bearer' token. Additionally, specific tenancy headers such as 'x-prime-tenant-code' must be included as retrieved from the token generation response.

1. Get your credentials

To obtain API credentials, you must first register your integration in the Oracle Construction and Engineering Lobby. 1. Log in to the Lobby and navigate to 'OAuth Clients'. 2. Create a new OAuth client (choose 'Non-Interactive Integration' for machine-to-machine access). 3. Upon registration, you will receive a Client ID and Client Secret. 4. If necessary, locate existing credentials by navigating to 'Identity' > 'Domains' > [Your Domain] > 'Oracle Cloud Services' in your OCI Console, selecting your application, and selecting 'Show Secret' in the General Information section. Ensure these credentials are kept secure and are never exposed publicly.

2. Add them to .dlt/secrets.toml

[sources.oracle_primavera_cloud_source] api_key = "REPLACE_ME"

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 Oracle Primavera Cloud data can I load into DuckDB?

These are the Oracle Primavera Cloud endpoints dlt can load into DuckDB:

ResourceEndpointMethodData selectorDescription
activities/activity/project/{projectId}GETRetrieves a paginated list of activities for a specific project.
projects/projectGETRetrieves a list of all projects.
workspaces/workspaceGETRetrieves a list of all workspaces.
resources/resourceGETRetrieves a list of resources.
users/userGETRetrieves a list of all users in the environment.

How do I load only new Oracle Primavera Cloud records?

Oracle Primavera Cloud exposes start on activity/project/{projectId}, 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": "activities", "endpoint": { "path": "activity/project/{projectId}", "incremental": {"cursor_path": "start", "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 Oracle Primavera Cloud pipeline look like?

A standard dlt REST API pipeline — the same code you would write by hand, loading /api/restapi/project and /api/restapi/action from the Oracle Primavera Cloud API into DuckDB:

import dlt from dlt.sources.rest_api import RESTAPIConfig, rest_api_resources @dlt.source def oracle_primavera_cloud_source(api_key=dlt.secrets.value): config: RESTAPIConfig = { "client": { "base_url": "https://<SERVER_URL>/api/restapi/", "auth": {"type": "bearer", "token": api_key}, }, "resources": [ {"name": "activities", "endpoint": {"path": "activity/project/{projectId}"}}, {"name": "projects", "endpoint": {"path": "project"}} ], } yield from rest_api_resources(config) def load_oracle_primavera_cloud_to_duckdb() -> None: pipeline = dlt.pipeline( pipeline_name="oracle_primavera_cloud_pipeline", destination="duckdb", dataset_name="oracle_primavera_cloud_data", ) load_info = pipeline.run(oracle_primavera_cloud_source()) print(load_info) if __name__ == "__main__": load_oracle_primavera_cloud_to_duckdb()

Run it with python oracle_primavera_cloud_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 Oracle Primavera Cloud 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("oracle_primavera_cloud_pipeline").dataset() df = data.activities.df() print(df.head())

SQL:

SELECT * FROM oracle_primavera_cloud_data.activities LIMIT 10;

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


How do I deploy the Oracle Primavera Cloud 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 Oracle Primavera Cloud 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 Oracle Primavera Cloud 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 Oracle Primavera Cloud to DuckDB?

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