What you will be able to do
- Explain what a Snowsight workspace is, who owns it, and which role governs what it can reach
- Name the objects a Git repository clone needs before CREATE GIT REPOSITORY succeeds, including for a private repository
- Use a Git-synced workspace to branch, pull, commit, push and resolve conflicts in the browser
- State the conditions for syncing a Snowflake Notebook with Git and for scheduling a notebook to run
Key concept
Git repository clone — A Snowflake object that mirrors a remote Git repository (all of its branches, tags and commits) inside your account. Snowflake becomes one more client of that repository: Workspaces, notebooks and deployment commands read files from the clone and push changes back through it.
1.Workspaces as the Snowsight development environment
Workspaces is where you write code in Snowsight. It is a single editor for SQL files, Python files and notebooks, organised into folders, and it has fully replaced Legacy Worksheets. That includes reader accounts. There is no setting to turn it off and go back. A team that still thinks of a worksheet as a loose, unversioned query tab should now think of files in a workspace, opened under Projects » Workspaces.
Every user gets a default workspace called My Workspace, which is private to them and cannot be deleted or renamed. Shared workspaces are for collaboration. The first time a user opens Workspaces, Snowflake creates a personal database to store that user's workspaces. It cannot hold tables or views and grants no extra privileges, so the OWNERSHIP, USAGE and CREATE SCHEMA grants an administrator sees on it are just what the editor needs to work.
Two different roles are involved, and they are easy to mix up. Your current role from the Snowsight user menu decides which workspaces you can see and which resources you can reach, such as the API integrations and secrets offered when you create a Git workspace. The role selector inside an open SQL file only sets the role for statements run from that file. Changing the role in the file does not change your current role anywhere else. A private workspace belongs to you, not to a role. A shared workspace is owned by a role, which defaults to your current role.
| Pane | What it does |
|---|---|
| Workspaces | Files and nested folders; drag files between folders |
| Worksheets | Open worksheets you own or have permissions on; drag one into a folder to convert it to a workspace file |
| Database Explorer | Hierarchical view of databases, schemas and objects |
| Editor | Edit and split files side by side, with inline Copilot |
| Results | Split or pin results for comparison |
| Query History | Queries from the current file or across all files |
Checkpoint 1 of 8· Check yourself
A data engineer opens a SQL file in Workspaces and sets the file's role selector to GIT_ADMIN, which has access to the team's API integration and secret. Their current role in the Snowsight user menu is still ANALYST. When they start creating a Git workspace, the integration does not appear. Why not?
Your current role from the user menu decides which workspaces and resources you see, including the API integrations and secrets offered for a Git workspace. The role selector inside a file only sets the role for SQL run from that file, so the engineer needs to use Switch role in the user menu.
“Changing it doesn’t change your current role for the rest of the Workspaces experience.”Source: docs.snowflake.com
Checkpoint 2 of 8· Check yourself
A team on a reader account prefers the old loose query tabs and asks the account administrator to turn Workspaces off and bring back Legacy Worksheets. What should the administrator tell them?
Workspaces has replaced Legacy Worksheets in every account, including reader accounts, and there is no setting to switch back. You also can't delete My Workspace. Existing worksheets are converted by dragging them into a workspace folder.
“You can’t disable Workspaces or switch back to Legacy Worksheets.”Source: docs.snowflake.com
Sources1
2.The Git repository clone and what it needs
Git integration starts with a Git repository clone. This object is synchronised from a remote repository hosted on GitHub, GitLab, BitBucket, Azure DevOps or AWS CodeCommit, including repositories on those platforms served from custom URLs. The clone holds all branches, tags and commits. Your local repository and existing tools carry on as before, because Snowflake is simply another client of the remote.
Before CREATE GIT REPOSITORY can succeed, an API integration must exist, and its API_PROVIDER must be git_https_api. That integration defines which target URL prefixes are allowed and which credentials may be used. If the repository is private, you also need a secret holding the credentials, passed with GIT_CREDENTIALS. Snowflake recommends a personal access token as the secret's password. The secret must be listed in the integration's ALLOWED_AUTHENTICATION_SECRETS, or Snowflake will not accept it. You can leave GIT_CREDENTIALS out when the integration already names a default secret, or when the repository needs no authentication.
| Object or parameter | Purpose | Required? |
|---|---|---|
| API integration (API_PROVIDER = git_https_api) | Describes the remote repository: allowed credentials and URL prefixes | Always |
| Secret via GIT_CREDENTIALS | Holds the credentials, ideally a personal access token as the PASSWORD value | When the repository needs authentication and the integration has no default secret |
| ALLOWED_AUTHENTICATION_SECRETS | The list on the API integration that the chosen secret must appear in | Whenever a secret is specified |
Once the clone exists, Snowflake can do the following with it:
- Fetch the latest branches, tags and commits
- Browse folders and pick a branch or tag
- Copy file paths to use in handler code for functions, tasks or procedures
- Run
.sqlfiles with EXECUTE IMMEDIATE - Commit and push changes from Workspaces, Streamlit apps and notebooks
Checkpoint 3 of 8· Check yourself
Your deployment scripts live as .sql files in a private GitHub repository. You want Snowflake to run them straight from the repository, without copying files by hand, while developers keep working in their local clones. Which approach fits?
A Git repository clone is set up with an API integration (git_https_api) plus a secret for a private repository, and it can run .sql files with EXECUTE IMMEDIATE. No storage integration or bucket is involved, and Snowflake is just one more client, so local repositories keep working as before.
“Execute immediate from .sql files.”Source: docs.snowflake.com
Checkpoint 4 of 8· Exam question
An engineer needs to let Snowflake clone a private GitHub repository so that SQL scripts and Snowpark code can be executed straight from the repository stage. Which combination of objects must exist before the CREATE GIT REPOSITORY statement will succeed?
Correct answer: B — An API integration authorized for the Git provider's endpoint, plus a secret holding the credentials when the repository is private.
- A. A storage integration authorizes access to a cloud storage bucket for external stages; it has no role in authenticating a Git provider connection.
- B. Creating a Git repository object requires an API integration authorized for the provider's endpoint, plus a secret for credentials when the repository is private, which is exactly what the statement needs to succeed.
- C. Resource monitors cap warehouse credit consumption; Git fetch operations against a repository stage are not gated by a resource monitor.
- D. No such materialized view is required to create or query a repository stage; the stage is browsed with standard stage listing and Git commands instead.
3.Branching, committing and resolving conflicts in a Git workspace
A workspace can live only in Snowflake, or it can be synced with a branch of a Git repository. The synced kind turns Snowsight into a version-controlled editor that a team can share. You create it from a repository, or from a URL that pre-fills the fields. After that you can do all of the following without leaving the browser:
- Create a branch, switch branches, or fetch a remote branch
- Pull the latest changes into the workspace
- Track added, updated and deleted files
- Commit and push back to the repository
- Resolve conflicts in place
Conflicts show up when you push. Open the Changes view at the top of the folder view. A banner reports the conflict and each affected file is marked with a red M. Select a file to see the differences inline, then accept the current change, the incoming change, or both. Diff View shows the current and remote versions side by side, with Accept all current and Accept all remote buttons for whole files. Then write a commit message and push again.
Two limits catch teams out. The repository must already have at least one branch, because empty repositories aren't supported. Repositories larger than 2 GB aren't supported either.
This is also why the alternatives fail when a team needs branches, reviews and sync in the browser. Copying SQL by hand from old worksheets into the default branch is not version control, and legacy worksheets are gone anyway. Scheduled notebook runs execute code but record no change history. Sending every edit through snow sql -f from a local terminal moves the work out of the browser entirely.
Checkpoint 5 of 8· Check yourself
Five analysts keep their transformation SQL in a GitHub repository. They want to create feature branches, commit, push and pull each other's changes without leaving Snowsight. Which setup meets that need?
A Git-synced workspace lets the team create and switch branches, pull, commit, push and resolve conflicts, all in the browser. Scheduled notebook runs execute code but keep no change history. snow sql -f moves the work out of the browser, and copying SQL by hand is not version control.
“Commit and push changes to the remote repository from Workspaces, Streamlit apps, and Snowflake notebooks.”Source: docs.snowflake.com
Checkpoint 6 of 8· Exam question
A data engineering team wants to replace ad hoc SQL worksheets with a collaborative, version-controlled editing surface inside Snowsight, so multiple engineers can create branches, review changes, and sync with the team's remote repository without leaving the browser. Which capability should they adopt?
Correct answer: C — Configure a Snowsight Workspace connected to the Git repository so engineers can switch branches and push or pull file changes in the browser.
- A. Manually copying finished statements into a branch happens after the fact and loses the real-time diffing, review, and sync that a version-controlled workflow needs.
- B. A scheduled notebook run tracks execution results, not source code changes, so it does not substitute for a version-controlled editing surface for general SQL development.
- C. A Git-connected Workspace is a file-based development surface in Snowsight where engineers switch branches and push or pull changes, matching the collaborative, browser-based requirement.
- D. A named CLI target configures a connection profile for deployments; it does not provide a browser-based collaborative editing or branching surface for day-to-day SQL work.
Sources4
4.Snowflake Notebooks: Git sync and scheduled runs
Notebooks now live in Workspaces and replace the legacy notebook experience. A notebook is a Jupyter environment with direct access to governed Snowflake data. It runs in a pre-built container with fully managed access to CPUs and GPUs, which suits AI/ML work that needs distributed loading or training on compute pools. Notebook files open in tabs next to your other project files, and .py files can run interactively in the same environment. Teams collaborate through Git-integrated workspaces or shared workspaces, which carry version history and role-based access.
Syncing a notebook with Git has two preconditions. First, the account must already be connected to a Git repository (the clone described above), and a branch must exist for notebook development. Second, the notebook file must be a .ipynb file in notebook format (nbformat) 4.0 or higher. Connecting an existing notebook also needs a role with OWNERSHIP or READ on the Git repository and USAGE on the schema that contains it. Converting the notebook to a procedure, resizing a warehouse or removing network policies has nothing to do with it.
A Code Bundle is the object a scheduled notebook actually runs. It is a named object that packages your project's source files, created from a stage, a workspace or a local directory, and it carries a specification (code_bundle.yml) for compute, runtime, dependencies and secrets. Its files are held as immutable versions, and a new version is added with ALTER CODE BUNDLE ... ADD VERSION. When you schedule from the Snowsight dialog, Snowflake creates the bundle for you; with SQL, a role with CREATE CODE BUNDLE on the schema creates it. Because a task runs what the bundle holds rather than whatever is open in the editor, edits reach a schedule only once the bundle is updated.
The schedule itself is a Snowflake task whose body is EXECUTE CODE BUNDLE ... ENTRYPOINT = 'notebook.ipynb'. You can create it from the calendar icon under Workspaces » Notebooks, or in SQL. The privileges are specific. The role that starts the schedule needs USAGE on the Code Bundle and OWNERSHIP on the task. Changes you publish from a shared workspace only reach the scheduled run if the role also has OWNERSHIP on the Code Bundle.
Checkpoint 7 of 8· Check yourself
For a set of ML notebooks that several data scientists edit together, the lead wants role-based access and a version history of every change, all inside Snowsight. Which setup provides this?
Notebooks in Workspaces support collaboration with role-based access and version history through Git-integrated or shared workspaces. My Workspace is private to one user. Legacy notebooks have been replaced. A scheduled Code Bundle runs the code but does not record its change history.
“Allows multiple users to work in the same workspace with role-based access controls and version history through Git-integrated workspaces or Shared workspaces.”Source: docs.snowflake.com
Checkpoint 8 of 8· Exam question
A data scientist wants to connect an existing Snowflake Notebook to a GitHub repository so that saved changes can be pushed to the remote and teammates can pull the latest version. Before the notebook can sync, what must be true?
Correct answer: D — The notebook file must be saved as .ipynb at format version 4.0 or higher, with the repository connection set up from the Files tab.
- A. Converting a notebook into a stored procedure is unrelated to how Snowflake tracks notebook source; notebooks sync as files, not as compiled procedure objects.
- B. Git synchronization is a metadata and API-integration feature, not a compute-sizing requirement, so resizing the warehouse has no effect on whether syncing works.
- C. Git connectivity is established through an API integration scoped to the Git provider, not by disabling the role's network policy, which would weaken account security unnecessarily.
- D. Notebook files must be valid
.ipynbcontent at format 4.0 or later, with the repository link created from the Files tab, which is the documented prerequisite for syncing.
Sources
(8)
Every claim above is drawn from one of these pages, quoted as it was written on the date shown.
- 1.
“You can’t disable Workspaces or switch back to Legacy Worksheets.”
↩︎ Workspaces as the Snowsight development environment“This database is used to store workspaces and cannot contain standard objects such as tables or views.”
↩︎ Workspaces as the Snowsight development environment“The role selector inside an open SQL file controls only the SQL statements run in that file.”
↩︎ Workspaces as the Snowsight development environment“You can’t disable Workspaces or switch back to Legacy Worksheets.”
↩︎ Exam trap 1“Changing it doesn’t change your current role for the rest of the Workspaces experience.”
↩︎ Checkpoint - 2.
“The API integration you specify here must have an API_PROVIDER parameter whose value is set to git_https_api”
↩︎ The Git repository clone and what it needs“As a best practice, use a personal access token for the secret’s PASSWORD value.”
↩︎ The Git repository clone and what it needs“Omit this parameter to use the default secret specified by the API integration or if this integration does not require authentication.”
↩︎ Exam trap 2 - 3.
“The clone includes all branches, tags, and commits from the remote repository.”
↩︎ The Git repository clone and what it needs“Commit and push changes to the remote repository from Workspaces, Streamlit apps, and Snowflake notebooks.”
↩︎ The Git repository clone and what it needs“Through the Git repository clone, Snowflake becomes another client of your repository separate from your local repository.”
↩︎ Key concept“Execute immediate from .sql files.”
↩︎ Checkpoint“Commit and push changes to the remote repository from Workspaces, Streamlit apps, and Snowflake notebooks.”
↩︎ Checkpoint - 4.
“Create a new branch, switch branches, or fetch a remote branch.”
↩︎ Branching, committing and resolving conflicts in a Git workspace“Files with a conflict are indicated with a red M.”
↩︎ Branching, committing and resolving conflicts in a Git workspace“Accept the current change, an incoming change, or both changes.”
↩︎ Branching, committing and resolving conflicts in a Git workspace“A Git repository must contain at least one branch; empty repositories aren’t supported.”
↩︎ Branching, committing and resolving conflicts in a Git workspace“Git repositories larger than 2 GB aren’t supported.”
↩︎ Branching, committing and resolving conflicts in a Git workspace“Your current role from the Snowsight user menu determines which API integrations and secrets you can access when creating a Git workspace.”
↩︎ Prediction - 5.https://docs.snowflake.com/en/user-guide/ui-snowsight/notebooks-in-workspaces/notebooks-in-workspaces-overviewOfficial docs
“Supports a Jupyter notebook environment with direct access to governed Snowflake data.”
↩︎ Snowflake Notebooks: Git sync and scheduled runs“Runs in a pre-built container environment optimized for scalable AI/ML development with fully-managed access to CPUs and GPUs.”
↩︎ Snowflake Notebooks: Git sync and scheduled runs“Allows multiple users to work in the same workspace with role-based access controls and version history through Git-integrated workspaces or Shared workspaces.”
↩︎ Checkpoint - 6.
“OWNERSHIP or READ privilege on the Git repository.”
↩︎ Snowflake Notebooks: Git sync and scheduled runs“The file must be an .ipynb formatted file and it must use notebook format (nbformat) 4.0 or higher.”
↩︎ Exam trap 3 - 7.
“A named object containing your project source files, created from a stage, workspace, or local directory.”
↩︎ Snowflake Notebooks: Git sync and scheduled runs“An immutable snapshot of bundle files. New versions are added with ALTER CODE BUNDLE ... ADD VERSION.”
↩︎ Snowflake Notebooks: Git sync and scheduled runs - 8.https://docs.snowflake.com/en/user-guide/ui-snowsight/notebooks-in-workspaces/notebooks-in-workspaces-scheduleOfficial docs
“To run on a cadence, execute the Code Bundle from a Snowflake task.”
↩︎ Snowflake Notebooks: Git sync and scheduled runs“The executing role must have USAGE on the Code Bundle and OWNERSHIP on the task to initiate the schedule.”
↩︎ Snowflake Notebooks: Git sync and scheduled runs