if you have multiple tables with same names coming...
# replication-ask-ai
y
if you have multiple tables with same names coming from different postgres schemas, how do you name them differently? Perhaps adding the schema as prefix or something
k
Handling Same Table Names from Different Postgres Schemas There are a couple of approaches to avoid naming conflicts when syncing tables with the same name from different schemas/sources: 1. Use a Stream Prefix (Recommended) You can add a Stream Prefix in the connection settings. This prepends text to each stream name in the destination, making them unique: • Go to your connection in the Airbyte UI • Set a unique Stream prefix for each connection (e.g.,
schema1_
or
schema2_
) • This results in destination tables like
schema1_tablename
and
schema2_tablename
[Configuring Schemas] [Forum: dbt name conflict] 2. Use Unique Namespaces per Connection Instead of a prefix, you can configure each connection to write to a different destination namespace (schema). For example: • Connection 1 → writes to
schema1
in the destination • Connection 2 → writes to
schema2
in the destination This keeps tables isolated and avoids any naming collisions entirely. [Namespaces] Why This Matters Airbyte's normalization uses a global dbt file registry, meaning two tables with the same name — even in different schemas — can cause dbt to fail with a "two resources with the same name" error. The stream prefix or unique namespace approach resolves this. [Forum: dbt name conflict] Summary > Note: Airbyte does not currently support automatic schema-name injection into table names — you need to configure the prefix or namespace manually per connection. 👍 0 button 👎 0 button ℹ️ Tip: Mention @kapa.ai in the thread for follow-ups or DM the app for 1-to-1 help., with interactive elements
y
@kapa.ai I still want to write to the same schema, but with a custom table name
k
Based on the knowledge sources, I'm sorry but Airbyte does not currently support renaming individual streams/tables to a fully custom name. Here's what is and isn't possible: • ✅ Stream Prefix — you can prepend the same text to all streams in a connection (e.g.,
schema1_
→
schema1_tablename
). This is the closest option available. [Configuring Schemas] • ❌ Individual stream renaming — the docs explicitly state: "Airbyte does not allow for the renaming of individual streams at this time." [Configuring Schemas] • ❌ Specifying a target table name directly — this was raised as a feature request in the community but was confirmed as not possible at the time. [Forum: Postgres target table] Practical Workaround If you want everything in the same destination schema but with differentiated table names, the best available option is to use a unique stream prefix per connection. For example: After syncing, you can combine or transform the data downstream using dbt or SQL views in your destination. 👍 0 button 👎 0 button ℹ️ Tip: Mention @kapa.ai in the thread for follow-ups or DM the app for 1-to-1 help., with interactive elements
y
@kapa.ai Is there any issue using the same credentials across multiple source, connections, and destinations? So I can write data to respective schemas at destination
k
The knowledge sources don't contain enough detailed information to fully answer this question, but here's what can be gathered: Reusing Credentials Across Connections Sources: You can reuse the same source connector across multiple connections without issue. Connectors are explicitly designed to be reusable. [Add a Source] Destinations: Similarly, you can reuse the same destination connector across multiple connections — this is actually the standard pattern for writing to different schemas within the same database. Known Caveat: OAuth Sources If your sources use OAuth authentication, there is a known issue where OAuth credentials are scoped at the workspace level. This means configuring OAuth for a new connection can override credentials for all existing connections of the same source type, causing authentication failures. [GitHub Discussion] For non-OAuth sources (e.g., standard Postgres with username/password), this issue does not apply. Your Use Case For your scenario — same Postgres credentials across multiple source connections, writing to different schemas at the destination — this should work fine in principle: • Reuse the same source connector or create multiple sources with the same credentials • Set each connection to write to a unique destination namespace (schema) [Namespaces] • This avoids any stream uniqueness conflicts [Configuring Schemas] I'd recommend testing this in your specific environment, as the knowledge sources don't explicitly confirm all edge cases for credential reuse across destinations. 👍 0 button 👎 0 button ℹ️ Tip: Mention @kapa.ai in the thread for follow-ups or DM the app for 1-to-1 help.