Hi Airbyte Team/Community, I want to use <https://...
# help-connector-development
s
Hi Airbyte Team/Community, I want to use https://airbytehq.github.io/PyAirbyte/airbyte.html and develop Field level Selection and support of Scheduling Using cdk . I see currently we have way to select Stream but there is no way to select fields in native connector builder code . This limitations block us creating dynamic field configuration and object during runtime airbyte connection creation for given source and destination My template code please refer below
Copy code
import airbyte as ab
from airbyte.cloud import CloudWorkspace
from airbyte.cloud.connectors import CloudSource
from airbyte_api import Workspaces
from anyio.to_interpreter import run_sync

source: ab.Source = ab.get_source("source-hubspot",version="5.8.20", docker_image=True, install_if_missing=True)


source.set_config(
    config={
        "credentials": {
            "credentials_title": "Private App Credentials",
            "access_token": "[token]"
        }
    }
)

source.select_streams(streams=["contacts"])

source.read()

# Optionally, set a custom cursor field
source.set_cursor_key("contacts", "updatedAt")


#read_result  = source.read()
destination:ab.Destination = ab.get_destination("destination-s3")


destination.set_config(
    config={
        "s3_bucket_region": "us-east-1",
        "format": {
            "format_type": "JSONL",
            "flattening": "No flattening"
        },
        "access_key_id": "ACCESS KEY",
        "secret_access_key": "SECRET KEY",
        "s3_bucket_name": "sumit-digi",
        "s3_bucket_path": "data_sync/hubspot_contacts/data",
        "file_name_pattern": "{date:yyyy_MM}_{timestamp}_{part_number}.{sync_id}"

    }
)


workspace = CloudWorkspace(client_secret="secret",
                           client_id="client id",
                           workspace_id="workspace id",
                           api_root="https://api.airbyte.com/v1",
                           )


import uuid
cloudsource:CloudSource = workspace.deploy_source(source=source,name="sumit-final")
clouddest = workspace.deploy_destination(destination=destination, name="raina-final")
conn = workspace.deploy_connection(connection_name="sumit-raina-vastika",source=cloudsource,selected_streams=["contacts"],destination=clouddest)

conn.run_sync()

print("connection created")
Here we can select streams and set to source
Copy code
source.select_streams(streams=["contacts"])