From e0bcd9f400d9e1f71ca865cf33ecd4dab196c3e4 Mon Sep 17 00:00:00 2001 From: Chris Gwilliams <517923+encima@users.noreply.github.com> Date: Wed, 5 Jun 2024 12:18:35 +0300 Subject: [PATCH] rename to include CDC and link to existing guides --- .../DatabaseReplicationConfig.tsx | 86 ------------------- .../DatabaseReplicationConfig/index.tsx | 7 -- .../tools/AirbyteConfig.mdx | 1 - .../tools/EstuaryConfig.mdx | 0 .../tools/FivetranConfig.mdx | 0 .../tools/StitchConfig.mdx | 0 .../NavigationMenu.constants.ts | 48 +++-------- apps/docs/components/index.tsx | 2 - .../faq.mdx} | 20 ++++- .../logical-replication-.mdx} | 0 .../overview.mdx | 0 .../services/etl-airbyte.mdx | 0 .../services/etl-fivetran.mdx | 0 .../services/etl-materialize.mdx | 0 .../services/etl-stitch.mdx | 0 .../replication/services/etl-estuary.mdx | 6 -- 16 files changed, 29 insertions(+), 141 deletions(-) delete mode 100644 apps/docs/components/DatabaseReplicationConfig/DatabaseReplicationConfig.tsx delete mode 100644 apps/docs/components/DatabaseReplicationConfig/index.tsx delete mode 100644 apps/docs/components/DatabaseReplicationConfig/tools/AirbyteConfig.mdx delete mode 100644 apps/docs/components/DatabaseReplicationConfig/tools/EstuaryConfig.mdx delete mode 100644 apps/docs/components/DatabaseReplicationConfig/tools/FivetranConfig.mdx delete mode 100644 apps/docs/components/DatabaseReplicationConfig/tools/StitchConfig.mdx rename apps/docs/content/guides/database/{replication/considerations.mdx => replication-cdc/faq.mdx} (59%) rename apps/docs/content/guides/database/{replication/logical-replication-intro.mdx => replication-cdc/logical-replication-.mdx} (100%) rename apps/docs/content/guides/database/{replication => replication-cdc}/overview.mdx (100%) rename apps/docs/content/guides/database/{replication => replication-cdc}/services/etl-airbyte.mdx (100%) rename apps/docs/content/guides/database/{replication => replication-cdc}/services/etl-fivetran.mdx (100%) rename apps/docs/content/guides/database/{replication => replication-cdc}/services/etl-materialize.mdx (100%) rename apps/docs/content/guides/database/{replication => replication-cdc}/services/etl-stitch.mdx (100%) delete mode 100644 apps/docs/content/guides/database/replication/services/etl-estuary.mdx diff --git a/apps/docs/components/DatabaseReplicationConfig/DatabaseReplicationConfig.tsx b/apps/docs/components/DatabaseReplicationConfig/DatabaseReplicationConfig.tsx deleted file mode 100644 index ae54dbbb291..00000000000 --- a/apps/docs/components/DatabaseReplicationConfig/DatabaseReplicationConfig.tsx +++ /dev/null @@ -1,86 +0,0 @@ -import { useEffect, useReducer, useRef } from 'react' -import { ReplicationItems } from '../Navigation/NavigationMenu/NavigationMenu.constants' -import { IconPanel } from 'ui-patterns/IconPanel' -import { Dialog, DialogContent, DialogHeader, DialogSection, Heading } from 'ui' -import AirbyteConfig from './tools/AirbyteConfig.mdx' -import StitchConfig from './tools/StitchConfig.mdx' -import FivetranConfig from './tools/FivetranConfig.mdx' -import EstuaryConfig from './tools/EstuaryConfig.mdx' - - -const reducer = (_, action: (typeof ReplicationItems)[number] | undefined) => { - const url = new URL(document.location.href) - if (action) { - url.searchParams.set('showSmsProvider', encodeURIComponent(action.name)) - } else { - url.searchParams.delete('showSmsProvider') - } - window.history.replaceState(null, '', url) - return action -} - -const AuthSmsProviderConfig = () => { - const [selectedProvider, setSelectedProvider] = useReducer(reducer, undefined) - - useEffect(() => { - const providerName = new URLSearchParams(document.location.search ?? '').get('showSmsProvider') - if (!providerName) return - - const provider = ReplicationItems.find((item) => item.name === decodeURIComponent(providerName)) - if (provider) setSelectedProvider(provider) - }, []) - - const headingRef = useRef(null) - - return ( - <> -
-

- Configuring SMS Providers -

-
- {ReplicationItems.map((provider) => ( - - ))} -
-
- !open && setSelectedProvider(undefined)} - > - {selectedProvider && ( - { - evt.preventDefault() - headingRef.current?.focus() - }} - > - - - {selectedProvider.name} - - - - {selectedProvider.name.toLowerCase().includes('airbyte') && } - {selectedProvider.name.toLowerCase().includes('estuary') && } - {selectedProvider.name.toLowerCase().includes('fivetran') && } - {selectedProvider.name.toLowerCase().includes('stitch') && } - - - )} - - - ) -} - -export default AuthSmsProviderConfig diff --git a/apps/docs/components/DatabaseReplicationConfig/index.tsx b/apps/docs/components/DatabaseReplicationConfig/index.tsx deleted file mode 100644 index 451e712220f..00000000000 --- a/apps/docs/components/DatabaseReplicationConfig/index.tsx +++ /dev/null @@ -1,7 +0,0 @@ -import dynamic from 'next/dynamic' - -const LazyConfig = dynamic(() => import('./DatabaseReplicationConfig')) - -const DatabaseReplicationConfig = () => - -export { DatabaseReplicationConfig } diff --git a/apps/docs/components/DatabaseReplicationConfig/tools/AirbyteConfig.mdx b/apps/docs/components/DatabaseReplicationConfig/tools/AirbyteConfig.mdx deleted file mode 100644 index 33f5a345697..00000000000 --- a/apps/docs/components/DatabaseReplicationConfig/tools/AirbyteConfig.mdx +++ /dev/null @@ -1 +0,0 @@ -## Prerequisites \ No newline at end of file diff --git a/apps/docs/components/DatabaseReplicationConfig/tools/EstuaryConfig.mdx b/apps/docs/components/DatabaseReplicationConfig/tools/EstuaryConfig.mdx deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/apps/docs/components/DatabaseReplicationConfig/tools/FivetranConfig.mdx b/apps/docs/components/DatabaseReplicationConfig/tools/FivetranConfig.mdx deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/apps/docs/components/DatabaseReplicationConfig/tools/StitchConfig.mdx b/apps/docs/components/DatabaseReplicationConfig/tools/StitchConfig.mdx deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/apps/docs/components/Navigation/NavigationMenu/NavigationMenu.constants.ts b/apps/docs/components/Navigation/NavigationMenu/NavigationMenu.constants.ts index db286bd1fe2..d5cfafbd9cd 100644 --- a/apps/docs/components/Navigation/NavigationMenu/NavigationMenu.constants.ts +++ b/apps/docs/components/Navigation/NavigationMenu/NavigationMenu.constants.ts @@ -499,34 +499,6 @@ export const PhoneLoginsItems = [ }, ] -export const ReplicationItems = [ - { - name: 'Airbyte', - icon: '/docs/img/icons/airbyte-icon', - linkDescription: '', - url: '/guides/database/replication/airbyte', - }, - { - name: 'Estuary', - icon: '/docs/img/icons/estuary-icon', - url: '/guides/database/replication/estuary', - linkDescription: '', - }, - { - name: 'Fivetran', - icon: '/docs/img/icons/fivetran-icon', - url: '/guides/database/replication/fivetran', - linkDescription: - '', - }, - { - name: 'Stitch', - icon: '/docs/img/icons/stitch-icon', - url: '/guides/database/replication/stitch', - linkDescription: '', - }, -] - export const auth = { icon: 'auth', title: 'Auth', @@ -812,17 +784,17 @@ export const database: NavMenuConstant = { ], }, { - name: 'Replication', - url: '/guides/database/replication-analytics/overview', + name: 'CDC and Logical Replication', + url: '/guides/database/replication-cdc/overview', items: [ - { name: 'Overview', url: '/guides/database/replication/overview' }, - { name: 'Considerations', url: '/guides/database/replication/considerations' }, - { name: 'Logical Replication', url: '/guides/database/replication/logical-replication-intro' }, - { name: 'Replication with Airbyte', url: '/guides/database/replication/services/etl-airbyte' }, - { name: 'Replication with Estuary', url: '/guides/database/replication/services/etl-estuary' }, - { name: 'Replication with Fivetran', url: '/guides/database/replication/services/etl-fivetran' }, - { name: 'Replication with Materialize', url: '/guides/database/replication/services/etl-materialize' }, - { name: 'Replication with Stitch', url: '/guides/database/replication/services/etl-stitch' }, + { name: 'Logical Replication', url: '/guides/database/replication-cdc/logical-replication' }, + { name: 'FAQs', url: '/guides/database/replication/faq' }, + { name: 'CDC with Airbyte', url: '/guides/database/replication-cdc/services/etl-airbyte' }, + { name: 'CDC with Artie', url: '/partners/integrations/artie' }, + { name: 'CDC with Estuary', url: '/partners/integrations/estuary' }, + { name: 'CDC with Fivetran', url: '/guides/database/replication-cdc/services/etl-fivetran' }, + { name: 'CDC with Materialize', url: '/guides/database/replication-cdc/services/etl-materialize' }, + { name: 'CDC with Stitch', url: '/guides/database/replication-cdc/services/etl-stitch' }, ], }, { diff --git a/apps/docs/components/index.tsx b/apps/docs/components/index.tsx index caecf9cc47e..76ed777d98d 100644 --- a/apps/docs/components/index.tsx +++ b/apps/docs/components/index.tsx @@ -79,7 +79,6 @@ import { Extensions } from './Extensions' import { JwtGenerator } from './JwtGenerator' import { Mermaid } from './Mermaid' import { RealtimeLimitsEstimator } from './RealtimeLimitsEstimator' -import { DatabaseReplicationConfig } from './DatabaseReplicationConfig' const components = { ...markdownComponents, @@ -94,7 +93,6 @@ const components = { AuthProviders, AuthRateLimits, AuthSmsProviderConfig, - DatabaseReplicationConfig, Button, ButtonCard, CH, diff --git a/apps/docs/content/guides/database/replication/considerations.mdx b/apps/docs/content/guides/database/replication-cdc/faq.mdx similarity index 59% rename from apps/docs/content/guides/database/replication/considerations.mdx rename to apps/docs/content/guides/database/replication-cdc/faq.mdx index 4340fbff233..cd2f20b9bc1 100644 --- a/apps/docs/content/guides/database/replication/considerations.mdx +++ b/apps/docs/content/guides/database/replication-cdc/faq.mdx @@ -5,7 +5,7 @@ description: 'Considerations and FAQs when setting up replication' sidebar_label: 'Considerations' --- -## Why not use my Primary database? +# Why not use my Primary database? If you want to run analytics on your app, you may wonder why you could not just plug in your database connection string to an analytics tool and go. In some cases, you could, but we do not recommend it. Here's why: @@ -21,3 +21,21 @@ Your users want to create or view new content and your analytics queries want to If you accidentally drop a table, you might not want to restore your whole project from a backup so you can check these values in your external system before your boss finds out. + +# Which connection string should I use? + +Always use the direct connection string for logical replication. + +Connections through a pooler, such as Supavisor, will not work. + +# The tool I am using does not support IPv6 + +No worries! Simply enable the [IPv4 addon](/guides/platform/ipv4-address) for your project. + +# Should I use XMIN? + +Xmin is a different form of replication from logical replication and is only really designed to be used if logical replication is not available for your database (i.e. older versions of Postgresql). + +Xmin performs replication by checking the [xmin sytem column](https://www.postgresql.org/docs/current/ddl-system-columns.html) and determining if that row has already been synchronised. + +It does not capture deletion of data and is **not recommended**. \ No newline at end of file diff --git a/apps/docs/content/guides/database/replication/logical-replication-intro.mdx b/apps/docs/content/guides/database/replication-cdc/logical-replication-.mdx similarity index 100% rename from apps/docs/content/guides/database/replication/logical-replication-intro.mdx rename to apps/docs/content/guides/database/replication-cdc/logical-replication-.mdx diff --git a/apps/docs/content/guides/database/replication/overview.mdx b/apps/docs/content/guides/database/replication-cdc/overview.mdx similarity index 100% rename from apps/docs/content/guides/database/replication/overview.mdx rename to apps/docs/content/guides/database/replication-cdc/overview.mdx diff --git a/apps/docs/content/guides/database/replication/services/etl-airbyte.mdx b/apps/docs/content/guides/database/replication-cdc/services/etl-airbyte.mdx similarity index 100% rename from apps/docs/content/guides/database/replication/services/etl-airbyte.mdx rename to apps/docs/content/guides/database/replication-cdc/services/etl-airbyte.mdx diff --git a/apps/docs/content/guides/database/replication/services/etl-fivetran.mdx b/apps/docs/content/guides/database/replication-cdc/services/etl-fivetran.mdx similarity index 100% rename from apps/docs/content/guides/database/replication/services/etl-fivetran.mdx rename to apps/docs/content/guides/database/replication-cdc/services/etl-fivetran.mdx diff --git a/apps/docs/content/guides/database/replication/services/etl-materialize.mdx b/apps/docs/content/guides/database/replication-cdc/services/etl-materialize.mdx similarity index 100% rename from apps/docs/content/guides/database/replication/services/etl-materialize.mdx rename to apps/docs/content/guides/database/replication-cdc/services/etl-materialize.mdx diff --git a/apps/docs/content/guides/database/replication/services/etl-stitch.mdx b/apps/docs/content/guides/database/replication-cdc/services/etl-stitch.mdx similarity index 100% rename from apps/docs/content/guides/database/replication/services/etl-stitch.mdx rename to apps/docs/content/guides/database/replication-cdc/services/etl-stitch.mdx diff --git a/apps/docs/content/guides/database/replication/services/etl-estuary.mdx b/apps/docs/content/guides/database/replication/services/etl-estuary.mdx deleted file mode 100644 index c318296a691..00000000000 --- a/apps/docs/content/guides/database/replication/services/etl-estuary.mdx +++ /dev/null @@ -1,6 +0,0 @@ ---- -id: 'replication-estuary' -title: 'Replicating from Supabase to Estuary' -description: 'How to set up Logical Replication with Estuary' -sidebar_label: 'Replicating to Estuary' ---- \ No newline at end of file