Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 57 additions & 0 deletions airbyte-integrations/connectors/source-shiftbase/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# Secrets and configuration

*.env
config*.json
catalog*.json
secrets/

# Python
__pycache__/
*.py[cod]
*$py.class
*.so
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
*.egg-info/
.installed.cfg
*.egg

# Virtual Environment
.env
.venv
env/
venv/
ENV/

# IDE
.idea/
.vscode/
*.swp
*.swo

# Testing
.pytest_cache/
.coverage
htmlcov/
coverage.xml

# Git
.git/
.gitignore

# Logs
*.log

# Local development
*.DS_Store
123 changes: 123 additions & 0 deletions airbyte-integrations/connectors/source-shiftbase/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
# Shiftbase Source

This is the repository for the Shiftbase source connector, written in Python.
For information about how to use this connector within Airbyte, see [the documentation](https://docs.airbyte.com/integrations/sources/shiftbase).

## Streams

The Shiftbase connector supports the following data streams:

### Ingested Streams

| Stream Name | Sync Mode | Description |
| :--- | :--- | :--- |
| `departments` | Full Refresh | Internal departments within the Shiftbase account. |
| `employees` | Full Refresh | List of employees. **Note:** The `name` field has been removed to minimize PII. |
| `absentees` | Incremental | Records of employee absences and leave. |
| `employee_time_distribution` | Full Refresh | Distribution of worked and planned hours per employee. |
| `availabilities` | Incremental | Employee availability slots and preferences. |
| `shifts` | Incremental | Scheduled work shifts and roster details. |
| `users` | Full Refresh | User account details. **Note:** This stream is **flattened** and excludes all **PII** (names, emails, phones, addresses, etc.). |

---

## Local development

### Prerequisites

* Python (`^3.9`)
* Poetry (`^1.7`) - installation instructions [here](https://python-poetry.org/docs/#installation)



### Installing the connector

From this connector directory, run:
```bash
poetry install --with dev
```


### Create credentials

**If you are a community contributor**, follow the instructions in the [documentation](https://docs.airbyte.com/integrations/sources/shiftbase)
to generate the necessary credentials. Then create a file `secrets/config.json` conforming to the `src/source_shiftbase/spec.yaml` file.
Note that any directory named `secrets` is gitignored across the entire Airbyte repo, so there is no danger of accidentally checking in sensitive information.
See `sample_files/sample_config.json` for a sample config file.


### Locally running the connector

```
poetry run source-shiftbase spec
poetry run source-shiftbase check --config secrets/config.json
poetry run source-shiftbase discover --config secrets/config.json
poetry run source-shiftbase read --config secrets/config.json --catalog sample_files/configured_catalog.json
```

### Running tests

To run tests locally, from the connector directory run:

```
poetry run pytest tests
```

### Building the docker image

1. Install [`airbyte-ci`](https://github.com/airbytehq/airbyte/blob/master/airbyte-ci/connectors/pipelines/README.md)
2. Run the following command to build the docker image:
```bash
airbyte-ci connectors --name=source-shiftbase build
```

An image will be available on your host with the tag `airbyte/source-shiftbase:dev`.


### Running as a docker container

Then run any of the connector commands as follows:
```
docker run --rm airbyte/source-shiftbase:dev spec
docker run --rm -v $(pwd)/secrets:/secrets airbyte/source-shiftbase:dev check --config /secrets/config.json
docker run --rm -v $(pwd)/secrets:/secrets airbyte/source-shiftbase:dev discover --config /secrets/config.json
docker run --rm -v $(pwd)/secrets:/secrets -v $(pwd)/integration_tests:/integration_tests airbyte/source-shiftbase:dev read --config /secrets/config.json --catalog /integration_tests/configured_catalog.json
```

### Running our CI test suite

You can run our full test suite locally using [`airbyte-ci`](https://github.com/airbytehq/airbyte/blob/master/airbyte-ci/connectors/pipelines/README.md):

```bash
airbyte-ci connectors --name=source-shiftbase test
```

### Customizing acceptance Tests

Customize `acceptance-test-config.yml` file to configure acceptance tests. See [Connector Acceptance Tests](https://docs.airbyte.com/connector-development/testing-connectors/connector-acceptance-tests-reference) for more information.
If your connector requires to create or destroy resources for use during acceptance tests create fixtures for it and place them inside integration_tests/acceptance.py.

### Dependency Management

All of your dependencies should be managed via Poetry.
To add a new dependency, run:

```bash
poetry add <package-name>
```

Please commit the changes to `pyproject.toml` and `poetry.lock` files.

## Publishing a new version of the connector

You've checked out the repo, implemented a million dollar feature, and you're ready to share your changes with the world. Now what?
1. Make sure your changes are passing our test suite: `airbyte-ci connectors --name=source-shiftbase test`
2. Bump the connector version (please follow [semantic versioning for connectors](https://docs.airbyte.com/contributing-to-airbyte/resources/pull-requests-handbook/#semantic-versioning-for-connectors)):
- bump the `dockerImageTag` value in in `metadata.yaml`
- bump the `version` value in `pyproject.toml`
3. Make sure the `metadata.yaml` content is up to date.
4. Make sure the connector documentation and its changelog is up to date (`docs/integrations/sources/shiftbase.md`).
5. Create a Pull Request: use [our PR naming conventions](https://docs.airbyte.com/contributing-to-airbyte/resources/pull-requests-handbook/#pull-request-title-convention).
6. Pat yourself on the back for being an awesome contributor.
7. Someone from Airbyte will take a look at your PR and iterate with you to merge it into master.
8. Once your PR is merged, the new version of the connector will be automatically published to Docker Hub and our connector registry.
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# See [Connector Acceptance Tests](https://docs.airbyte.com/connector-development/testing-connectors/connector-acceptance-tests-reference)
# for more information about how to configure these tests
connector_image: airbyte/source-shiftbase:dev
acceptance_tests:
spec:
tests:
- spec_path: "source_shiftbase/spec.yaml"
130 changes: 130 additions & 0 deletions airbyte-integrations/connectors/source-shiftbase/docs/shiftbase.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,130 @@
# Shiftbase

<HideInUI>

This page contains the setup guide and reference information for the [Shiftbase](https://www.shiftbase.com/) source connector.

</HideInUI>

## Prerequisites

To set up the Shiftbase source connector, you'll need:

- A Shiftbase account with API access
- An **Access Token** generated from the Shiftbase App Center
- The **Account Name** for tracking purposes (you can use any identifier)

### Generating an Access Token

1. Log in to your Shiftbase account
2. Navigate to the App Center
3. Generate a new API Access Token
4. Copy and securely store the token - you'll need it for the connector configuration

## Setup guide

### Set up Shiftbase

#### For Airbyte Cloud:

1. [Log into your Airbyte Cloud](https://cloud.airbyte.com/workspaces) account.
2. Click Sources and then click + New source.
3. On the Set up the source page, select Shiftbase from the Source type dropdown.
4. Enter a name for the Shiftbase connector.
5. Enter your **Account Name** (an identifier for tracking).
6. Enter your **Access Token** from the Shiftbase App Center.
7. Enter your **Start Date** for historical data sync (format: YYYY-MM-DD).
8. Click **Set up source**.

#### For Airbyte Open Source:

1. Navigate to the Airbyte Open Source dashboard.
2. Click Sources and then click + New source.
3. On the Set up the source page, select Shiftbase from the Source type dropdown.
4. Enter a name for the Shiftbase connector.
5. Enter your **Account Name** (an identifier for tracking).
6. Enter your **Access Token** from the Shiftbase App Center.
7. Enter your **Start Date** for historical data sync (format: YYYY-MM-DD).
8. Click **Set up source**.

### Multiple Accounts

The Shiftbase connector supports syncing data from multiple Shiftbase accounts simultaneously. When configuring the connector, you can add multiple account configurations, each with its own access token and account name.

## Supported sync modes

The Shiftbase source connector supports the following [sync modes](https://docs.airbyte.com/cloud/core-concepts/#connection-sync-modes):

| Feature | Supported |
|:------------------------------|:----------|
| Full Refresh Sync | Yes |
| Incremental - Append Sync | Yes |
| Replicate Incremental Deletes | No |
| SSL connection | Yes |
| Namespaces | No |

## Supported Streams

The Shiftbase source connector supports the following streams:

| Stream | Sync Mode | Description |
|:----------------------------|:----------------------------|:---------------------------------------------------------|
| `departments` | Full Refresh | Internal departments within the Shiftbase account |
| `employees` | Full Refresh | List of employees (PII fields like name are excluded) |
| `absentees` | Full Refresh, Incremental | Records of employee absences and leave |
| `employee_time_distribution`| Full Refresh | Distribution of worked and planned hours per employee |
| `availabilities` | Full Refresh, Incremental | Employee availability slots and preferences |
| `shifts` | Full Refresh | Scheduled work shifts and roster details |
| `users` | Full Refresh | User account details (PII excluded, flattened structure) |
| `employees_report` | Full Refresh | Employees report data |
| `timesheet_detail_report` | Full Refresh | Detailed timesheet report data |
| `schedule_detail_report` | Full Refresh | Detailed schedule report data |

### Performance considerations

The Shiftbase API has rate limiting in place. The connector handles rate limits automatically with exponential backoff. If you encounter rate limit issues, consider:

- Reducing the sync frequency
- Using incremental sync where available to minimize API calls

## Data type map

| Shiftbase Type | Airbyte Type |
|:---------------|:-------------|
| `string` | `string` |
| `integer` | `integer` |
| `boolean` | `boolean` |
| `object` | `object` |
| `array` | `array` |
| `date` | `string` |
| `datetime` | `string` |

## Limitations & Troubleshooting

<details>
<summary>Expand to review</summary>

### Connector limitations

- The `users` stream is flattened and excludes PII (names, emails, phones, addresses) for privacy compliance
- The `employees` stream has the `name` field removed to minimize PII exposure
- Some streams (reports) make day-by-day API calls which may result in longer sync times for large date ranges

### Troubleshooting

- **Connection test fails**: Verify your access token is valid and has not expired
- **Empty streams**: Ensure your Shiftbase account has data for the requested date range
- **Rate limiting**: The connector handles rate limits automatically, but extended syncs may take longer if limits are hit frequently

</details>

## Changelog

<details>
<summary>Expand to review</summary>

| Version | Date | Pull Request | Subject |
|:--------|:-----------|:-------------|:--------------------------------------------|
| 0.1.46 | 2026-02-03 | TBD | Initial release with 10 streams |

</details>
38 changes: 38 additions & 0 deletions airbyte-integrations/connectors/source-shiftbase/icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#
# Copyright (c) 2026 Airbyte, Inc., all rights reserved.
#
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"todo-stream-name": {
"todo-field-name": "todo-abnormal-value"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#
# Copyright (c) 2026 Airbyte, Inc., all rights reserved.
#

import pytest


pytest_plugins = ("connector_acceptance_test.plugin",)


@pytest.fixture(scope="session", autouse=True)
def connector_setup():
"""This fixture is a placeholder for external resources that acceptance test might require."""
# TODO: setup test dependencies if needed. otherwise remove the TODO comments
yield
# TODO: clean up test dependencies
Loading
Loading