Aiman
05/16/2023, 4:22 AMValueError: Airbyte connections are not in sync with provided configuration
. I run it from my docker compose in virtual machine. Any insight from it? I will share my code as wellfrom dagster import asset, repository
from dagster_airbyte import (
AirbyteManagedElementReconciler,
airbyte_resource,
AirbyteConnection,
AirbyteSyncMode,
load_assets_from_connections,
)
from dagster_airbyte.managed.generated.sources import PokeapiSource
from dagster_airbyte.managed.generated.destinations import BigqueryDestination
airbyte_instance = airbyte_resource.configured(
{
"host": HOST,
"port": "8000",
"username": "airbyte",
"password": "password",
}
)
pokeapi_source = PokeapiSource(
name="pokeapi_to_bq",
pokemon_name="snorlax",
)
bigquery_destination = BigqueryDestination(
name="bigquery",
project_id="winter-cab-380906",
dataset_location="asia-southeast2",
dataset_id="airbyte_testing",
loading_method=BigqueryDestination.StandardInserts(),
credentials_json='credentials.json', # dari mana?
)
stargazer_connection = AirbyteConnection(
name="fetch_stargazer",
source=pokeapi_source,
destination=bigquery_destination,
stream_config={"stargazers": AirbyteSyncMode.incremental_append_dedup()},
normalize_data=True,
)
airbyte_reconciler = AirbyteManagedElementReconciler(
airbyte=airbyte_instance,
connections=[stargazer_connection],
)
# load airbyte connection from above pythonic definitions
airbyte_assets = load_assets_from_connections(
airbyte=airbyte_instance,
connections=[stargazer_connection],
key_prefix=["bigquery"],
)
Joel Olazagasti
05/16/2023, 3:53 PMAiman
05/16/2023, 4:47 PMJoel Olazagasti
05/16/2023, 4:52 PMAiman
05/16/2023, 4:58 PMJoel Olazagasti
05/16/2023, 5:02 PMAiman
05/16/2023, 5:12 PMJoel Olazagasti
05/16/2023, 6:54 PMapply
command is what takes the configuration you've defined in Dagster and pushes it to Airbyte. You will need to run that every time you make a change to your Airbyte definitions in you Dagster code. The Dagster application itself does not automatically apply your configurations to the Airbyte application, it just expects them to be there as defined. It is up to you, or your CI pipeline, to make sure those configurations are applied.Aiman
05/17/2023, 2:09 PMJoel Olazagasti
05/17/2023, 2:28 PM