From 2f3b78a405e309bcb3aaac42c558942211680b41 Mon Sep 17 00:00:00 2001 From: Nick Zelei <2420177+nickzelei@users.noreply.github.com> Date: Thu, 16 Jan 2025 09:26:52 -0800 Subject: [PATCH 1/5] NEOS-1719: fixes generate job surfacing unsupported transformers (#3150) --- .../jobs/[id]/source/components/DataGenConnectionCard.tsx | 2 +- .../(mgmt)/[account]/new/job/generate/single/schema/page.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/apps/web/app/(mgmt)/[account]/jobs/[id]/source/components/DataGenConnectionCard.tsx b/frontend/apps/web/app/(mgmt)/[account]/jobs/[id]/source/components/DataGenConnectionCard.tsx index c82b583bd7..137c55d6a5 100644 --- a/frontend/apps/web/app/(mgmt)/[account]/jobs/[id]/source/components/DataGenConnectionCard.tsx +++ b/frontend/apps/web/app/(mgmt)/[account]/jobs/[id]/source/components/DataGenConnectionCard.tsx @@ -280,7 +280,7 @@ export default function DataGenConnectionCard({ jobId }: Props): ReactElement { table: row.table, column: row.column, }, - 'sync' + 'generate' ) ); } diff --git a/frontend/apps/web/app/(mgmt)/[account]/new/job/generate/single/schema/page.tsx b/frontend/apps/web/app/(mgmt)/[account]/new/job/generate/single/schema/page.tsx index 1822233e82..b6f8cad0a9 100644 --- a/frontend/apps/web/app/(mgmt)/[account]/new/job/generate/single/schema/page.tsx +++ b/frontend/apps/web/app/(mgmt)/[account]/new/job/generate/single/schema/page.tsx @@ -316,7 +316,7 @@ export default function Page({ searchParams }: PageProps): ReactElement { table: row.table, column: row.column, }, - 'sync' + 'generate' ) ); } From 51b1f612a711a157e10b32e73d93b3b676b5c78b Mon Sep 17 00:00:00 2001 From: Nick Zelei <2420177+nickzelei@users.noreply.github.com> Date: Thu, 16 Jan 2025 09:34:53 -0800 Subject: [PATCH 2/5] =?UTF-8?q?NEOS-1718:=20fixes=20apply=20default=20tran?= =?UTF-8?q?sformers=20button=20incorrectly=20showing=20for=20some=20?= =?UTF-8?q?=E2=80=A6=20(#3151)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../web/components/jobs/JobMappingTable/JobMappingTable.tsx | 6 +++++- frontend/apps/web/components/jobs/NosqlTable/NosqlTable.tsx | 1 + .../apps/web/components/jobs/SchemaTable/SchemaTable.tsx | 2 ++ 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/frontend/apps/web/components/jobs/JobMappingTable/JobMappingTable.tsx b/frontend/apps/web/components/jobs/JobMappingTable/JobMappingTable.tsx index d61a961ecd..59811c1bdd 100644 --- a/frontend/apps/web/components/jobs/JobMappingTable/JobMappingTable.tsx +++ b/frontend/apps/web/components/jobs/JobMappingTable/JobMappingTable.tsx @@ -33,6 +33,7 @@ interface Props { getTransformerFromFieldValue(value: JobMappingTransformerForm): Transformer; isApplyDefaultTransformerButtonDisabled: boolean; + displayApplyDefaultTransformersButton: boolean; onApplyDefaultClick(override: boolean): void; onExportMappingsClick(selected: Row[], shouldFormat: boolean): void; @@ -82,6 +83,7 @@ export default function JobMappingTable( getAvalableTransformersForBulk, getTransformerFromFieldValue, isApplyDefaultTransformerButtonDisabled, + displayApplyDefaultTransformersButton, onApplyDefaultClick, onTransformerBulkUpdate, onDeleteRow, @@ -125,7 +127,9 @@ export default function JobMappingTable(
table={table} - displayApplyDefaultTransformersButton={true} + displayApplyDefaultTransformersButton={ + displayApplyDefaultTransformersButton + } isApplyDefaultButtonDisabled={isApplyDefaultTransformerButtonDisabled} getAllowedTransformers={getAvalableTransformersForBulk} getTransformerFromField={getTransformerFromFieldValue} diff --git a/frontend/apps/web/components/jobs/NosqlTable/NosqlTable.tsx b/frontend/apps/web/components/jobs/NosqlTable/NosqlTable.tsx index 0711ab4d18..4f14272855 100644 --- a/frontend/apps/web/components/jobs/NosqlTable/NosqlTable.tsx +++ b/frontend/apps/web/components/jobs/NosqlTable/NosqlTable.tsx @@ -210,6 +210,7 @@ export default function NosqlTable(props: Props): ReactElement { onExportMappingsClick={onExportMappingsClick} onImportMappingsClick={onImportMappingsClick} isApplyDefaultTransformerButtonDisabled={data.length === 0} + displayApplyDefaultTransformersButton={true} getAvalableTransformersForBulk={getAvailableTransformersForBulk} getTransformerFromFieldValue={getTransformerFromFieldValue} onTransformerBulkUpdate={onTransformerBulkUpdate} diff --git a/frontend/apps/web/components/jobs/SchemaTable/SchemaTable.tsx b/frontend/apps/web/components/jobs/SchemaTable/SchemaTable.tsx index e0cbe7b526..5f76abfd54 100644 --- a/frontend/apps/web/components/jobs/SchemaTable/SchemaTable.tsx +++ b/frontend/apps/web/components/jobs/SchemaTable/SchemaTable.tsx @@ -233,6 +233,7 @@ export function SchemaTable(props: Props): ReactElement { Date: Thu, 16 Jan 2025 13:02:07 -0800 Subject: [PATCH 3/5] 1-16 changelog (#3153) --- .../2025-01-16-anon-api-synthetic-data.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 docs/blog/2025-01-16-anon-api-synthetic-data.md diff --git a/docs/blog/2025-01-16-anon-api-synthetic-data.md b/docs/blog/2025-01-16-anon-api-synthetic-data.md new file mode 100644 index 0000000000..7d115fef01 --- /dev/null +++ b/docs/blog/2025-01-16-anon-api-synthetic-data.md @@ -0,0 +1,19 @@ +--- +title: 01/16 - Synthetic Data in Anonymization API +hide_table_of_contents: false +slug: /anon-api-synthetic-data +authors: + - evis +# cSpell:words +--- + +1. Add support for column removal strategy to handle schema changes in day 2 operations +2. Add support for on conflict handling in Postgres and Mysql +3. Enhance the python SDK entry point to be easier to use +4. Add support for using Neosync Transformers in the Anonymization API with replace +5. Optimized the Subset table to be way more performant +6. Add support for sourcing the connection url from an environment variable +7. Fix the Clone Transformer form +8. Add support for creating DB schema in the init schema options +9. Added ability to bulk apply subsets +10. Optimized the GenerateCity transformer to be way faster From d31f0eeeea0d744a566b103f78c9195a138e6f76 Mon Sep 17 00:00:00 2001 From: Evis Drenova <80707987+evisdrenova@users.noreply.github.com> Date: Thu, 16 Jan 2025 14:11:46 -0800 Subject: [PATCH 4/5] add in gtag for neosync cloud conversion tracking (#3140) --- frontend/apps/web/app/BaseLayout.tsx | 4 -- frontend/apps/web/app/api/config/config.ts | 5 ++ frontend/apps/web/app/config/app-config.ts | 7 +++ frontend/apps/web/app/layout.tsx | 2 + .../providers/googleTag-provider.tsx | 47 +++++++++++++++ .../components/providers/unify-provider.tsx | 60 +------------------ 6 files changed, 62 insertions(+), 63 deletions(-) create mode 100644 frontend/apps/web/components/providers/googleTag-provider.tsx diff --git a/frontend/apps/web/app/BaseLayout.tsx b/frontend/apps/web/app/BaseLayout.tsx index 923db1e9d7..abd48501ac 100644 --- a/frontend/apps/web/app/BaseLayout.tsx +++ b/frontend/apps/web/app/BaseLayout.tsx @@ -5,7 +5,6 @@ import ConnectProvider from '@/components/providers/connect-provider'; import { PostHogIdentifier } from '@/components/providers/posthog-provider'; import TanstackQueryProvider from '@/components/providers/query-provider'; import { SessionProvider } from '@/components/providers/session-provider'; -import { UnifyIdentifier } from '@/components/providers/unify-provider'; import SiteHeader from '@/components/site-header/SiteHeader'; import { Toaster } from '@/components/ui/sonner'; import { ReactElement, ReactNode, Suspense } from 'react'; @@ -28,9 +27,6 @@ export default async function BaseLayout(props: Props): Promise { - - -
diff --git a/frontend/apps/web/app/api/config/config.ts b/frontend/apps/web/app/api/config/config.ts index fcf5536ae2..c9e544ab1c 100644 --- a/frontend/apps/web/app/api/config/config.ts +++ b/frontend/apps/web/app/api/config/config.ts @@ -35,6 +35,11 @@ export function getSystemAppConfig(): SystemAppConfig { publicNeosyncApiBaseUrl: PUBLIC_PATHNAME, // ensures that this always points to the same domain isJobHooksEnabled: process.env.JOBHOOKS_ENABLED === 'true', isRbacEnabled: isNeosyncCloud || process.env.RBAC_ENABLED === 'true', + gtag: { + enabled: isAnalyticsEnabled() && !!process.env.GTAG, + key: process.env.GTAG, + conversion: process.env.GTAG_CONVERSION, + }, }; } diff --git a/frontend/apps/web/app/config/app-config.ts b/frontend/apps/web/app/config/app-config.ts index 06601c80a9..be1abc3054 100644 --- a/frontend/apps/web/app/config/app-config.ts +++ b/frontend/apps/web/app/config/app-config.ts @@ -9,6 +9,7 @@ export interface SystemAppConfig { signInProviderId?: string; isMetricsServiceEnabled: boolean; isJobHooksEnabled: boolean; + gtag: GtagConfig; calendlyUpgradeLink: string; isGcpCloudStorageConnectionsEnabled: boolean; @@ -29,3 +30,9 @@ interface UnifyConfig { enabled: boolean; key?: string; } + +interface GtagConfig { + enabled: boolean; + key?: string; + conversion?: string; +} diff --git a/frontend/apps/web/app/layout.tsx b/frontend/apps/web/app/layout.tsx index 6bd1f9b1a2..fff7878860 100644 --- a/frontend/apps/web/app/layout.tsx +++ b/frontend/apps/web/app/layout.tsx @@ -1,4 +1,5 @@ import '@/app/globals.css'; +import { GoogleScriptProvider } from '@/components/providers/googleTag-provider'; import { PHProvider, PostHogPageview, @@ -36,6 +37,7 @@ export default async function RootLayout({ <> + diff --git a/frontend/apps/web/components/providers/googleTag-provider.tsx b/frontend/apps/web/components/providers/googleTag-provider.tsx new file mode 100644 index 0000000000..9ead37b674 --- /dev/null +++ b/frontend/apps/web/components/providers/googleTag-provider.tsx @@ -0,0 +1,47 @@ +'use client'; +import { useGetSystemAppConfig } from '@/libs/hooks/useGetSystemAppConfig'; +import Script from 'next/script'; +import { ReactElement } from 'react'; + +export function GoogleScriptProvider(): ReactElement { + const { data: systemAppConfig, isLoading } = useGetSystemAppConfig(); + + if ( + isLoading || + !systemAppConfig?.gtag.enabled || + !systemAppConfig.gtag.key + ) { + return <>; + } + return ( + <> +