https://dagster.io/ logo
#ask-community
Title
# ask-community
m

Matt Carrier

01/27/2023, 6:43 PM
Hi, I'm very new to Dagster and Airbyte but it appears in the assets_modern_data_stack it is using some of the Airbyte API endpoints to list connections and what not. It seems like previously these endpoints were unauthenticated but now they all require a username/password to access. Because of this the example is not working because all these endpoints are returning an 401
y

yuhan

01/27/2023, 6:57 PM
thanks for flagging. let me repro that on my end.
m

Matt Carrier

01/27/2023, 9:46 PM
I have it working and had to make the following changes: 1. In constants.py -> AIRBYTE_CONFIG = {"host": "localhost", "port": "8000","username":"airbyte", "password":"password"} 2. in setup_airbyte.py -> a. def setup_airbyte(): b. client = AirbyteResource(host="localhost", port="8000", use_https=False, username="airbyte", password="password") 3. in forcasting.py
Copy code
@asset(compute_kind="python")
def order_forecast_model(daily_order_summary: pd.DataFrame) -> np.ndarray:
    """Model parameters that best fit the observed data."""
    train_set = daily_order_summary.to_numpy()
    xdata = pd.to_datetime(train_set[:,0]).astype(np.int64)
    print(xdata)
    print(train_set[:,2])
    return optimize.curve_fit(
        f=model_func, xdata=xdata, ydata=train_set[:, 2], p0=[10, 100]
    )[0]