https://dagster.io/ logo
#integration-airbyte
Title
# integration-airbyte
p

Punyawee Chananan

12/14/2022, 2:31 AM
Hello! I'm new to both dagster and airbyte having trouble getting asset in dagster. Was following the tutorial herehttps://docs.dagster.io/integrations/airbyte#step-1-connecting-to-airbyte . Get workspace to working but nothing else. I was running airbyte on docker with 8000 port so it should be correct Here's the code
Copy code
from dagster import repository, with_resources, asset, define_asset_job, ScheduleDefinition
from dagster_airbyte import airbyte_resource, build_airbyte_assets, load_assets_from_airbyte_instance
import os
from dotenv import load_dotenv


# Get user/password env
load_dotenv()

airbyte_user = os.getenv('airbyte_user')
airbyte_password = os.getenv('airbyte_password')
airbyte_password = os.getenv('airbyte_password')

# Connect to Airbyte
airbyte_instance = airbyte_resource.configured(
    {
        "host": "localhost",
        "port": "8000",
        # If using basic auth, include username and password:
        "username": airbyte_user,
        "password": airbyte_password, # default password
    }
)

# Use the airbyte_instance resource we defined in Step 1
airbyte_assets = load_assets_from_airbyte_instance(airbyte_instance)

# materialize all assets in the repository
run_everything_job = define_asset_job("run_everything", selection="*")


@repository
def my_repo():
    return [
        airbyte_assets,
        ScheduleDefinition(
            job=run_everything_job,
            cron_schedule="@weekly",
        ),
    ]
Nevermind solve it.
🙏 1
2 Views