No logo available for Quickbooks time to DuckDB connector icon

Load Quickbooks time data to DuckDB

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

SourceQuickbooks timeQuickBooks Time API ReferenceDestinationDuckDBIn-process analytical database. The default local destination for dlt pipelines.

QuickBooks Time (formerly TSheets) is a REST API for managing and retrieving time-tracking data including users, timesheets, jobcodes, and clients. Everything needed to build a working Quickbooks time → 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 Quickbooks time 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 Quickbooks time 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 Quickbooks time 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.


Quickbooks time API at a glance

Base URLhttps://rest.tsheets.com/api/v1
Example endpointGET users
Records found atresults.users
Authenticationall requests require an OAuth 2.0 Bearer token in the Authorization header — sent in the Authorization header, prefixed Bearer
PaginationPage-number
Incremental fieldpage

These values come from the Quickbooks time API documentation. Check them against the vendor's current reference before relying on them in production.


How do I authenticate with the Quickbooks time API?

All requests require an OAuth 2.0 access token presented as a Bearer token in the 'Authorization' HTTP header, formatted as 'Authorization: Bearer <ACCESS_TOKEN>'.

1. Get your credentials

  1. Log in to your QuickBooks Time account as an administrator. 2. Navigate to Feature Add-ons, then select Manage Add-ons from the drop-down menu. 3. Find the API Add-On and click Install (or Preferences if already installed). 4. Click Add a new application to generate OAuth credentials. 5. Enter a Name, Description, and your Redirect URI, then save the application. 6. Copy the generated Client ID and Client Secret from the application settings page. 7. If you require an immediate token for development, click Add Token at the bottom of the API application page. For production use, proceed with the standard OAuth 2.0 flow using your Client ID and Client Secret to obtain an access and refresh token.

2. Add them to .dlt/secrets.toml

[sources.quickbooks_time_source] client_id = "your_client_id_here" client_secret = "your_client_secret_here" access_token = "your_access_token_here" 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 Quickbooks time data can I load into DuckDB?

These are the Quickbooks time endpoints dlt can load into DuckDB:

ResourceEndpointMethodData selectorDescription
usersusersGETresults.usersRetrieves a list of users
timesheetstimesheetsGETresults.timesheetsRetrieves a list of timesheets
jobcodesjobcodesGETresults.jobcodesRetrieves a list of jobcodes
clientsclientsGETresults.clientsRetrieves a list of clients
groupsgroupsGETresults.groupsRetrieves a list of groups

How do I load only new Quickbooks time records?

Quickbooks time exposes page on users, 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": "users", "endpoint": { "path": "users", "data_selector": "results.users", "incremental": {"cursor_path": "page", "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 Quickbooks time pipeline look like?

A standard dlt REST API pipeline — the same code you would write by hand, loading users and timesheets from the Quickbooks time API into DuckDB:

import dlt from dlt.sources.rest_api import RESTAPIConfig, rest_api_resources @dlt.source def quickbooks_time_source(access_token=dlt.secrets.value): config: RESTAPIConfig = { "client": { "base_url": "https://rest.tsheets.com/api/v1", "auth": {"type": "bearer", "token": access_token}, }, "resources": [ {"name": "users", "endpoint": {"path": "users", "data_selector": "results.users"}}, {"name": "timesheets", "endpoint": {"path": "timesheets", "data_selector": "results.timesheets"}} ], } yield from rest_api_resources(config) def load_quickbooks_time_to_duckdb() -> None: pipeline = dlt.pipeline( pipeline_name="quickbooks_time_pipeline", destination="duckdb", dataset_name="quickbooks_time_data", ) load_info = pipeline.run(quickbooks_time_source()) print(load_info) if __name__ == "__main__": load_quickbooks_time_to_duckdb()

Run it with python quickbooks_time_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 Quickbooks time 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("quickbooks_time_pipeline").dataset() df = data.timesheets.df() print(df.head())

SQL:

SELECT * FROM quickbooks_time_data.timesheets LIMIT 10;

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


How do I deploy the Quickbooks time 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 Quickbooks time 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 Quickbooks time 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 Quickbooks time to DuckDB?

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