diff --git a/airbyte-integrations/connectors/source-sap-fieldglass/.dockerignore b/airbyte-integrations/connectors/source-sap-fieldglass/.dockerignore deleted file mode 100644 index c744112a322f1..0000000000000 --- a/airbyte-integrations/connectors/source-sap-fieldglass/.dockerignore +++ /dev/null @@ -1,6 +0,0 @@ -* -!Dockerfile -!main.py -!source_sap_fieldglass -!setup.py -!secrets diff --git a/airbyte-integrations/connectors/source-sap-fieldglass/__init__.py b/airbyte-integrations/connectors/source-sap-fieldglass/__init__.py index c941b30457953..66f6de8cb2bb5 100644 --- a/airbyte-integrations/connectors/source-sap-fieldglass/__init__.py +++ b/airbyte-integrations/connectors/source-sap-fieldglass/__init__.py @@ -1,3 +1,3 @@ # -# Copyright (c) 2023 Airbyte, Inc., all rights reserved. +# Copyright (c) 2024 Airbyte, Inc., all rights reserved. # diff --git a/airbyte-integrations/connectors/source-sap-fieldglass/integration_tests/__init__.py b/airbyte-integrations/connectors/source-sap-fieldglass/integration_tests/__init__.py index c941b30457953..66f6de8cb2bb5 100644 --- a/airbyte-integrations/connectors/source-sap-fieldglass/integration_tests/__init__.py +++ b/airbyte-integrations/connectors/source-sap-fieldglass/integration_tests/__init__.py @@ -1,3 +1,3 @@ # -# Copyright (c) 2023 Airbyte, Inc., all rights reserved. +# Copyright (c) 2024 Airbyte, Inc., all rights reserved. # diff --git a/airbyte-integrations/connectors/source-sap-fieldglass/integration_tests/acceptance.py b/airbyte-integrations/connectors/source-sap-fieldglass/integration_tests/acceptance.py index 9e6409236281f..aaeb7f6c2529d 100644 --- a/airbyte-integrations/connectors/source-sap-fieldglass/integration_tests/acceptance.py +++ b/airbyte-integrations/connectors/source-sap-fieldglass/integration_tests/acceptance.py @@ -1,5 +1,5 @@ # -# Copyright (c) 2023 Airbyte, Inc., all rights reserved. +# Copyright (c) 2024 Airbyte, Inc., all rights reserved. # diff --git a/airbyte-integrations/connectors/source-sap-fieldglass/main.py b/airbyte-integrations/connectors/source-sap-fieldglass/main.py index 8d82309172892..64eda76ca57e1 100644 --- a/airbyte-integrations/connectors/source-sap-fieldglass/main.py +++ b/airbyte-integrations/connectors/source-sap-fieldglass/main.py @@ -1,5 +1,5 @@ # -# Copyright (c) 2023 Airbyte, Inc., all rights reserved. +# Copyright (c) 2024 Airbyte, Inc., all rights reserved. # from source_sap_fieldglass.run import run diff --git a/airbyte-integrations/connectors/source-sap-fieldglass/metadata.yaml b/airbyte-integrations/connectors/source-sap-fieldglass/metadata.yaml index b8ae7e0efbdab..c1cb42c503be3 100644 --- a/airbyte-integrations/connectors/source-sap-fieldglass/metadata.yaml +++ b/airbyte-integrations/connectors/source-sap-fieldglass/metadata.yaml @@ -2,7 +2,7 @@ data: connectorSubtype: api connectorType: source definitionId: ec5f3102-fb31-4916-99ae-864faf8e7e25 - dockerImageTag: 0.1.1 + dockerImageTag: 0.1.2 dockerRepository: airbyte/source-sap-fieldglass githubIssueLabel: source-sap-fieldglass icon: sapfieldglass.svg diff --git a/airbyte-integrations/connectors/source-sap-fieldglass/pyproject.toml b/airbyte-integrations/connectors/source-sap-fieldglass/pyproject.toml index a8e1cf6e4b01e..ca55f28e1186c 100644 --- a/airbyte-integrations/connectors/source-sap-fieldglass/pyproject.toml +++ b/airbyte-integrations/connectors/source-sap-fieldglass/pyproject.toml @@ -3,7 +3,7 @@ requires = [ "poetry-core>=1.0.0",] build-backend = "poetry.core.masonry.api" [tool.poetry] -version = "0.1.1" +version = "0.1.2" name = "source-sap-fieldglass" description = "Source implementation for Sap Fieldglass." authors = [ "Airbyte ",] diff --git a/airbyte-integrations/connectors/source-sap-fieldglass/requirements.txt b/airbyte-integrations/connectors/source-sap-fieldglass/requirements.txt deleted file mode 100644 index d6e1198b1ab1f..0000000000000 --- a/airbyte-integrations/connectors/source-sap-fieldglass/requirements.txt +++ /dev/null @@ -1 +0,0 @@ --e . diff --git a/airbyte-integrations/connectors/source-sap-fieldglass/source_sap_fieldglass/__init__.py b/airbyte-integrations/connectors/source-sap-fieldglass/source_sap_fieldglass/__init__.py index c35a7636fbc78..ca988dfb6c3c4 100644 --- a/airbyte-integrations/connectors/source-sap-fieldglass/source_sap_fieldglass/__init__.py +++ b/airbyte-integrations/connectors/source-sap-fieldglass/source_sap_fieldglass/__init__.py @@ -1,5 +1,5 @@ # -# Copyright (c) 2023 Airbyte, Inc., all rights reserved. +# Copyright (c) 2024 Airbyte, Inc., all rights reserved. # diff --git a/airbyte-integrations/connectors/source-sap-fieldglass/source_sap_fieldglass/manifest.yaml b/airbyte-integrations/connectors/source-sap-fieldglass/source_sap_fieldglass/manifest.yaml index 91fcb8965aaef..9a40ddbc7d1fd 100644 --- a/airbyte-integrations/connectors/source-sap-fieldglass/source_sap_fieldglass/manifest.yaml +++ b/airbyte-integrations/connectors/source-sap-fieldglass/source_sap_fieldglass/manifest.yaml @@ -1,38 +1,325 @@ -version: "0.29.0" +version: 0.78.1 + +type: DeclarativeSource + +check: + type: CheckStream + stream_names: + - data definitions: - selector: - extractor: - field_path: [] - requester: - url_base: "https://sandbox.api.sap.com/fieldglass/api/vc/connector" - http_method: "GET" + streams: + data: + type: DeclarativeStream + name: data + retriever: + type: SimpleRetriever + requester: + $ref: "#/definitions/base_requester" + path: /Active Worker Download + http_method: GET + record_selector: + type: RecordSelector + extractor: + type: DpathExtractor + field_path: + - data + schema_loader: + type: InlineSchemaLoader + schema: + $ref: "#/schemas/data" + base_requester: + type: HttpRequester + url_base: https://sandbox.api.sap.com/fieldglass/api/vc/connector authenticator: type: ApiKeyAuthenticator - header: "apikey" api_token: "{{ config['api_key'] }}" - requrest_options_provider: - request_parameters: - base: "{{ config['base'] }}" - retriever: - record_selector: - $ref: "#/definitions/selector" - paginator: - type: NoPagination - requester: - $ref: "#/definitions/requester" - base_stream: - retriever: - $ref: "#/definitions/retriever" - data_stream: - $ref: "#/definitions/base_stream" - $parameters: - name: "data" - path: "/Active Worker Download" + inject_into: + type: RequestOption + inject_into: header + field_name: apikey streams: - - "#/definitions/data_stream" + - $ref: "#/definitions/streams/data" -check: - stream_names: - - "data" +spec: + type: Spec + connection_specification: + $schema: http://json-schema.org/draft-07/schema# + title: Sap Fieldglass Spec + type: object + required: + - api_key + additionalProperties: true + properties: + api_key: + type: string + description: API Key + airbyte_secret: true + +metadata: + autoImportSchema: + data: false + +schemas: + data: + type: object + $schema: http://json-schema.org/draft-07/schema# + additionalProperties: true + properties: + Bill Rate: + type: + - "null" + - string + description: |- + Worker?s Bill Rate that is associated to the Rate + Category/UOM listed in the previous field. + Billable Per Diem: + type: + - "null" + - string + Business Unit Code: + type: + - "null" + - string + description: Business Unit Code. + maxLength: 100 + Business Unit Name: + type: + - "null" + - string + description: Business Unit Name. + maxLength: 100 + Buyer Code: + type: + - "null" + - string + description: Buyer Company Code. + maxLength: 4 + Cost Center Code: + type: + - "null" + - string + description: Cost Center Code in SAP Fieldglass. + maxLength: 200 + Cost Center Name: + type: + - "null" + - string + description: Cost Center Name in SAP Fieldglass. + maxLength: 200 + Currency: + type: + - "null" + - string + description: ISO currency designation (ex. USD). + maxLength: 100 + End Date: + type: + - "null" + - string + description: Work order end date. + First Name: + type: + - "null" + - string + description: First name of the Worker as defined in SAP Fieldglass. + maxLength: 100 + Job Posting Title: + type: + - "null" + - string + description: Job Posting?s Title or SOW Name for SOW Workers. + maxLength: 100 + Job Seeker ID: + type: + - "null" + - string + description: 14-character alphanumeric SAP Fieldglass Job Seeker ID. + maxLength: 14 + Last Name: + type: + - "null" + - string + description: Last name of the Worker as defined in SAP Fieldglass. + maxLength: 100 + Pay Rate: + type: + - "null" + - string + description: |- + Worker?s Pay Rate that is associated to the Rate Category/UOM + listed in the previous field. + If Supplier did not enter a Pay Rate, 0.00 will be + displayed. + Person ID: + type: + - "null" + - string + description: Unique identifier for the worker as a person. + maxLength: 24 + Rate Category /UOM: + type: + - "null" + - string + description: |- + Worker?s Rate Category/Unit Of Measure for which the + corresponding rate will be displayed. + More than one Rate Category/UOM may exist for a single + Worker. If this is the case a new line will appear for each + associated Rate Category/UOM in this file. + maxLength: 100 + Remit To address Code: + type: + - "null" + - string + description: Code as assigned to the Remit To Address by supplier. + maxLength: 100 + Security ID: + type: + - "null" + - string + description: |- + This column will only appear in the file if the security ID + field functionality is activated in SAP Fieldglass for the + buyer. If the functionality is not activated, this column + will not be in the file. + maxLength: 100 + Segmented Object Detail: + type: + - "null" + - string + description: |- + Segmented Object Detail string. Segments will be separated by + delimiter on the Segmented Object. + Valid delimiters are colon (:), semi-colon (;), pipe (|), and + dash (-). + Required if ?Enable Segmented Object Detail? configuration is + set. + This field is mutually exclusive with GL Account fields. + More than one string can appear for a cost center. + maxLength: 2000 + Sequence: + type: + - "null" + - string + description: Work Order Revision Number. + Site Code: + type: + - "null" + - string + description: Site Code. + maxLength: 100 + Site Name: + type: + - "null" + - string + description: Site Name. + maxLength: 100 + Start Date: + type: + - "null" + - string + description: Work order start date. + Status: + type: + - "null" + - string + description: Status of the worker. + maxLength: 50 + Vendor Name: + type: + - "null" + - string + description: Supplier name. + maxLength: 200 + Vendor Number: + type: + - "null" + - string + description: SAP Fieldglass Supplier code for buyer. + maxLength: 4 + Work Order ID: + type: + - "null" + - string + description: Work Order ID. + maxLength: 14 + Work Order/Work Order Revision Owner: + type: + - "null" + - string + description: Work Order Owner?s name. + maxLength: 100 + Work Order/Work Order Revision Owner Employee ID: + type: + - "null" + - string + description: Work Order Owner?s Employee ID. + maxLength: 50 + Worker Email: + type: + - "null" + - string + description: Worker?s e-mail address. + maxLength: 100 + Worker ID: + type: + - "null" + - string + description: 14-character alphanumeric SAP Fieldglass Worker ID. + maxLength: 14 + "[c]Buyer or Supplier custom fields": + type: + - "null" + - string + description: |- + Custom fields found on the supplier. (For supplier side + download, only those fields required by buyer for supplier + to be entered and viewed are downloaded.)If there are many + custom fields, there will be many columns.Column header + format will be: + ?[c]modulename_custom field name? (i.e. [c] followed by + module custom text lowercase with no spaces, followed by + underscore, followed by the custom field name text as + defined by users in the SAP Fieldglass application.) + maxLength: 4000 + "[c]Work Order Custom Fields": + type: + - "null" + - string + description: |- + Custom fields found on the work order/work order revision. + If there are many custom fields, there will be many columns. + Column header format will be: + ?[c]modulename_custom field name? (i.e. [c] followed by + module custom text lowercase with no spaces, followed by + underscore, followed by the custom field name text as + defined by users in the SAP Fieldglass application.) + maxLength: 4000 + "[c]Worker Custom Fields": + type: + - "null" + - string + description: |- + Custom fields found on the worker. + If there are many custom fields, there will be many + columns.Column header format will be: + "[c]modulename_custom field name" (i.e. [c] followed by + module custom text lowercase with no spaces, followed by + underscore, followed by the custom field name text as + defined by users in the SAP Fieldglass application.) + maxLength: 4000 + "[c]Worker User Person Custom Fields": + type: + - "null" + - string + description: |- + Custom fields found on the worker user person + If there are many custom fields, there will be many columns. + Column header format will be: + ?[c]modulename_custom field name? (i.e. [c] followed by + module custom text lowercase with no spaces, followed by + underscore, followed by the custom field name text as + defined by users in the SAP Fieldglass application.) + maxLength: 4000 diff --git a/airbyte-integrations/connectors/source-sap-fieldglass/source_sap_fieldglass/run.py b/airbyte-integrations/connectors/source-sap-fieldglass/source_sap_fieldglass/run.py index 69768a3d9efc1..f9d5e053fda65 100644 --- a/airbyte-integrations/connectors/source-sap-fieldglass/source_sap_fieldglass/run.py +++ b/airbyte-integrations/connectors/source-sap-fieldglass/source_sap_fieldglass/run.py @@ -1,12 +1,13 @@ # -# Copyright (c) 2023 Airbyte, Inc., all rights reserved. +# Copyright (c) 2024 Airbyte, Inc., all rights reserved. # import sys from airbyte_cdk.entrypoint import launch -from source_sap_fieldglass import SourceSapFieldglass + +from .source import SourceSapFieldglass def run(): diff --git a/airbyte-integrations/connectors/source-sap-fieldglass/source_sap_fieldglass/schemas/data.json b/airbyte-integrations/connectors/source-sap-fieldglass/source_sap_fieldglass/schemas/data.json deleted file mode 100644 index bfbd735ad2a05..0000000000000 --- a/airbyte-integrations/connectors/source-sap-fieldglass/source_sap_fieldglass/schemas/data.json +++ /dev/null @@ -1,210 +0,0 @@ -{ - "Data": { - "type": "array", - "items": { - "type": "object", - "required": [ - "Bill Rate", - "Business Unit Code", - "Business Unit Name", - "Buyer Code", - "Cost Center Code", - "Currency", - "End Date", - "First Name", - "Job Posting Title", - "Job Seeker ID", - "Last Name", - "Pay Rate", - "Rate Category /UOM", - "Sequence", - "Site Code", - "Site Name", - "Start Date", - "Status", - "Vendor Name", - "Vendor Number", - "Work Order ID", - "Work Order/Work Order Revision Owner", - "Worker Email", - "Worker ID" - ], - "properties": { - "[c]Worker Custom Fields": { - "type": "string", - "description": "Custom fields found on the worker.\nIf there are many custom fields, there will be many\ncolumns.Column header format will be: \n\"[c]modulename_custom field name\" (i.e. [c] followed by\nmodule custom text lowercase with no spaces, followed by\nunderscore, followed by the custom field name text as\ndefined by users in the SAP Fieldglass application.)", - "maxLength": 4000 - }, - "Job Seeker ID": { - "type": "string", - "description": "14-character alphanumeric SAP Fieldglass Job Seeker ID.", - "maxLength": 14 - }, - "[c]Buyer or Supplier custom fields": { - "type": "string", - "description": "Custom fields found on the supplier. (For supplier side\ndownload, only those fields required by buyer for supplier\nto be entered and viewed are downloaded.)If there are many\ncustom fields, there will be many columns.Column header\nformat will be: \n?[c]modulename_custom field name? (i.e. [c] followed by\nmodule custom text lowercase with no spaces, followed by\nunderscore, followed by the custom field name text as\ndefined by users in the SAP Fieldglass application.)", - "maxLength": 4000 - }, - "Billable Per Diem": { - "type": "integer", - "format": "float", - "description": "" - }, - "First Name": { - "type": "string", - "description": "First name of the Worker as defined in SAP Fieldglass.", - "maxLength": 100 - }, - "Remit To address Code": { - "type": "string", - "description": "Code as assigned to the Remit To Address by supplier.", - "maxLength": 100 - }, - "Cost Center Name": { - "type": "string", - "description": "Cost Center Name in SAP Fieldglass.", - "maxLength": 200 - }, - "Work Order/Work Order Revision Owner": { - "type": "string", - "description": "Work Order Owner?s name.", - "maxLength": 100 - }, - "Vendor Name": { - "type": "string", - "description": "Supplier name.", - "maxLength": 200 - }, - "Work Order ID": { - "type": "string", - "description": "Work Order ID.", - "maxLength": 14 - }, - "Bill Rate": { - "type": "integer", - "format": "float", - "description": "Worker?s Bill Rate that is associated to the Rate\nCategory/UOM listed in the previous field." - }, - "Start Date": { - "type": "string", - "format": "date", - "description": "Work order start date." - }, - "Security ID": { - "type": "string", - "description": "This column will only appear in the file if the security ID\nfield functionality is activated in SAP Fieldglass for the\nbuyer. If the functionality is not activated, this column\nwill not be in the file.", - "maxLength": 100 - }, - "Currency": { - "type": "string", - "description": "ISO currency designation (ex. USD).", - "maxLength": 100 - }, - "[c]Work Order Custom Fields": { - "type": "string", - "description": "Custom fields found on the work order/work order revision. \nIf there are many custom fields, there will be many columns.\nColumn header format will be:\n?[c]modulename_custom field name? (i.e. [c] followed by\nmodule custom text lowercase with no spaces, followed by\nunderscore, followed by the custom field name text as\ndefined by users in the SAP Fieldglass application.)", - "maxLength": 4000 - }, - "Job Posting Title": { - "type": "string", - "description": "Job Posting?s Title or SOW Name for SOW Workers.", - "maxLength": 100 - }, - "Worker ID": { - "type": "string", - "description": "14-character alphanumeric SAP Fieldglass Worker ID.", - "maxLength": 14 - }, - "Business Unit Name": { - "type": "string", - "description": "Business Unit Name.", - "maxLength": 100 - }, - "Site Name": { - "type": "string", - "description": "Site Name.", - "maxLength": 100 - }, - "Buyer Code": { - "type": "string", - "description": "Buyer Company Code.", - "maxLength": 4 - }, - "Status": { - "type": "string", - "description": "Status of the worker.", - "maxLength": 50 - }, - "Pay Rate": { - "type": "integer", - "format": "float", - "description": "Worker?s Pay Rate that is associated to the Rate Category/UOM\nlisted in the previous field. \nIf Supplier did not enter a Pay Rate, 0.00 will be\ndisplayed." - }, - "Vendor Number": { - "type": "string", - "description": "SAP Fieldglass Supplier code for buyer.", - "maxLength": 4 - }, - "Sequence": { - "type": "number", - "description": "Work Order Revision Number." - }, - "Person ID": { - "type": "string", - "description": "Unique identifier for the worker as a person.", - "maxLength": 24 - }, - "Cost Center Code": { - "type": "string", - "description": "Cost Center Code in SAP Fieldglass.", - "maxLength": 200 - }, - "[c]Worker User Person Custom Fields": { - "type": "string", - "description": "Custom fields found on the worker user person\nIf there are many custom fields, there will be many columns.\nColumn header format will be: \n?[c]modulename_custom field name? (i.e. [c] followed by\nmodule custom text lowercase with no spaces, followed by\nunderscore, followed by the custom field name text as\ndefined by users in the SAP Fieldglass application.)", - "maxLength": 4000 - }, - "Rate Category /UOM": { - "type": "string", - "description": "Worker?s Rate Category/Unit Of Measure for which the\ncorresponding rate will be displayed. \nMore than one Rate Category/UOM may exist for a single\nWorker. If this is the case a new line will appear for each\nassociated Rate Category/UOM in this file.", - "maxLength": 100 - }, - "Segmented Object Detail": { - "type": "string", - "description": "Segmented Object Detail string. Segments will be separated by\ndelimiter on the Segmented Object.\nValid delimiters are colon (:), semi-colon (;), pipe (|), and\ndash (-).\nRequired if ?Enable Segmented Object Detail? configuration is\nset.\nThis field is mutually exclusive with GL Account fields.\nMore than one string can appear for a cost center.", - "maxLength": 2000 - }, - "End Date": { - "type": "string", - "format": "date", - "description": "Work order end date." - }, - "Worker Email": { - "type": "string", - "description": "Worker?s e-mail address.", - "maxLength": 100 - }, - "Work Order/Work Order Revision Owner Employee ID": { - "type": "string", - "description": "Work Order Owner?s Employee ID.", - "maxLength": 50 - }, - "Last Name": { - "type": "string", - "description": "Last name of the Worker as defined in SAP Fieldglass.", - "maxLength": 100 - }, - "Site Code": { - "type": "string", - "description": "Site Code.", - "maxLength": 100 - }, - "Business Unit Code": { - "type": "string", - "description": "Business Unit Code.", - "maxLength": 100 - } - } - } - } -} diff --git a/airbyte-integrations/connectors/source-sap-fieldglass/source_sap_fieldglass/source.py b/airbyte-integrations/connectors/source-sap-fieldglass/source_sap_fieldglass/source.py index 6f1e1f46ef75d..ba6398d40734b 100644 --- a/airbyte-integrations/connectors/source-sap-fieldglass/source_sap_fieldglass/source.py +++ b/airbyte-integrations/connectors/source-sap-fieldglass/source_sap_fieldglass/source.py @@ -1,5 +1,5 @@ # -# Copyright (c) 2023 Airbyte, Inc., all rights reserved. +# Copyright (c) 2024 Airbyte, Inc., all rights reserved. # from airbyte_cdk.sources.declarative.yaml_declarative_source import YamlDeclarativeSource diff --git a/airbyte-integrations/connectors/source-sap-fieldglass/source_sap_fieldglass/spec.yaml b/airbyte-integrations/connectors/source-sap-fieldglass/source_sap_fieldglass/spec.yaml deleted file mode 100644 index 0360b26ca25ff..0000000000000 --- a/airbyte-integrations/connectors/source-sap-fieldglass/source_sap_fieldglass/spec.yaml +++ /dev/null @@ -1,13 +0,0 @@ -documentationUrl: https://docs.airbyte.com/integrations/sources/sap-fieldglass -connectionSpecification: - $schema: http://json-schema.org/draft-07/schema# - title: Sap Fieldglass Spec - type: object - required: - - api_key - additionalProperties: true - properties: - api_key: - type: string - description: API Key - airbyte_secret: true diff --git a/docs/integrations/sources/sap-fieldglass.md b/docs/integrations/sources/sap-fieldglass.md index 439926fbd2304..dfff8168577ff 100644 --- a/docs/integrations/sources/sap-fieldglass.md +++ b/docs/integrations/sources/sap-fieldglass.md @@ -20,7 +20,8 @@ This page contains the setup guide and reference information for the SAP Fieldgl ## Changelog -| Version | Date | Pull Request | Subject | -| :------ | :--------- | :---------------------------------------------- | :------------- | +| Version | Date | Pull Request | Subject | +| :------ | :--------- | :---------------------------------------------- |:--------------------------------------------| +| 0.1.2 | 2024-05-28 | [38689](https://github.com/airbytehq/airbyte/pull/38689) | Make connector compatible with Builder | | 0.1.1 | 2024-05-20 | [38384](https://github.com/airbytehq/airbyte/pull/38384) | [autopull] base image + poetry + up_to_date | -| 0.1.0 | 2022-10-22 | https://github.com/airbytehq/airbyte/pull/18656 | Initial commit | +| 0.1.0 | 2022-10-22 | https://github.com/airbytehq/airbyte/pull/18656 | Initial commit |