Each Snowflake table you sync with Bracket should have a primary key constraint. To do this, you can add this constraint when creating the table in Snowflake:
CREATE TABLE table (pkey INT NOT NULL UNIQUE, CONSTRAINT table_pk PRIMARY KEY (pkey))
This ensures that all newly added records, whether inserted directly to Snowflake or synced from a paired data source, will adopt primary keys with uniform formatting and unique values.In the field mapping, you are able to sync the primary key to a field in the opposing data source for reference, but any edits made to the primary key in the opposing source will not sync back to Snowflake.
{"docsConfig":{"$schema":"https://mintlify.com/docs.json","theme":"mint","name":"Bracket","colors":{"primary":"#47689E","light":"#7F97B9","dark":"#2B3A4F"},"favicon":"/favicon.png","logo":{"light":"https://mintcdn.com/bracket/bx6DzcifAPUE0Au7/logo/light.svg?fit=max\u0026auto=format\u0026n=bx6DzcifAPUE0Au7\u0026q=85\u0026s=c72851b277e1f0dfa02b8178da42620b","dark":"https://mintcdn.com/bracket/bx6DzcifAPUE0Au7/logo/dark.svg?fit=max\u0026auto=format\u0026n=bx6DzcifAPUE0Au7\u0026q=85\u0026s=a976a75a3904568c031355265c1a1888"},"navbar":{"links":[{"label":"Blog","href":"https://www.usebracket.com/blog"}],"primary":{"type":"button","label":"Get Started","href":"https://app.usebracket.com/"}},"footer":{"socials":{"website":"https://www.usebracket.com"}},"integrations":{"amplitude":{"apiKey":"fe0ecf4d83519f7738f8bb24244f9bd7"},"hotjar":{"hjid":"3130374","hjsv":"6"}},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"bracket","hasAudioNarration":false,"actualSubdomain":"bracket","customDomains":["docs.usebracket.com"],"gitSource":{"type":"github","owner":"usebracket","repo":"documentation","deployBranch":"main","contentDirectory":"docs","mountPath":"","label":""},"entitlements":{"AI_CHAT":{"status":"DISABLED"}},"buildId":"6ae913e47b2166ad6023e727:success","clientVersion":"0.0.4117","searchFilterCounts":[{"language":"default","tag":"Documentation","count":31},{"language":"default","tag":"Integrations","count":21},{"language":"default","tag":"Guides","count":6},{"language":"default","tag":"Postgres","count":4},{"language":"default","tag":"Introduction","count":4},{"language":"default","tag":"Airtable","count":2},{"language":"default","tag":"Firestore","count":2},{"language":"default","tag":"Google Sheets","count":2},{"language":"default","tag":"MongoDB","count":2},{"language":"default","tag":"Notion","count":2}]},"assistantConfig":{},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[],"googleFontsInlined":false},"customCss":[],"page":{"pagePath":"connecting/snowflake_pkey","slug":"/connecting/snowflake_pkey","pageMetadata":{"title":"Configuring your Snowflake primary key","sidebarTitle":"Primary keys","description":"Follow these steps to properly set up your Snowflake primary key","href":"/connecting/snowflake_pkey"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Follow these steps to properly set up your Snowflake primary key\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={code:`code`,p:`p`,pre:`pre`,span:`span`,..._provideComponents(),...props.components},{CodeBlock,Heading}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);return _jsxs(_Fragment,{children:[_jsx(Heading,{level:`2`,id:`summary`,children:`Summary`}),`\n`,_jsx(_components.p,{children:`To enable syncing with Bracket, make sure your Snowflake table has a primary key constraint.`}),`\n`,_jsx(Heading,{level:`2`,id:`how-to-set-up-your-primary-key`,children:`How to set up your primary key`}),`\n`,_jsx(_components.p,{children:`Each Snowflake table you sync with Bracket should have a primary key constraint. To do this, you can add this constraint when creating the table in Snowflake:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`4`,language:`text`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`4`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`CREATE TABLE table`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` (pkey INT NOT NULL UNIQUE,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` CONSTRAINT table_pk PRIMARY KEY (pkey))`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`,_jsx(_components.p,{children:`This ensures that all newly added records, whether inserted directly to Snowflake or synced from a paired data source, will adopt primary keys with uniform formatting and unique values.`}),`\n`,_jsx(_components.p,{children:`In the field mapping, you are able to sync the primary key to a field in the opposing data source for reference, but any edits made to the primary key in the opposing source will not sync back to Snowflake.`})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Configuring your Snowflake primary key","sidebarTitle":"Primary keys","description":"Follow these steps to properly set up your Snowflake primary key","href":"/connecting/snowflake_pkey"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Summary","slug":"summary","depth":2,"children":[]},{"title":"How to set up your primary key","slug":"how-to-set-up-your-primary-key","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":[],"subdomain":"bracket","siteName":"Bracket","title":"Configuring your Snowflake primary key - Bracket","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-01-06T22:37:32.067Z","originalFileLocation":"connecting/snowflake_pkey.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Follow these steps to properly set up your Snowflake primary key\">\u003cmeta data-mint-head name=\"application-name\" content=\"Bracket\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/bracket/di8HbR9wibg0--cB/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/bracket/di8HbR9wibg0--cB/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/bracket/di8HbR9wibg0--cB/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/bracket/di8HbR9wibg0--cB/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/bracket/di8HbR9wibg0--cB/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/bracket/di8HbR9wibg0--cB/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/bracket/di8HbR9wibg0--cB/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/bracket/di8HbR9wibg0--cB/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/bracket/di8HbR9wibg0--cB/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Configuring your Snowflake primary key - Bracket\">\u003cmeta data-mint-head property=\"og:description\" content=\"Follow these steps to properly set up your Snowflake primary key\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Bracket\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.usebracket.com/connecting/snowflake_pkey\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://bracket.mintlify.site/_mintlify/api/og/v2?division=Snowflake\u0026amp;title=Configuring+your+Snowflake+primary+key\u0026amp;description=Follow+these+steps+to+properly+set+up+your+Snowflake+primary+key\u0026amp;theme=fafb025e474fd3aca11b579c\u0026amp;signature=14f7455a3d5695b0a7a1e9086c3462031c0f2cc1f3ca119f8c20e2e51fb39f5a\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Configuring your Snowflake primary key - Bracket\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Follow these steps to properly set up your Snowflake primary key\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://bracket.mintlify.site/_mintlify/api/og/v2?division=Snowflake\u0026amp;title=Configuring+your+Snowflake+primary+key\u0026amp;description=Follow+these+steps+to+properly+set+up+your+Snowflake+primary+key\u0026amp;theme=fafb025e474fd3aca11b579c\u0026amp;signature=14f7455a3d5695b0a7a1e9086c3462031c0f2cc1f3ca119f8c20e2e51fb39f5a\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/bracket/di8HbR9wibg0--cB/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Bracket\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#47689E\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.usebracket.com/connecting/snowflake_pkey\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/connecting/snowflake_pkey.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.usebracket.com/#organization\",\"name\":\"Bracket\",\"url\":\"https://docs.usebracket.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/bracket/bx6DzcifAPUE0Au7/logo/light.svg?fit=max\u0026auto=format\u0026n=bx6DzcifAPUE0Au7\u0026q=85\u0026s=c72851b277e1f0dfa02b8178da42620b\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.usebracket.com#website\",\"name\":\"Bracket\",\"url\":\"https://docs.usebracket.com\",\"publisher\":{\"@id\":\"https://docs.usebracket.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.usebracket.com/connecting/snowflake_pkey#webpage\",\"url\":\"https://docs.usebracket.com/connecting/snowflake_pkey\",\"name\":\"Configuring your Snowflake primary key\",\"description\":\"Follow these steps to properly set up your Snowflake primary key\",\"dateModified\":\"2026-01-06T22:37:32.067Z\",\"isPartOf\":{\"@id\":\"https://docs.usebracket.com#website\"},\"breadcrumb\":{\"@id\":\"https://docs.usebracket.com/connecting/snowflake_pkey#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.usebracket.com/connecting/snowflake_pkey#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Integrations\",\"item\":\"https://docs.usebracket.com/connecting/airtable_connecting\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Snowflake\",\"item\":\"https://docs.usebracket.com/connecting/snowflake_connecting\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Configuring your Snowflake primary key\",\"item\":\"https://docs.usebracket.com/connecting/snowflake_pkey\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.usebracket.com/connecting/snowflake_pkey#article\",\"headline\":\"Configuring your Snowflake primary key\",\"name\":\"Configuring your Snowflake primary key\",\"description\":\"Follow these steps to properly set up your Snowflake primary key\",\"url\":\"https://docs.usebracket.com/connecting/snowflake_pkey\",\"mainEntityOfPage\":{\"@id\":\"https://docs.usebracket.com/connecting/snowflake_pkey#webpage\"},\"dateModified\":\"2026-01-06T22:37:32.067Z\",\"publisher\":{\"@id\":\"https://docs.usebracket.com/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.usebracket.com#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Bracket\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"Bracket\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/connecting/snowflake_pkey.md","siteName":"Bracket","nav":{"global":null,"anchors":[{"anchor":"Documentation","icon":"book-open","groups":[{"group":"Introduction","pages":[{"title":"What is Bracket?","href":"/introduction"},{"title":"Quick Start","href":"/quickstart"},{"group":"Sync methods","pages":[{"title":"Polling","href":"/polling"},{"title":"Streaming","href":"/streaming"}]}]},{"group":"Guides","pages":[{"title":"Deletes","href":"/guides/deletes"},{"group":"Foreign Keys","pages":[{"title":"Postgres \u003c> Airtable Relations Guide","sidebarTitle":"Postgres \u003c> Airtable guide","href":"/guides/foreign_keys"}]},{"group":"Legacy App","pages":[{"title":"Integrations and Support","sidebarTitle":"Integrations \u0026 support","href":"/guides/legacy_integrations"},{"title":"Field mapping and field types","sidebarTitle":"Field mapping","href":"/guides/legacy_field_mapping"}]},{"title":"Primary Keys","href":"/guides/pkeys"},{"title":"Runs","href":"/guides/runs"}]},{"group":"Integrations","pages":[{"group":"Airtable","pages":[{"title":"Connecting an existing Airtable base","sidebarTitle":"Connecting","href":"/connecting/airtable_connecting"},{"title":"Airtable primary keys","sidebarTitle":"Primary keys","href":"/connecting/airtable_pkey"}]},{"group":"Notion","pages":[{"title":"Connecting an existing Notion database","sidebarTitle":"Connecting","href":"/connecting/notion_connecting"},{"title":"Notion primary keys","sidebarTitle":"Primary keys","href":"/connecting/notion_pkey"}]},{"group":"DynamoDB","pages":[{"title":"DynamoDB","href":"/connecting/dynamodb_connecting"}]},{"group":"Firestore","pages":[{"title":"Connecting Firestore","sidebarTitle":"Connecting","href":"/connecting/firebase_connecting"},{"title":"Firestore primary keys","sidebarTitle":"Primary keys","href":"/connecting/firebase_pkey"}]},{"group":"Google Sheets","pages":[{"title":"Connecting an existing Google Sheet","sidebarTitle":"Connecting","href":"/connecting/gsheets_connecting"},{"title":"Configuring your Google Sheet primary key","sidebarTitle":"Primary keys","href":"/connecting/gsheets_pkey"}]},{"group":"Hubspot","pages":[{"title":"Connecting Hubspot","sidebarTitle":"Connecting","href":"/connecting/hubspot_connecting"}]},{"group":"MongoDB","pages":[{"title":"Connecting MongoDB","sidebarTitle":"Connecting","href":"/connecting/mongodb_connecting"},{"title":"MongoDB primary keys","sidebarTitle":"Primary keys","href":"/connecting/mongodb_pkey"}]},{"group":"MySQL","pages":[{"title":"Connecting MySQL","sidebarTitle":"Connecting","href":"/connecting/mysql_connecting"}]},{"group":"Postgres","pages":[{"title":"Connecting Postgres","sidebarTitle":"Connecting","href":"/connecting/postgres_connecting"},{"title":"Configuring your Postgres primary key","sidebarTitle":"Primary keys","href":"/connecting/postgres_pkey"},{"title":"Creating Postgres tables using Bracket","sidebarTitle":"Creating a table","href":"/connecting/postgres_creating_table"},{"title":"Using an existing table with Bracket","sidebarTitle":"Using an existing table","href":"/connecting/postgres_self_created_tables"}]},{"group":"Salesforce","pages":[{"title":"Connecting Salesforce","sidebarTitle":"Connecting","href":"/connecting/salesforce_connecting"},{"title":"Salesforce API Reference","sidebarTitle":"API Reference","href":"/connecting/salesforce_api"}]},{"group":"Snowflake","pages":[{"title":"Connecting Snowflake","sidebarTitle":"Connecting","description":"Follow these steps to sync an existing Snowflake table","href":"/connecting/snowflake_connecting"},{"title":"Configuring your Snowflake primary key","sidebarTitle":"Primary keys","href":"/connecting/snowflake_pkey"}]}]}]},{"anchor":"Demo","href":"https://www.loom.com/share/6b3b67a2b603454787aed7edad9c64d7?sid=8c111789-449d-425f-9ab1-d54638845d8a","icon":"circle-play","color":{"light":"#db4e5e","dark":"#db4e5e"}},{"anchor":"Contact Us","href":"mailto:founders@usebracket.com","icon":"envelope","color":{"light":"#ffcc4c","dark":"#ffcc4c"}}]},"basePath":"","title":"Configuring your Snowflake primary key - Bracket","buildId":"dpl_41S5Z2jG9QnfDRwN1KZrLdBwj7DM","deploymentId":"dpl_41S5Z2jG9QnfDRwN1KZrLdBwj7DM","dynamics":[],"chunks":[]}