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

SurveyCTO stream without SubmissionDate #97

Closed
fatchat opened this issue Aug 13, 2024 · 2 comments · Fixed by #98
Closed

SurveyCTO stream without SubmissionDate #97

fatchat opened this issue Aug 13, 2024 · 2 comments · Fixed by #98
Assignees

Comments

@fatchat
Copy link

fatchat commented Aug 13, 2024

Dwani has a SurveyCTO stream without a SubmissionDate field

2024-08-13 09:50:28 source > Marking stream education_infrastructure_ as STARTED
2024-08-13 09:50:28 source > Encountered an exception while reading stream education_infrastructure_
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/airbyte_cdk/sources/abstract_source.py", line 135, in read
    yield from self._read_stream(
  File "/usr/local/lib/python3.10/site-packages/airbyte_cdk/sources/abstract_source.py", line 216, in _read_stream
    stream_instance.state = stream_state  # type: ignore # we check that state in the dir(stream_instance)
  File "/airbyte/integration_code/source_surveycto/source.py", line 79, in state
    self._cursor_value = value[self.cursor_field]
KeyError: 'SubmissionDate'

Our connector assumes the existence of this field. Is this an incorrect assumption?

  • Can we start by looking at their API response

Update: @jakejh advises us to prefer CompletionDate to SubmissionDate

@fatchat fatchat added this to Dalgo Aug 13, 2024
@fatchat fatchat converted this from a draft issue Aug 13, 2024
@fatchat fatchat self-assigned this Aug 16, 2024
@fatchat fatchat moved this to Todo in Dalgo Aug 16, 2024
@fatchat fatchat moved this from Todo to In Progress in Dalgo Aug 16, 2024
@fatchat
Copy link
Author

fatchat commented Aug 17, 2024

ugh

Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/airbyte_cdk/sources/abstract_source.py", line 133, in read
    yield from self._read_stream(
  File "/usr/local/lib/python3.10/site-packages/airbyte_cdk/sources/abstract_source.py", line 225, in _read_stream
    stream_instance.state = stream_state  # type: ignore # we check that state in the dir(stream_instance)
  File "/airbyte/integration_code/source_surveycto/source.py", line 174, in state
    self._cursor_value = value[self.cursor_field]
KeyError: 'CompletionDate'

Important: This command can only be run by one of the repository admins:
Usage: ./tools/bin/get_repo_admins.sh <personal_access_token>

@fatchat
Copy link
Author

fatchat commented Aug 17, 2024

correction: the connector wasn't looking in the API response - which does contain the SubmissionDate - it was looking in the (empty) saved state

putting in a check fixes it

Important: This command can only be run by one of the repository admins:
Usage: ./tools/bin/get_repo_admins.sh <personal_access_token>

@fatchat fatchat linked a pull request Aug 17, 2024 that will close this issue
2 tasks
@github-project-automation github-project-automation bot moved this from In Progress to Done in Dalgo Aug 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

1 participant