Skip to content

Commit

Permalink
馃毃Source Smartsheets - add support for ingesting metadata fields (#22382)
Browse files Browse the repository at this point in the history
* Adds metadata field

* update requirements to support for python 3.10

* update sample config to reflect metadata fields

* modify spec and sheet to include metadata fields

* update tests to account for metadata fields

* update using python 3.10 base image

* fix linting errors

* update test files for integrations tests

* update readme to include info on metadata fields

* update acceptance-test yaml format

* update docs include metadata info and change log

* Adds metadata field

* update requirements to support for python 3.10

* update sample config to reflect metadata fields

* modify spec and sheet to include metadata fields

* update tests to account for metadata fields

* update using python 3.10 base image

* fix linting errors

* update test files for integrations tests

* update readme to include info on metadata fields

* resolve merge conflicts

* update docs include metadata info and change log

* address merge conflict issues

* update sample config files for integrations tests

* fix spec and acceptance tests config

* revert image change from python 3.10 to 3.9

* update metadata fields in spec to enum

* bump version

---------

Co-authored-by: jeanluciano <jeanluciano@mailbox.org>
Co-authored-by: Sajarin <sajarindider@gmail.com>
Co-authored-by: Mal Hancock <mallory@archangelic.space>
  • Loading branch information
4 people committed Jun 2, 2023
1 parent 096d9e8 commit 2995ced
Show file tree
Hide file tree
Showing 17 changed files with 340 additions and 37 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@ COPY $CODE_PATH ./$CODE_PATH
ENV AIRBYTE_ENTRYPOINT "python /airbyte/integration_code/main.py"
ENTRYPOINT ["python", "/airbyte/integration_code/main.py"]

LABEL io.airbyte.version=1.0.2
LABEL io.airbyte.version=1.1.0
LABEL io.airbyte.name=airbyte/source-smartsheets
22 changes: 22 additions & 0 deletions airbyte-integrations/connectors/source-smartsheets/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,28 @@ Airbyte will ask for this token when you configure the source connector. You wil
- File
- Properties

Optionally you can include a list of metadata fields to be ingested by the connector, these fields are optional however the config file does require the metadata_fields be present, see sample_config.json under integrations tests for an example.

| Supported Metadata Fields |
|------|
|sheetcreatedAt|
|sheetid|
|sheetmodifiedAt|
|sheetname|
|sheetpermalink|
|sheetversion|
|sheetaccess_level|
|row_id|
|row_access_level|
|row_created_at|
|row_created_by|
|row_expanded|
|row_modified_by|
|row_parent_id|
|row_permalink|
|row_number|
|row_version|

## Local development

### Prerequisites
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"aws_s3_sample": {
"modifiedAt": "2222-03-07T11:30:00+00:00"
"modifiedAt": "2250-03-07T11:30:00+00:00"
}
}
Original file line number Diff line number Diff line change
@@ -1,27 +1,28 @@
{
"streams": [
{
"stream": {
"name": "aws_s3_sample",
"json_schema": {
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"id": { "type": "string" },
"first_name": { "type": "string" },
"last_name": { "type": "string" },
"gender": { "type": "string" },
"ip_address": { "type": "string" },
"primary_email": { "type": "string" },
"dob": { "type": "string", "format": "date" },
"modifiedAt": { "type": "string", "format": "date-time" }
}
"streams": [
{
"stream": {
"name": "aws_s3_sample",
"json_schema": {
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"id": { "type": "string" },
"first_name": { "type": "string" },
"last_name": { "type": "string" },
"gender": { "type": "string" },
"ip_address": { "type": "string" },
"primary_email": { "type": "string" },
"dob": { "type": "string", "format": "date" },
"modifiedAt": { "type": "string", "format": "date-time" }
}
},
"supported_sync_modes": ["full_refresh"]
},
"supported_sync_modes": ["full_refresh"]
},
"sync_mode": "full_refresh",
"cursor_field": null,
"destination_sync_mode": "overwrite"
}
]
"sync_mode": "full_refresh",
"cursor_field": null,
"destination_sync_mode": "overwrite"
}
]
}

Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"access_token": "fake-token",
"spreadsheet_id": "fake-id"
"spreadsheet_id": "fake-id",
"metadata_fields": ["fake", 33]
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,23 @@
{
"access_token": "access-token",
"spreadsheet_id": "spreadsheet-id"
"spreadsheet_id": "spreadsheet-id",
"metadata_fields": [
"sheetcreatedAt",
"sheetid",
"sheetmodifiedAt",
"sheetname",
"sheetpermalink",
"sheetversion",
"sheetaccess_level",
"row_id",
"row_access_level",
"row_created_at",
"row_created_by",
"row_expanded",
"row_modified_by",
"row_parent_id",
"row_permalink",
"row_number",
"row_version"
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ data:
connectorSubtype: api
connectorType: source
definitionId: 374ebc65-6636-4ea0-925c-7d35999a8ffc
dockerImageTag: 1.0.2
dockerImageTag: 1.1.0
dockerRepository: airbyte/source-smartsheets
githubIssueLabel: source-smartsheets
icon: smartsheet.svg
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"Airbyte-connector Test": {
"modifiedAt": "2250-03-07T11:30:00+00:00"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
{
"streams": [
{
"sync_mode": "full_refresh",
"destination_sync_mode": "overwrite",
"stream": {
"name": "Airbyte-connector Test",
"supported_sync_modes": [
"full_refresh",
"incremental"
],
"source_defined_cursor": false,
"source_defined_primary_key": [["race"]],
"json_schema": {
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"race": {
"type": "string"
},
"height": {
"type": "string"
},
"weight": {
"type": "string"
},
"speed": {
"type": "string"
},
"strength": {
"type": "string"
},
"dexterity": {
"type": "string"
},
"constitution": {
"type": "string"
},
"intelligence": {
"type": "string"
},
"wisdom": {
"type": "string"
},
"charisma": {
"type": "string"
},
"modifiedAt": {
"type": "string",
"format": "date-time"
},
"row_id": {
"type": "string"
}
}
}
}
}
]
}

0 comments on commit 2995ced

Please sign in to comment.