https://linen.dev logo
#contributing-to-airbyte
Title
# contributing-to-airbyte
m

Martin Larsson

10/10/2021, 1:17 PM
Hi! Im developing a custom connector for an API and I just added a second stream but I am unable to make the new stream appear when selecting streams to sync in the UI. I think I need som help here.
u

user

10/10/2021, 1:17 PM
I have added the new stream in source.py
Copy code
class Patient(ProvetStream):
    primary_key = "url"

    def path(
        self, stream_state: Mapping[str, Any] = None, stream_slice: Mapping[str, Any] = None, next_page_token: Mapping[str, Any] = None
    ) -> str:
    
        return "patient"
u

user

10/10/2021, 1:18 PM
I have also added a patient.json in the source_provet folder
Copy code
{
    "$schema": "<http://json-schema.org/draft-07/schema#>",
    "type": "object",
    "properties": {
        "id": {
          "type": "integer"
        },
        "url": {
            "type": "string"
        },
        "client": {
            "type": "string"
        },
        "name": {
            "type": "string"
        },
u

user

10/10/2021, 1:19 PM
Then I rebuilt the connector with a new tag
docker build . -t airbyte/source-provet:dev-6
u

user

10/10/2021, 1:19 PM
Then I changed the version to dev-6 under settings->sources
m

Martin Larsson

10/10/2021, 1:21 PM
Then I tried to update (refresh schema) the schema in the connection settings. But I see only changes I made to the already existing stream but the new stream does not show up. Also tried removing the connection and the source and added it agin but no luck.
u

user

10/10/2021, 2:32 PM
Can you check if you have added your stream in source.py
u

user

10/10/2021, 4:11 PM
I have no such file in VS code. Where should it reside?
u

user

10/10/2021, 5:17 PM
Sorry my bad it’s source.py
j

Jeremy Branham

10/10/2021, 7:00 PM
Dang! I missed adding it in the returned array in the
def streams
function! Trying it now.
u

user

10/12/2021, 2:52 PM
Did it work @Martin Larsson?
4 Views