Benedikt Buchert
01/21/2023, 3:57 AMdef connector_to_asset_key_fn(_, item_name):
config = {
"google_ads_123": "google_ads",
"linkedin_123": "linkedin"
}
path = item_name.split(".")
path[0] = config[path[0]]
return AssetKey(path=path)
Anf then:
fivetran_assets = load_assets_from_fivetran_instance(
fivetran=fivetran_instance,
key_prefix=["dbt_source"],
connector_to_asset_key_fn=connector_to_asset_key_fn
)
Nicolas May
02/15/2023, 11:00 PMgoogle_ads
, another approach might be something like this:
connectors_to_include = ["my_conn"]
fivetran_assets = load_assets_from_fivetran_instance(
fivetran_instance,
connector_filter=lambda meta: meta.name in connectors_to_include,
connector_to_asset_key_fn=lambda _, table: AssetKey(path=table.split(".")[-1]),
key_prefix=["dbt_source", "google_ads"],
)