Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added the api for approval status #82

Merged
merged 3 commits into from
May 10, 2024
Merged
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
19 changes: 9 additions & 10 deletions airbyte-integrations/connectors/source-avni/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,33 +1,32 @@
FROM python:3.9.11-alpine3.15 as base

# build and load all requirements
# Build and load all requirements
FROM base as builder
WORKDIR /airbyte/integration_code

# upgrade pip to the latest version
# Upgrade pip to the latest version and install build dependencies
RUN apk --no-cache upgrade \
&& pip install --upgrade pip \
&& apk --no-cache add tzdata build-base

&& apk --no-cache add tzdata build-base libffi-dev openssl-dev

COPY setup.py ./
# install necessary packages to a temporary folder
# Install necessary packages to a temporary folder
RUN pip install --prefix=/install .

# build a clean environment
# Build a clean environment
FROM base
WORKDIR /airbyte/integration_code

# copy all loaded and built libraries to a pure basic image
# Copy all loaded and built libraries to a pure basic image
COPY --from=builder /install /usr/local
# add default timezone settings
# Add default timezone settings
COPY --from=builder /usr/share/zoneinfo/Etc/UTC /etc/localtime
RUN echo "Etc/UTC" > /etc/timezone

# bash is installed for more convenient debugging.
# Bash is installed for more convenient debugging.
RUN apk --no-cache add bash

# copy payload code only
# Copy payload code only
COPY main.py ./
COPY source_avni ./source_avni

Expand Down
1 change: 1 addition & 0 deletions airbyte-integrations/connectors/source-avni/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
MAIN_REQUIREMENTS = [
"airbyte-cdk~=0.1",
"boto3==1.18.0",
"pytz==2024.1",
]

TEST_REQUIREMENTS = [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ definitions:
field_name: "size"
pagination_strategy:
type: "PageIncrement"
page_size: 100
page_size: 20
page_token_option:
type: "RequestOption"
inject_into: "request_parameter"
Expand Down Expand Up @@ -103,18 +103,29 @@ definitions:
$parameters:
path: "/encounters"

approval_status_stream:
$ref: "#/definitions/base_stream"
name: "approvalStatuses"
primary_key: "Entity ID"
incremental_sync:
$ref: "#/definitions/incremental_base"
transformations:
$ref: "#/definitions/transformations_base"
$parameters:
path: "/approvalStatuses"

streams:
- "#/definitions/subjects_stream"
- "#/definitions/program_enrolments_stream"
- "#/definitions/program_encounters_stream"
- "#/definitions/encounters_stream"
- "#/definitions/approval_status_stream"

check:
type: CheckStream
stream_names:
- "subjects"


spec:
type: Spec
documentation_url: https://docs.airbyte.com/integrations/sources/avni
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"additionalProperties": true,
"properties": {
"Entity ID": {
"type": "string"
},
"Entity type": {
"type": "string"
},
"Entity type ID": {
"type": "string"
},
"Approval status": {
"type": "string"
},
"Approval status comment": {
"type": ["null", "string"]
},
"Status date time": {
"type": "string",
"format": "date-time"
},
"last_modified_at": {
"type": "string",
"format": "YYYY-MM-DDTHH:mm:ss.sssZ"
},
"audit": {
"type": "object",
"properties": {
"Created at": {
"type": "string",
"format": "date-time"
},
"Last modified at": {
"type": ["null", "string"],
"format": "YYYY-MM-DDTHH:mm:ss.sssZ"
},
"Created by": {
"type": "string"
},
"Last modified by": {
"type": "string"
}
}
}
}
}

Loading