I have made a app which uses airbyte apis, I have ...
# replication-ask-ai
c
I have made a app which uses airbyte apis, I have a doubt on discover schema api, When I make a connection it does discover schema, and when I add a table in background to the source and run the discover schema again the streams are not increasing, but when I make a new connection the streams are updating, can't we update streams in existing connection? @kapa.ai
k
Airbyte can update streams on an existing connection, but there are two different things happening: 1. Discovering schema vs. applying it to the connection - The discover schema operation (UI “Refresh source schema” or API
/v1/sources/discover_schema
) only fetches the latest schema from the source. It shows up in the “Refreshed source schema” dialog / result, but it does not automatically change what the connection syncs unless your connection settings or manual actions apply it. [[Manual refresh](https://docs.airbyte.com/platform/using-airbyte/schema-change-management#manually-refresh-the-source-schema)] - In the UI you must then review the changes and Save on the Schema tab for them to take effect on that connection. [[Configuring schemas](https://docs.airbyte.com/platform/using-airbyte/configuring-schema)] 2. Connection-level schema change behavior On each connection there is a “Detect and Propagate Schema Changes” setting that controls what happens when new streams/fields appear: - Propagate field changes only – only column changes are auto-applied; new streams are ignored. [[Detect & propagate](https://docs.airbyte.com/platform/using-airbyte/schema-change-management#detect-and-propagate-schema-changes-connection-setting)] - Propagate all field and stream changes – new streams and field changes are automatically added to the connection. [[Detect & propagate](https://docs.airbyte.com/platform/using-airbyte/schema-change-management#detect-and-propagate-schema-changes-connection-setting)] - Approve all changes myself – schema changes are detected but **not propagated**; you must manually approve and save them on the Schema tab. [[Detect & propagate](https://docs.airbyte.com/platform/using-airbyte/schema-change-management#detect-and-propagate-schema-changes-connection-setting)] So in your case: - When you create a new connection, it runs discovery and initializes its schema from the latest discovery, so you see the new table as a new stream. - When you re-run discovery via API on an existing source, you’re only updating the discovered schema; whether the connection’s streams “increase” depends on: - the connection’s “Detect and Propagate Schema Changes” setting, and - whether you then apply the refreshed schema (manually or via the appropriate API that updates the connection’s catalog). The knowledge sources show the existence of the discovery API and the behavior above, but they do not provide a full, documented example of how to programmatically “apply” a discovered schema to an existing connection via API; they only confirm you can call
/v1/sources/discover_schema
and then update the connection. [[Trigger schema detection](https://discuss.airbyte.io/t/1952); [Manual refresh](https://docs.airbyte.com/platform/using-airbyte/schema-change-management#manually-refresh-the-source-schema)] If you want new tables to automatically appear as streams on existing connections without manual approval, ensure the connection is set to “Propagate all field and stream changes”.