
Welcome to the SnowPro Native Apps certification preparation course. This course is designed to take you from an understanding of Snowflake basics to the knowledge and hands-on skills needed to pursue the SnowPro Specialty: Native Apps (NAS-C02) certification. In this opening lesson you will see what the course covers and how it is organised.
You will begin with the goal. The Snowflake Native App Framework lets providers build applications that run inside a consumer's Snowflake account, so that data and logic are delivered together without the consumer's data leaving their account. The exam tests whether you can design, build, deploy and manage such applications, and this course mirrors that structure.
Next you will get a map of the course. You will see the fifteen sections, which move from framework fundamentals and architecture design, through security, application packages, setup scripts, application logic, Streamlit interfaces and Snowpark Container Services, to testing, publishing, versioning, upgrades, a capstone project and final practice and review. You will see where the twelve hands-on labs and the practice exams fit, and how each section links to an exam domain.
You will learn how to get the most from the lessons. You will be encouraged to follow along in your own Snowflake account, to take notes on the terms that the exam uses, to repeat the labs until they feel natural and to test yourself on scenarios and not only on definitions.
You will also read an important note. This is an independent preparation course, it is not affiliated with or endorsed by Snowflake, and passing the exam is not guaranteed.
By the end of this lesson you will be able to describe the course structure and how it supports your certification goals.
Preparation is easier when you know exactly what the exam expects. In this lesson you will understand the NAS-C02 exam structure and objectives, and learn how to find the official details so that you are working from current information.
You will begin with the purpose of the certification. The SnowPro Specialty: Native Apps exam is aimed at people who develop and manage Snowflake Native Applications, and it checks practical understanding of the framework and not just memorised terms. You will see the kinds of knowledge it expects, such as the ability to choose a design, write a manifest, set privileges, publish a listing and manage a release.
Next you will look at how exams of this type are usually built. They tend to use scenario-based multiple choice and multiple select questions, which describe a situation and ask for the best action. You will learn why reading the wording carefully matters, especially words such as best, first, most secure and least effort.
You will learn to use the official exam guide. You will be shown that the guide lists the domains and the topics under each, and you will be told to check Snowflake's own pages for the current number of questions, time limit, cost, delivery options and passing requirements, because these can change and are not guaranteed by this course.
You will create a checklist that maps each objective in the guide to the sections of this course, so that you can track what you have covered.
By the end of this lesson you will be able to describe the structure of the exam and use the official objectives to guide your study.
Not all exam topics carry the same weight, and your time is limited. Knowing the domains and how they are weighted helps you decide where to spend your effort. In this lesson you will study the exam domains, weightings and study priorities.
You will begin with the four domains that organise both the exam and this course: Design, Build, Deploy and Manage. Design covers architecture, requirements and the provider and consumer model. Build covers packages, manifests, setup scripts, logic, interfaces and containers. Deploy covers testing, observability, publishing and distribution. Manage covers versioning, release channels, upgrades and operations.
Next you will see how to use weightings. The official guide gives the share of the exam that each domain represents, and you should check it for the current figures. You will learn a simple method, which is to spend more time on the heavier domains while making sure that you do not leave any domain uncovered, since a weak area can cost you many questions.
You will then rate your own starting point. You will mark each domain as strong, fair or weak, based on your experience, and combine that with the weightings to rank your priorities. A heavily weighted domain in which you are weak goes at the top.
You will build a weekly plan that matches the ranking, with time for review and for practice questions, and leave space for catching up.
By the end of this lesson you will be able to prioritise your study time using domain weightings and your own strengths.
Hands-on practice is a large part of this course, so your environment needs to be ready before you start. In this lesson you will go through the prerequisites, the software requirements and the lab environment.
You will begin with the knowledge you need. You should be comfortable with SQL and with the basic ideas of Snowflake, such as databases, schemas, warehouses, roles and privileges. Some Python knowledge helps for the Snowpark lessons, and an understanding of software development and deployment helps throughout. Previous Native App experience and the SnowPro Core certification are useful but not required.
Next you will review the tools. You will need a Snowflake account with enough privileges to create databases, roles and application packages, and you will be reminded that some features may depend on your account's edition, region or configuration and that some may use credits. You will need a code editor such as Visual Studio Code, the Snowflake CLI and, for the container lessons, Docker.
You will install and check each tool. You will confirm that you can connect to your account, run a simple query and use the command line interface. You will create a dedicated role, warehouse and a development database for the labs so that your work is separate from anything else in your account.
You will also learn about cost control. You will set a resource monitor, suspend warehouses when you finish and remove objects that you no longer need.
By the end of this lesson you will be able to prepare a working lab environment and avoid unexpected charges.
Practice exams are one of the best tools for certification preparation, but only if you use them well. In this lesson you will learn how to use practice exams and build an effective study plan.
You will begin with the purpose of a practice exam. It is not mainly about the score, but about finding the gaps in your knowledge and getting used to the style of the questions and the pressure of the clock. You will discuss why taking an exam too early, or repeating the same one until you remember the answers, gives you a false sense of readiness.
Next you will learn a method for review. After each attempt, you will go through every question, including those you answered correctly, and ask why the right option is right and why each of the others is wrong. You will record the topic of each mistake and the reason, such as a gap in knowledge, a misread question or a rushed answer, and use the pattern to decide what to study next.
You will then build your study plan. You will set an exam date or target, work backwards to create weekly goals, and arrange your study in cycles of learning a section, doing its lab, reviewing the notes and answering questions on it. You will schedule full-length practice exams at set points, and leave a final week for review.
You will learn some techniques for the exam itself, such as managing time, flagging questions to revisit and eliminating clearly wrong choices.
By the end of this lesson you will be able to use practice exams to find gaps and follow a realistic study schedule.
Before you begin the main content, it is worth knowing where you stand. In this activity you will take a baseline assessment and build a personal study plan that is based on what you find.
You will begin with the baseline. You will answer a set of questions or a self-assessment checklist that covers each of the four domains, without looking up the answers. You will note how confident you were in each answer as well as whether it was right, since a lucky guess is not knowledge and a confident mistake is a particularly important finding.
Next you will analyse the results. You will count your correct answers by domain and by topic, and place each topic in one of three groups: known, unsure and unknown. You will write down the topics that surprised you.
You will then turn the analysis into a plan. You will list the sections of the course in the order that you will study them, giving more time to the weak areas and the heavily weighted domains, and less to the topics you already know. You will set a start date, a target exam date and weekly time commitments that you can keep up.
You will define milestones, such as finishing the labs for a domain or reaching a target score in a practice exam, and decide how you will measure progress. You will add a short review at the end of each week.
You will save the plan where you can see it and update it as you learn.
By the end of this activity you will be able to produce an evidence-based study plan that you can follow and adjust.
This lesson provides the hands-on lab package for the course, so that you have the materials for every exercise in one place. It explains what the package contains and how to use it, and you should check the downloadable resources attached to the lesson for the files themselves.
You will begin with an overview of the contents. The package is organised by section and follows the order of the twelve labs and the capstone project. It typically contains the starter code, the SQL scripts, the example manifest and setup files, the Streamlit and Snowpark code and the instructions for each exercise, with a note about what you should see when it works.
Next you will set up a local working folder. You will create a clear structure, with one folder for each lab, and a shared folder for common files. You will use a naming scheme that sorts in order, and keep your own notes alongside the code.
You will learn how to work through a lab. You will read the goal and the prerequisites first, run the steps in order, check the results at each stage and record any errors with their fixes. You will be shown how to reset your environment between attempts by dropping the objects that you created, so that each run starts from a known state.
You will be reminded about costs and clean-up. Some labs use compute resources, so you should suspend or drop them afterwards.
By the end of this lesson you will be able to organise the lab materials and run each exercise cleanly and repeatedly.
The Snowflake Native App Framework changes how applications are shared. Instead of sending data to an application, you send the application to where the data is. In this lesson you will be introduced to the Snowflake Native App Framework and the ideas it is built on.
You will begin with the problem it solves. Traditionally, a company that wanted to use a vendor's analytics or machine learning tool had to export data to the vendor's systems, which raised concerns about security, copies and governance. With the Native App Framework, a provider packages code, data and an interface, and a consumer installs it into their own Snowflake account, where it runs next to their data.
Next you will meet the main concepts. A provider builds and publishes the application. A consumer installs and uses it. The application package holds the files and shared content, and the application is the installed instance in the consumer's account. You will see how the consumer stays in control, because the application only receives the privileges that they grant.
You will look at the benefits, which include data staying in the consumer's account, easier distribution through listings and the Marketplace, versioning and the option to monetise. You will see typical examples, such as a data quality tool, a machine learning model scorer and a customer analytics dashboard.
You will also begin to learn the vocabulary that the exam uses, and build a glossary that you will keep adding to.
By the end of this lesson you will be able to explain what a Native App is and why the framework is valuable.
Every Native App involves at least two parties with different responsibilities. The exam expects you to know who does what, and how an application reaches its users. In this lesson you will understand providers, consumers and application distribution.
You will begin with the provider. A provider is a Snowflake account that develops an application, creates the application package, adds versions and publishes it, directly to chosen accounts or through the Snowflake Marketplace. You will list the provider's tasks, including development, testing, security review, support and updates.
Next you will look at the consumer. A consumer is an account that installs and runs the application. They decide whether to install it, which privileges to grant, which of their objects to reference and when to allow upgrades. You will see that the consumer's data is not given to the provider, apart from information such as events and logs that the consumer agrees to share.
You will then review the ways to distribute an application. You will compare private listings, which are directed at specific accounts, with public listings on the Marketplace, and talk about when each is appropriate. You will also touch on cross-region and cross-cloud considerations and how Snowflake handles the replication of listings, noting that you should check current documentation for the supported options.
You will trace the journey of an application from development to installation, naming the objects and the roles at each step.
You will test yourself with short scenarios about who must perform each action.
By the end of this lesson you will be able to describe provider and consumer responsibilities and how apps are distributed.
Snowflake offers several ways to share data and logic, and choosing the wrong one is a classic exam trap. In this lesson you will compare Native Apps, secure data sharing and declarative approaches, so that you can recommend the best option for a given need.
You will begin with secure data sharing. It gives a consumer read access to a provider's data without copying it, and it is the right choice when you simply need to provide data. However, it does not deliver code, an interface or application logic, and the consumer cannot receive your business rules in this way.
Next you will look at Native Apps. They can contain data, code such as stored procedures and functions, a Streamlit interface and even containerised services, along with a manifest that describes the privileges and references that the app needs. They suit cases where you want to deliver a complete, versioned solution that works on the consumer's data.
You will then consider declarative approaches. These describe the desired state of objects and let a tool or the platform apply the changes, which can be useful for deploying and maintaining objects in your own environment. You will discuss how this differs from a distributable application, and that it is not a delivery mechanism for third parties.
You will build a decision table with the questions to ask: Is code needed? Is a user interface needed? Does it need to run on consumer data? Does it need versions and upgrades? Is monetisation required?
You will work through scenarios and justify the choice for each.
By the end of this lesson you will be able to choose between data sharing, Native Apps and declarative approaches with clear reasons.
Three terms appear constantly in the exam, and they are easy to confuse: the application package, the application object and the listing. In this lesson you will learn what each one is, how they relate and who owns them.
You will begin with the application package. It is an object in the provider's account that acts as a container for the application's files, such as the manifest, the setup script, the code and the interface, and for any shared data content. Versions and patches are added to the package, and you will see why it is the unit that you develop, test and publish.
Next you will look at the application object. It is the installed instance in the consumer's account, created from a specific version of a package. It has its own database-like structure, its own application roles and its state, and it receives only the privileges that the consumer grants. You will see how the same package can create many applications in different accounts.
You will then examine the listing. A listing is how you offer the application to others, with a title, description, documentation and the availability, and it can be private or public. You will see how a listing refers to the application package and how consumers use it to get the app.
You will draw a diagram that shows the objects in the provider and consumer accounts and the arrows between them, and explain what happens to each when a new version is released.
You will answer short questions that test which object is involved in each scenario.
By the end of this lesson you will be able to distinguish packages, applications and listings and describe how they interact.
To design and troubleshoot Native Apps, you need to know what is inside them and how the parts work together. In this lesson you will study the Snowflake Native App architecture and its core components.
You will begin with the files. An application package contains a manifest, which is a YAML file that describes the application and what it needs, a setup script that runs when the application is installed or upgraded and creates the objects the application needs, and optional files such as a readme, a Streamlit interface and other resources.
Next you will look at the objects that the setup script creates inside the application, such as schemas, views, stored procedures, functions and tables. You will learn the difference between the objects that are visible to consumers and those that remain internal, and how application roles control access to the visible parts.
You will review the other building blocks. Shared content from the provider can be bundled into the package for the application to use. References let the application work with consumer objects that the consumer chooses to link. Privileges, whether requested globally or through references, define what the application is allowed to do. Optional components include Streamlit interfaces and container services.
You will put these together in a diagram of the lifecycle: the provider builds, the package is versioned, the consumer installs, the setup script runs and the application is used and upgraded.
You will label each part and describe its role in your own words.
By the end of this lesson you will be able to describe the core components of a Native App and how they work together.
Knowing what the framework can do is important, and so is knowing where it stops. Exam questions often describe a requirement and ask whether a Native App is suitable, or which feature should be used. In this lesson you will review supported features, technical limitations and use cases.
You will begin with the capabilities. A Native App can include SQL objects, Snowpark code in languages that Snowflake supports, Streamlit interfaces, containerised services through Snowpark Container Services, shared data content, event logging and telemetry, versioning with patches and release management and distribution through listings. You will connect each capability to the section of the course where you will study it.
Next you will look at the constraints. These include the permissions model, which means an application can do only what the consumer allows, restrictions on what code may do with external network access without approval, and rules about the objects that can appear in a package. You will learn that some features are available only in certain regions, clouds or account types, and that the framework evolves, so you must verify the current status in the official documentation.
You will then study use cases. These include data enrichment and quality tools, machine learning scoring, industry-specific analytics, data clean room style solutions and operational applications. For each, you will describe why running inside the consumer account is an advantage.
You will practise decision making with scenarios, such as a provider who needs to see all consumer data, which does not fit the model, and explain why.
By the end of this lesson you will be able to judge when the framework fits a requirement and when it does not.
In this first hands-on lab you will set up the Snowflake CLI and create a basic Native App. It is your first experience of the whole workflow, from an empty folder to an installed application, and the steps will be used again in many later labs.
You will begin by checking your environment. You will confirm that the Snowflake CLI is installed and that you can connect to your account with a configured connection, and that your role has the privileges to create application packages and applications. You will create a development role and database if needed.
Next you will create the project. You will use the CLI to initialise a Native App project from a template, and look at the folder structure it produces. You will open the snowflake.yml project definition, the manifest and the setup script, and read what each file does in plain terms.
You will then deploy the project. You will run the command that uploads the files to a stage and creates the application package and then the application in development mode, and watch the output. You will connect to the application, run a simple function or procedure that it provides and see the result.
You will make a small change, such as editing the message returned by a procedure, redeploy and confirm the update.
You will finish by cleaning up. You will drop the application and the package, and learn the order in which they must be removed.
By the end of this lab you will be able to initialise, deploy, run and remove a basic Native App with the Snowflake CLI.
A good Native App starts from a business problem, not from a feature list. In this lesson you will learn to translate business requirements into Native App architectures, which is the first skill tested in the Design domain.
You will begin with a typical requirement, such as a provider who wants to offer a customer analytics tool that scores and segments a consumer's own customer data without ever taking a copy. You will break it into parts: what data is involved, where it lives, who needs to see the results, what logic must run, how often and what level of control the consumer expects.
Next you will map requirements to framework features. A need to run code on the consumer's data points to stored procedures, functions or Snowpark. A need for a visual interface points to Streamlit. A need for heavy or specialised workloads may point to Snowpark Container Services. A need to include reference data points to shared content in the package. A need for controlled access points to application roles, references and privileges.
You will learn to separate functional requirements from non-functional ones, such as security, compliance, performance, cost, supportability and update frequency, and see that the second group often decides the design. You will also record assumptions and constraints, such as supported regions.
You will produce a short architecture statement that lists the components, the data flows and the privileges that the app will request, and check it against the requirements one by one.
You will practise on scenario-style questions that ask for the best design.
By the end of this lesson you will be able to convert business needs into a justified Native App design.
One of the most important design decisions is where the boundary lies between the provider's account and the consumer's. In this lesson you will design provider and consumer account boundaries, and learn what each side can and cannot see.
You will begin with the basic rule. The application runs in the consumer's account and has access only to what the consumer grants, while the provider keeps ownership of the package and its code. You will draw the two accounts and place the objects in each, such as the application package and listing on the provider's side and the application, the consumer's data and the granted privileges on the consumer's side.
Next you will consider what crosses the boundary. Code and shared content flow from provider to consumer through the package. Events and logs flow back only when the consumer allows it, and only to the extent defined by the application's settings. Consumer data does not flow to the provider by default, and you will see why this is a main selling point.
You will examine how to protect your own intellectual property, for instance by keeping logic inside procedures and not exposing internals, and how to protect the consumer's data by limiting the privileges requested to what is needed.
You will think through multi-account situations, such as development, test and production environments for the provider, and consumers with several accounts.
You will analyse scenarios in which a requirement seems to need provider access to consumer data, and find designs that avoid it.
By the end of this lesson you will be able to define clear, secure boundaries between provider and consumer accounts.
A well-designed Native App keeps its logic separate from its data, and keeps what is visible to consumers separate from what is internal. In this lesson you will study the separation of application logic and data objects.
You will begin with the reasons. When code and data are mixed together, an upgrade can overwrite state, a change in one place can break another and it becomes hard to control what consumers can see. A clean separation makes upgrades safer, access easier to manage and the application easier to test.
Next you will look at how the framework supports this. You will see that the setup script can create versioned schemas for code that is replaced with each version, and regular schemas for state that must persist across upgrades. You will learn that stored procedures, functions and views often live in the versioned schema, while tables that hold configuration or results belong in a stable schema.
You will also separate the public interface from the internals. You will expose only chosen objects, usually through application roles, and keep helper procedures and tables hidden, so that consumers see a small and stable surface that you can maintain over time.
You will design an example. For a customer analytics app, you will decide which objects are code, which are shared reference data, which are consumer-owned inputs and which are persistent state, and place each in a schema.
You will check the design against an upgrade, asking what is replaced and what is kept.
By the end of this lesson you will be able to organise an application so that code, data and state can change independently.
Many applications need data that the provider owns, and they may depend on other components too. How you share the data and manage dependencies affects security, cost and maintainability. In this lesson you will design data sharing and application dependencies.
You will begin with the data the application needs. Some data is provided by the app, such as reference tables or models, and can be bundled with the package as shared content. Some data belongs to the consumer, and the application reaches it through references that the consumer links. Some data is created by the application itself while it runs. You will classify each type for a sample app.
Next you will study how provider data is shared. You will learn that you can share objects from a provider database as content in the package, and that the consumer receives access through the application, not directly. You will discuss why you would update such data, and how that affects versions.
You will then look at dependencies. These include dependencies on other objects within the application, which the setup script must create in the right order, dependencies on consumer objects that may not exist yet and dependencies on external services. You will discuss how to make the application fail gracefully, with clear messages, when something is missing.
You will weigh the trade-offs between bundling data, which is simple but adds to the package, and asking the consumer to provide it, which gives them control but adds setup work.
You will practise with scenarios and justify your design choices.
By the end of this lesson you will be able to plan how an application obtains data and manages its dependencies.
No design is perfect, and good architects explain the trade-offs. Exam questions often ask for the option that best balances cost, scalability and performance. In this lesson you will study the trade-offs that affect Native App architecture.
You will begin with cost. In a Native App, the consumer typically pays for the compute that the application uses in their account, while the provider pays for development and any provider-side resources. You will discuss how design choices change the cost, such as heavy queries, always-on services or large copies of data, and how the pricing model of the listing relates to these costs.
Next you will look at scalability. You will consider how an application behaves as the consumer's data grows or as more users arrive, and how to design for it, for example by pushing work into set-based SQL, using suitable warehouse sizes and avoiding row-by-row processing. For container services, you will think about compute pool sizing and scaling.
You will then discuss performance. You will learn how the choice of approach, such as a SQL procedure, a user-defined function, a Snowpark job or a container service, affects speed and resource use, and how caching and efficient queries help.
You will see how these concerns pull against each other. A more flexible design may be harder to maintain, and a faster one may cost more. You will practise writing a short justification that names the trade-off and the reason for the decision.
You will compare two designs for the same requirement and choose between them.
By the end of this lesson you will be able to evaluate architectures against cost, scale and performance and justify your choice.
The exam tends to present realistic scenarios and ask you to select the right architecture. In this lesson you will practise selecting the right architecture for real-world scenarios, using a repeatable method.
You will begin with the method. First, identify the goal and the constraints. Second, list the key requirements, especially around security, data location and who controls what. Third, match each requirement to a framework feature. Fourth, remove options that violate a requirement. Fifth, choose the simplest option that meets all of the requirements, and explain it.
Next you will apply it to several scenarios. One is a data quality tool that scans consumer tables and writes a report, which suggests references, stored procedures and a Streamlit interface. Another is a machine learning scoring app that needs a trained model, which may involve Snowpark with shared content or a container service. A third is an industry reference data product, for which secure data sharing may be enough. A fourth is an application that must call an external API, which brings in external access and approval.
For each, you will state the components, the privileges requested, the interface, the release and distribution approach and the risks. You will compare your answer with an alternative and explain why it is better.
You will learn to spot the common distractors in answer options, such as an overly complicated option, one that breaks the privilege model or one that moves data out of the consumer's account unnecessarily.
You will end with a short set of practice questions.
By the end of this lesson you will be able to choose and defend an architecture for a given scenario.
This lab asks you to put the design skills of the section to work. You will design a customer analytics Native App architecture from a written business brief, and produce a document that you could present to a team.
You will begin with the brief. A provider wants to offer an application that analyses a consumer's customer and transaction tables, produces segments and lifetime value scores, and shows the results in a simple dashboard, without taking any of the consumer's data out of their account. The provider also wants to include a reference table of industry benchmarks.
Next you will analyse the requirements. You will list the functional needs, such as ingesting data through references, running scoring logic and presenting results, and the non-functional needs, such as least privilege, upgrade safety and cost awareness. You will note assumptions and open questions.
You will then design the architecture. You will decide how the consumer connects their tables, what objects the setup script creates, how logic and state are separated into versioned and regular schemas, which application roles exist, which privileges and references the manifest requests, how the interface is built and how the benchmarks are shared. You will draw a diagram that shows the provider and consumer accounts and the flows between them.
You will review the design against the trade-offs of cost, scale and performance, and against a simulated upgrade and a security review. You will record the decisions and the reasons.
By the end of this lab you will be able to produce a complete, justified Native App architecture design.
Security is built into the Native App Framework from the ground up, and it is a major theme in the exam. In this lesson you will study the Snowflake Native App security architecture and the model it uses to protect consumers.
You will begin with the principle that underlies it. The consumer is in control. An application runs inside their account, but it begins with very limited abilities, and it can only use the privileges and objects that the consumer grants. The provider cannot simply read the consumer's data, and the application cannot reach beyond its permitted scope.
Next you will see the layers of the model. Application roles control who can use the objects the application exposes. Privileges granted to the application, whether globally or through references, define what it may do. The application runs with its own identity and not with the identity of the consumer's administrator. Isolation keeps the application's internal objects separate from the consumer's.
You will look at how security is checked for listings. You will learn that applications intended for the Marketplace go through automated security scanning and review, and that findings must be resolved before publication.
You will also consider the provider's responsibilities, including secure coding, avoiding hard-coded secrets, limiting requested privileges and being transparent about what the app does.
You will draw a diagram that shows where each control applies and which party is responsible for it.
You will answer scenario questions about whether a described behaviour is allowed.
By the end of this lesson you will be able to describe the security layers of the framework and who is responsible for each.
The principle of least privilege says that something should have only the access it needs and nothing more. For Native Apps, this applies both to what you request from consumers and to what you expose. In this lesson you will learn least-privilege design and application roles.
You will begin with application roles. These are roles defined by the application, in the setup script, that bundle privileges on the objects that the application exposes. Consumers grant them to their own roles to decide who can use which parts of the app. You will see why you should create several granular roles, such as one for viewing results and one for administering settings, rather than a single powerful one.
Next you will look at how to grant privileges to application roles in the setup script, on schemas, views, procedures and functions, and how to keep internal objects ungranted so that they stay hidden. You will practise reading a short script and saying who can reach each object.
You will then apply least privilege to requests. You will ask the consumer only for the privileges that the app truly needs, and prefer references to specific objects over broad account-level privileges. You will discuss how this builds trust and improves approval rates, and how asking for too much can fail a security review.
You will write a role design for a sample app, listing roles, their purpose and the objects each can use, and review it for excess.
You will also consider the hierarchy, where one application role can be granted to another.
By the end of this lesson you will be able to design application roles and requests that follow least privilege.
An application sometimes needs access that it does not have by default, such as the ability to create a database, run tasks or read a consumer's table. The framework gives consumers a clear way to approve this. In this lesson you will study global privileges, object references and consumer approvals.
You will begin with global privileges. These are account-level capabilities that the application may need, such as creating compute pools, running tasks or using warehouses. The manifest lists the ones that are required or optional, and the consumer must grant them before the application can use them. You will see the typical examples and think about which are justified for which app.
Next you will look at object references. A reference is a way for the application to refer to a consumer's own object, such as a table, a view, a warehouse or a secret, without knowing its name in advance. The manifest defines the reference, including the type of object and the privileges that the app needs on it, and the consumer chooses the object to link. You will see why this is safer than asking for broad access.
You will then examine the approval flow. The application requests, the consumer sees the request and either approves or declines, and the app must handle both outcomes gracefully. You will learn that requests can be made through the interface and the permission tools, and that an app should explain why it needs each privilege.
You will practise reading manifest snippets and describing what the consumer will be asked to approve.
By the end of this lesson you will be able to explain how privileges and references are requested, approved and used.
Stored procedures can run in two ways, and the difference affects security. The exam often asks which to choose, and what each can access. In this lesson you will compare owner's rights with restricted caller's rights.
You will begin with owner's rights. A procedure that runs with owner's rights executes with the privileges of its owner, which in a Native App is the application. This means it can use objects that the caller cannot reach directly, which is how an app can offer a controlled operation on internal tables. It also means that the code must be written carefully, since it acts with the application's power on behalf of any permitted caller.
Next you will look at restricted caller's rights. A procedure that runs with caller's rights uses the privileges of the person or role calling it, and in an application it is restricted so that it cannot exceed what both the caller holds and the consumer has allowed. This is useful when the code should act only on what the user is entitled to see, for example when reading the consumer's own data.
You will compare the two with examples. You will see which is suitable for an admin procedure that updates internal state, and which is suitable for a procedure that reads a table that the caller selects. You will discuss risks, such as injection, over-broad results and revealing internal data.
You will learn the points that matter for the exam, such as how each mode is declared and the effect on object access.
You will work through scenario questions that ask you to pick the mode.
By the end of this lesson you will be able to choose between owner's rights and restricted caller's rights and justify the decision.
Some applications must call services outside Snowflake, and nearly all of them handle sensitive data. The framework allows both, but under tight control. In this lesson you will study external access, API integrations and data protection.
You will begin with external access. By default, an application cannot make network calls to the outside world. If it needs to, it must request external access, and the consumer must approve it. You will learn the building blocks, such as network rules that define the allowed destinations, external access integrations that make them available and secrets that hold the credentials, and how the manifest and the consumer approval process relate to them.
Next you will look at API integrations and the safe use of credentials. You will see why credentials belong in secrets, referenced by the app, and never in code, logs or the package, and how a consumer can provide their own credentials through a reference.
You will then examine data protection. You will consider ways to protect sensitive data, such as limiting what the application collects, masking and minimising the data in logs, using the consumer's own policies and making sure the application does not copy data out. You will discuss what telemetry is appropriate to share with the provider and how the consumer remains in charge of it.
You will review a scenario in which an application calls an external model service, listing what must be approved and how the risk is limited.
You will test your understanding with questions about what a consumer sees and decides.
By the end of this lesson you will be able to explain how an app gets controlled external access and protects sensitive data.
As applications grow in complexity, governance becomes more important. Consumers and providers need to know what an application intends to do, and to enforce limits on it. In this lesson you will study application specifications, feature policies and security governance.
You will begin with application specifications. These are formal descriptions that an application submits when it wants to use a capability, such as external access, which the consumer reviews and approves. You will see how a specification states what is needed and why, so that the consumer can make an informed decision, and how it can be changed over time with a new review.
Next you will look at feature policies. These are controls that the consumer or the platform can use to limit which features an application may use, so that an organisation can set a standard for all the applications it installs. You will think about when a company might apply one, for example to block external network access in a sensitive account.
You will then connect these to wider governance. You will consider auditing, where you review what applications are installed and what they were granted, change control, and the process of reviewing new versions that ask for more privileges. You will also look at the Marketplace review as a form of governance for providers.
You will list the checks a security team might perform before approving an application, and the evidence that a provider could supply.
You will practise with scenarios in which a specification is declined or a policy blocks a feature, and work out what the app should do.
By the end of this lesson you will be able to describe how specifications and policies support secure governance.
In this lab you will implement application roles and privilege requests in a working Native App, and test them from the point of view of both provider and consumer. It applies the security ideas of the whole section.
You will begin with a starter project that has a schema, a few views and procedures and an empty manifest section for privileges. You will plan the roles first, deciding on a viewer role that can read results and an admin role that can change settings, and writing down which objects each role will reach.
Next you will edit the setup script. You will create the application roles, grant the appropriate privileges to each on the exposed objects and leave the internal objects ungranted. You will add a procedure that is declared with owner's rights to update internal configuration, and a second that uses restricted caller's rights to read from a consumer-chosen table.
You will then edit the manifest. You will add the privileges that the application requires or may use, and define a reference to a consumer table with the right privileges. You will explain each entry in a comment.
You will deploy the application in development mode and test as the consumer. You will grant the viewer role to a test role, confirm what that role can and cannot do, link a table to the reference and call the procedures. You will test the denial cases, for example calling the admin procedure as a viewer.
You will record what you observed and fix any errors.
By the end of this lab you will be able to implement and test application roles, privileges and references.
To build a package properly you must know what goes into it. In this lesson you will study the anatomy of a Snowflake Native application package, including the files, the folder layout and the objects that surround them.
You will begin with the files. A package normally has a manifest file at the root, a setup script that is named in the manifest, and optional content such as a readme, a Streamlit application with its environment file and any other scripts, libraries or resources that the application uses. You will learn the rules about where files must be and how they are referenced.
Next you will look at the stage. The files are uploaded to a stage in the provider account, and the package uses them to create versions. You will see how the folder structure on your computer maps to the stage and why the manifest must point to the right paths.
You will then look at the application package object itself. You will learn that it is a container in the provider account which can hold shared data content in a database-like way, and that versions and patches are registered against it. You will see its relationship to the application that is created from it.
You will review a sample package and label each part, say whether it is code, configuration or data, and say what happens to it at install time.
You will practise spotting problems, such as a wrong path, a missing file or an artifact that is not listed.
By the end of this lesson you will be able to describe the contents and layout of a Native App package and how files reach it.
Application packages can be created in several ways, but SQL is the foundation that the exam expects you to know well. In this lesson you will create application packages with Snowflake SQL and learn the key commands.
You will begin with the creation command. You will write a statement that creates an application package with a name and, where useful, options such as a comment, and see what the new object looks like in the account. You will use a dedicated role that has the privilege to create packages, and learn which privilege that is.
Next you will create the stage that will hold your files, and upload the manifest and the setup script, using the CLI or the PUT command. You will list the stage to confirm what is there.
You will then add content to the package. You will learn how to share a database or specific objects with the package, so that they become available to the application as shared content, and what permissions are needed to do so.
You will see how to create a version from the staged files, and how to create a development application for testing, referring to the stage directly. You will read the output of each command, and learn to recognise the common errors, such as a missing manifest, an invalid path or a missing privilege.
You will put the commands in a script you can rerun, and learn how to drop the package safely, after dropping the dependent applications.
You will practise reading and explaining SQL snippets, which is how the exam often tests this topic.
By the end of this lesson you will be able to create and manage application packages and their stages with SQL.
The manifest is the file that tells Snowflake what your application is and what it needs. A mistake in it can stop the application from installing, and the exam tests it directly. In this lesson you will understand the manifest.yml file.
You will begin with its role. The manifest is a YAML file, placed at the root of the package, that describes the application's metadata and its requirements. Snowflake reads it when you create a version and again when a consumer installs the application. You will see that it must be valid YAML and that the indentation is significant.
Next you will examine the main sections. The version section names the version and may include a label and a comment. The artifacts section lists the files that make up the application, including the setup script, the readme and any interface files. The configuration section can set options, such as logging and tracing levels. The privileges section lists the account-level privileges that the app needs. The references section describes the consumer objects that it needs to link.
You will read a complete example, line by line, and explain each entry in plain language. You will edit it by adding a readme and a new privilege and check that the result is still valid.
You will look at the common mistakes, such as a wrong path in the artifacts, bad indentation, a missing required field or a name that does not match the file on the stage.
You will validate a manifest by creating a version from it and reading any error.
By the end of this lesson you will be able to read and write a correct manifest with the main sections.
The manifest has several sections that interact, and the details are where exam questions often hide. In this lesson you will study manifest versions, artifacts and configuration in more depth.
You will begin with the manifest version, which is the version of the manifest format itself, and not the version of your application. You will learn why it exists, how it determines which fields are allowed and what happens if you use a feature that the declared format does not support. You will separate this from the application's own version and patch numbers, which are managed when you register versions.
Next you will look at the artifacts section. You will see that it must name the setup script and may name the readme, the default Streamlit interface and other files or folders, and that the paths are relative to the root of the package. You will understand why a file that is not listed may not be available to the application, and how to include whole directories.
You will then study the configuration section. You will learn the options for the default log level, trace level and whether telemetry is enabled, and how they connect to the observability features you will see later. You will consider which settings suit development and which suit production.
You will compare a correct manifest with one that has errors and find each problem.
You will also practise answering questions that give a requirement, such as showing a Streamlit interface by default, and ask which part of the manifest to change.
By the end of this lesson you will be able to configure the artifacts and settings of a manifest correctly.
Privileges and references are the way an application earns the consumer's trust, and they are defined in the manifest. In this lesson you will configure references and privilege requirements, and see how they appear to the consumer.
You will begin with the privileges section. You will list the account-level privileges that the application needs, with a short description for each that explains the reason in terms that a consumer will understand. You will learn that the wording is important, since the consumer sees it when they decide, and that unneeded privileges should be left out.
Next you will define references. A reference entry names the reference, the type of object, such as a table, a view or a warehouse, the privileges that the application needs on the linked object and whether it is required or optional, and whether the consumer can link one or several. You will write references for a table of customers and a warehouse for the app to use.
You will then see how the application uses them. You will learn the function that returns the object behind a reference, and how the setup script and procedures can use it to read or write data. You will use the callbacks that run when the consumer adds or removes a reference, and explain why they matter for validation and cleanup.
You will practise reading manifests and predicting the screens and the effects, and finding the mistakes in a faulty one, such as a missing privilege on the reference.
You will think about how requests change across versions, and what the consumer sees when an upgrade adds a new one.
By the end of this lesson you will be able to define privileges and references that are minimal, clear and correctly used.
As an application grows, the way you organise its files matters for maintainability and for correct packaging. In this lesson you will organise application project files and dependencies, so that your projects are clear, repeatable and easy to deploy.
You will begin with a recommended project layout. You will place the manifest and the setup script in the app folder, with separate folders for SQL scripts, Python code, the Streamlit interface and documentation. You will add a project definition file for the Snowflake CLI that lists what to upload and where.
Next you will look at how to split a large setup script into several smaller scripts. You will learn how the main script can call the others, and the order in which they must run. You will see why numbering them and making each one repeatable makes deployment predictable, and how this ties in with idempotence.
You will then deal with dependencies. For Python code, you will see how to declare packages from the Snowflake channel in the code or the environment file, and how to include your own modules. For Streamlit, you will see the environment file that lists the libraries. You will discuss how to pin versions so that behaviour is the same on each installation.
You will consider the use of version control for the project, with a sensible ignore file and no secrets, and a simple scheme for branches and releases.
You will reorganise a messy sample project into a clean one and confirm that it still deploys.
By the end of this lesson you will be able to structure projects and manage code dependencies for reliable packaging.
Before you release an application, you should make sure that it is complete and correct. Packaging and validation are the steps that catch problems early. In this lesson you will package and validate Native App components.
You will begin with what packaging involves. You will bring together the manifest, the setup script, the interface files and the other artifacts, upload them to the stage and create a version of the package from them. You will see how the CLI automates this and what it does behind the scenes, so that you can do it manually if needed.
Next you will learn about validation. Snowflake checks the manifest and the package when you register a version, and reports errors such as invalid YAML, missing artifacts or setup script errors. You will see how to read the messages, find the cause and fix it. You will also learn about the verification steps that you can do yourself, such as running the setup script in development mode and testing the main functions.
You will build a validation checklist. It will include whether the manifest is valid and uses the correct paths, whether every artifact is present, whether the setup script runs from scratch and again on top of itself, whether the privileges and references are correct, whether roles grant access as intended and whether the code works with the least privilege.
You will run the whole process on a sample package and deliberately introduce an error to see how it is reported.
You will also discuss the checks that the Marketplace will make later.
By the end of this lesson you will be able to package an app, validate it and diagnose the errors.
This lab ties the section together. You will build a Native App package with a manifest and a setup script from the beginning, deploy it and verify it works. It is the first lab in which you create each of the core files yourself.
You will begin by creating a project folder with a clean layout and a project definition file. You will then write the manifest. You will add the version, the artifacts, including the setup script and a readme, the configuration for logging and the privileges and a reference to a consumer table, with clear descriptions.
Next you will write the setup script. It creates an application role, a versioned schema, a view and a stored procedure that reads from the reference, and grants the right privileges to the application role. You will add comments to explain each step.
You will then create the application package and stage with SQL or the CLI, upload the files and create a development application. You will read the output and fix any errors, such as a path or a syntax problem.
You will test as a consumer. You will grant the application role to a role, link a table to the reference, call the procedure and query the view, and confirm the results. You will also try an action that should be denied to confirm the security.
You will finish by making a small change, redeploying and checking the result, then cleaning up by dropping the application and the package in the correct order.
By the end of this lab you will be able to create, deploy and test a complete Native App package from scratch.
The setup script is the heart of a Native App. It runs when a consumer installs or upgrades the application, and it creates everything the application needs inside the consumer's account. In this lesson you will understand Native App setup scripts and what they are responsible for.
You will begin with when and how the script runs. The manifest names it as an artifact, and Snowflake runs it in the context of the new application on installation, and again on each upgrade. It runs with the application's own identity, which is why it can create objects in the application without the consumer needing to do anything.
Next you will look at what it typically does. It creates schemas, tables, views, stored procedures, functions and application roles, grants privileges on the exposed objects to those roles, sets up any configuration or state and may call other scripts. You will see that it is written in SQL, often with Snowflake Scripting blocks for logic, and may call Python code defined inline or from staged files.
You will learn the rules of the environment. The script has access only to what the application has, so it cannot use objects that the consumer has not granted, and some statements are limited. You will see why it must not assume the presence of consumer objects and why it must work both for a new installation and for an upgrade.
You will read a short example and explain each statement.
You will list the errors that are typical in a setup script, such as an incorrect order of statements and missing grants, and the symptoms.
By the end of this lesson you will be able to explain the role of the setup script and describe its execution context.
The setup script builds the application's visible and internal structure out of ordinary database objects. In this lesson you will create schemas, views, functions and procedures, and learn how they are exposed to consumers.
You will begin with schemas. You will create a schema for the public interface and another for internal helpers, and discuss how the grouping makes access control simpler. You will see how the names that you choose become part of what consumers use, and why a stable naming scheme matters.
Next you will create views that present results, and learn why a view is a good way to show data from internal tables without exposing the tables. You will create a secure view where needed and see why it is recommended when sharing data.
You will then create functions and stored procedures. You will write a simple SQL user-defined function, a SQL stored procedure that runs several statements and a procedure that is written in Python. You will specify the language, the arguments, the return type and the execution rights, and test each in the development application.
You will grant usage on the schemas and the right privileges on each object to the application role, using the correct syntax and keeping to least privilege. You will use the grant of future objects with care.
You will check what a consumer can see by switching to a test role, and compare it with what the application can see internally.
You will find and correct an example with a missing grant that makes a procedure invisible.
By the end of this lesson you will be able to create and expose the core database objects of an application.
Applications change with each version, but their data must survive. Snowflake provides versioned schemas to make this possible. In this lesson you will compare versioned schemas with regular schemas and learn when to use each.
You will begin with the problem. If an upgrade simply re-runs a script that creates procedures, the old versions may linger, and if it drops and recreates a schema, any data inside is lost. You need one place for code that can be replaced cleanly, and another for state that must persist.
Next you will learn about versioned schemas. They are schemas that are created with a special keyword in the setup script, and each application version has its own set of them. When the application is upgraded or patched, Snowflake switches to the new version of the objects, and the older ones are retired, so that code is swapped in a consistent manner. You will see that this makes upgrades safer and, where needed, makes it easier to roll back.
You will then look at regular schemas. They hold objects that continue across versions, such as tables with consumer configuration, results or logs. You will see that you must handle schema changes here yourself, for example by adding a column conditionally.
You will learn the restrictions. Versioned schemas are intended for code objects and have limits on what they can contain, so you should not place persistent tables in them.
You will classify the objects of a sample app and write the correct statements for each.
By the end of this lesson you will be able to choose the right schema type for each kind of object.
Many applications need data from the provider, such as reference tables, lookup lists or trained model parameters. The framework lets you bundle this data into the package. In this lesson you will bundle shared data into application packages.
You will begin with the concept of shared content. The provider can share a database, or specific schemas and objects, with the application package, and the data then becomes available to the installed application without being copied into the consumer's account in the usual way. You will see why this matters for storage costs and for keeping a single source of truth.
Next you will walk through the steps. You will create a database in the provider account with the reference data, grant the right privileges to the application package, using the reference usage privilege, and then add the shared content to the package. You will see how the application accesses it through views created in the setup script.
You will learn how access is controlled. The consumer does not receive direct access to the shared objects, and so the application should present the data through views or procedures that you design. You will use a secure view and see why this is required.
You will consider updates. You will learn that changes to shared data can appear in the application, and discuss how to manage changes, for example by coordinating them with versions, and what happens when the structure changes.
You will examine the limits of this approach and when to ask the consumer to provide data instead.
By the end of this lesson you will be able to bundle data safely and expose it through controlled views.
An application has to manage the objects it creates and the state that it keeps. Getting this right is what makes upgrades and uninstalls clean. In this lesson you will study managing database objects and application state.
You will begin with the kinds of state. There is configuration chosen by the consumer, such as settings and thresholds. There is operational state, such as the last run time or a processing watermark. There are results and logs that the application writes. You will place each in a table within a regular schema.
Next you will design a small set of state tables. You will create a table for settings with a key and a value, and a table for run history, and write procedures that read and update them. You will discuss how to handle the first installation, using defaults that the setup script inserts only if they are not present, and how to keep it safe on upgrades.
You will then see how the application owns its objects. Everything that the setup script creates is owned by the application, and it is removed when the application is dropped, so consumers do not have leftover objects. You will consider what the consumer would expect to be kept and what should be cleaned up, and learn how a procedure can create objects outside the application only when it has been granted the privilege to do so.
You will deal with errors and concurrency, such as two users running a procedure at once.
You will write a short design note that lists each object, its type, its schema and its lifecycle.
By the end of this lesson you will be able to design and manage the objects and the state of an application.
Your setup script will run more than once. It runs at installation, and again at each upgrade and patch, sometimes against an application that already has data. If the script is not safe to repeat, it can fail or damage state. In this lesson you will design idempotent setup scripts.
You will begin with the definition. A script is idempotent when running it several times produces the same final result as running it once, without errors. You will see why this is a requirement for Native Apps and not just a good habit.
Next you will learn the techniques. You will use CREATE OR REPLACE for objects that are code and can be safely replaced, and CREATE IF NOT EXISTS for objects that hold state. You will use conditional logic in Snowflake Scripting to check whether a column or an object exists before changing it. You will insert default rows only when they are missing, using a condition or a merge. You will grant privileges in a way that can be repeated without error.
You will learn the traps. A CREATE OR REPLACE on a table deletes its data. A plain CREATE fails if the object exists. An insert that is not guarded creates duplicates. A script that depends on the order of earlier runs will break on a fresh install.
You will review a script that is not idempotent, list each problem and rewrite it. You will then test by running the script twice and three times in a development application, checking the objects and the data after each run.
You will build a small test routine that you can reuse.
By the end of this lesson you will be able to write setup scripts that are safe to run repeatedly.
Even a careful application will meet schema changes and script failures. The way you plan for them determines whether an upgrade is a minor event or an outage. In this lesson you will handle schema changes and setup script failures.
You will begin with schema changes. Over the life of an app, you will add columns, change data types, rename objects and reorganise tables. You will learn how to make each change safely, for example by adding columns with a default, migrating data in steps and keeping old and new structures side by side until the migration is complete. You will avoid destructive changes that lose data.
Next you will see how to manage migrations. You will create a table that records the schema version of the persistent state, and write a migration procedure that checks the current version and applies the needed steps in order. You will call it from the setup script, so that any consumer, whatever version they started with, ends in the same state.
You will then study failures. You will learn what happens when a setup script fails during installation or upgrade. A failed upgrade does not leave the application in a half-changed state in the same way a manual change might, and the previous version remains in use, but you must still understand how to read the error and correct the cause. You will practise reading the messages and finding the failing statement.
You will design for diagnosability, by adding clear messages and logging at key points, and by testing the upgrade from several earlier versions.
By the end of this lesson you will be able to plan migrations and respond to failures in setup scripts.
This lab brings together the whole section. You will create a complete setup script with versioned schemas, state tables and safe, repeatable logic, and then test it by installing and upgrading an application.
You will begin with the design. You will list the objects that the application needs: a versioned schema for procedures and views, a regular schema for settings and run history, application roles for viewers and administrators and a bundled reference table that comes from the package's shared content. You will decide which of these are code and which are state.
Next you will write the script in parts. In the first, you will create the schemas, using the versioned keyword for code. In the second, you will create the state tables with a conditional pattern, and insert the default settings only if they are absent. In the third, you will create the views and procedures and grant them to the correct roles. In the fourth, you will add a small migration procedure that adds a column if it does not exist.
You will deploy the first version and test it, then change the script by adding a procedure and a new column, create a second version and upgrade the application. You will check that the data in the state tables survives, the new procedure works and the old code is replaced.
You will run the script repeatedly to prove that it is idempotent, and introduce a deliberate error to see how a failure is reported.
You will clean up and summarise what you learned.
By the end of this lab you will be able to write and test a complete, upgrade-safe setup script.
Native App logic can be written in several ways, and a good developer picks the right tool for each task. In this lesson you will study the patterns for developing application logic, and learn how they fit together.
You will begin with the options. SQL stored procedures are ideal for orchestrating statements and controlling flow. SQL functions suit simple calculations and reusable expressions. Table functions return sets of rows. Python and Snowpark suit complex data transformation, libraries and machine learning, and container services fit specialised workloads. You will see a table that compares them by capability, performance and complexity.
Next you will see the common patterns. The first is the facade pattern, where a small public procedure calls internal ones, so that the interface is simple and stable and the internals can change. The second is the configuration pattern, in which behaviour is controlled by settings in a table and not by code edits. The third is the pipeline pattern, in which a chain of steps reads from the consumer's referenced table, transforms the data and writes results to an output table or view.
You will consider the separation of concerns, so that data access, business rules and presentation are not mixed into a single large procedure, which makes testing easier.
You will discuss error handling and logging in application logic, and idempotent operations, such as using merge in place of blind inserts.
You will choose the best approach for several short scenarios and justify it.
By the end of this lesson you will be able to select suitable logic patterns and structure them cleanly.
Stored procedures are the workhorses of a Native App. They let you combine several operations, make decisions and give consumers one clear action to call. In this lesson you will write SQL stored procedures for use in Native Apps.
You will begin with the syntax. You will write a procedure with arguments, a return type and a body in Snowflake Scripting, using variables, conditions, loops and exception blocks. You will call it from a worksheet and read the result.
Next you will build a realistic procedure. It reads a referenced table, applies a calculation, writes the output to a results table and returns a summary message, such as the number of rows processed. You will use the function that gives the name of the referenced object, and run the SQL dynamically in the right way, with proper quoting.
You will learn to make procedures safe. You will validate the arguments, avoid building SQL by joining unchecked strings, which can lead to injection, and use identifier handling functions and bind variables. You will decide whether each procedure should run with owner's rights or restricted caller's rights, and explain the effect.
You will add error handling with an exception block that records the failure in a log table and returns a clear message, and test the failure path by passing bad input.
You will grant execution of the procedure to the application role and check access from a consumer role.
You will review the results and discuss how to keep procedures small and easy to understand.
By the end of this lesson you will be able to write secure, robust SQL procedures for an application.
Functions and table functions let your application offer reusable calculations and set-returning logic that consumers can use directly in their queries. In this lesson you will build user-defined functions and table functions.
You will begin with scalar user-defined functions. You will write a SQL function that takes values and returns one result, such as a score or a classification, and use it in a query on a sample table. You will see how to define the arguments and the return type and how to make the function deterministic where it is, which helps with optimisation.
Next you will write a Python function. You will specify the runtime version, the handler, the packages it uses and its code inline, and call it from SQL. You will compare its performance and flexibility with the SQL version, and decide when each is better.
You will then create a table function, which returns rows. You will write one that takes a string and returns the individual parts, or one that expands a record into several rows, and use it with a lateral join. You will see the syntax for the return table definition and, for Python, the handler class with a process method.
You will manage access. You will grant usage on the functions to the application role and test them from a consumer role. You will think about whether a function should be visible to consumers at all, or whether it is an internal helper.
You will also consider the limits of functions, including that they cannot always perform side effects and have rules about the objects they can reach.
You will write and test each type with example data.
By the end of this lesson you will be able to create and expose scalar and table functions in SQL and Python.
Snowpark lets you write data logic in Python that runs inside Snowflake, close to the data, and it is a key option for Native Apps that need more than SQL. In this lesson you will study Python and Snowpark integration.
You will begin with what Snowpark offers. You will learn about the DataFrame API, which lets you build queries with Python methods that Snowflake converts into SQL and runs on its own compute, and about Python stored procedures and functions, which receive a session object that you can use to run these operations.
Next you will write a Python stored procedure for an application. You will declare the runtime, the packages, including the Snowpark library, and the handler. In the handler, you will use the session to read from a referenced table into a DataFrame, filter and aggregate it, and write the result to an output table. You will return a short message.
You will see how to include other code, such as your own modules, by placing the files on the stage and importing them in the procedure definition, and how to use third-party packages from the Snowflake channel, noting that availability should be checked in the current documentation.
You will discuss good practice. You will push work down into DataFrame operations and avoid pulling large data into memory, handle errors and log them and keep the code testable by separating the logic from the handler.
You will also look at the access rules, including the execution rights of the procedure and the objects it can reach.
You will build and test a complete example.
By the end of this lesson you will be able to write and deploy Snowpark Python logic in an application.
How a piece of code runs determines what it can touch, and mistakes here are a common source of both bugs and security issues. In this lesson you will study execution rights and access restrictions in application logic.
You will begin by reviewing the two modes. A routine that runs with owner's rights uses the application's privileges, and one that runs with restricted caller's rights uses the caller's privileges, limited by what the application and the consumer have permitted. You will describe the effect of each on the objects that the code can reach.
Next you will look at the access restrictions that apply to application code. It can reach its own objects, shared content that the package provides, the consumer objects that have been linked through references and any account-level resources that were granted as privileges. It cannot reach anything else, even if the consumer's user could. You will test this with a procedure that tries to read an object that has not been granted, and read the error.
You will study how access propagates. When a procedure calls another, or when a view uses a table, the rights that apply depend on how each is defined. You will see where a chain can break, for instance when an owner's rights procedure calls a function that the app role has not been granted.
You will practise debugging access problems by checking the grants, the execution mode and the references, in a methodical order.
You will work through scenarios and decide which mode and which grants solve the problem while keeping least privilege.
By the end of this lesson you will be able to explain and troubleshoot access behaviour in application code.
The whole point of many Native Apps is to work on the consumer's own data. The framework provides a clear mechanism for this, which is the object reference. In this lesson you will use consumer data through object references in your application logic.
You will begin with the flow. The manifest defines a reference with a name, an object type and the privileges that the application needs. The consumer links a real object to it, through the interface or with a command. From then on, the application can ask for the object that is behind the reference and use it, without ever knowing its real name in advance.
Next you will write the code. You will use the function that returns the identifier of the referenced object, and build a query that uses it, taking care of quoting and avoiding string concatenation of unchecked values. You will write a procedure that reads from the referenced table and one that writes results to the application's own table.
You will handle the cases in which the reference has not been set, or has been removed. You will check whether it exists, return a clear message that tells the user what to do and make sure that the application does not fail in confusing ways.
You will also work with the shape of the consumer's data. Since each consumer's table may differ, you will validate the columns that you need, map them through a configuration table if necessary and report any problems clearly.
You will test with two different tables linked to the same reference.
By the end of this lesson you will be able to build logic that safely works on consumer data through references.
Applications fail in ways that you did not predict, and slow ones lose users. Debugging and optimisation are therefore important skills for a provider. In this lesson you will debug and optimise application logic.
You will begin with debugging. You will use the development mode of the application to run procedures and inspect the results, read the error messages from the query history and use logging to record what happens at each step. You will see how to add log statements to procedures, using the logging features you will study in a later section, and how to read them from an event table.
Next you will study common errors. These include missing grants, wrong object names or quoting, type mismatches, a failure to handle null values, a reference that is not set and a script that behaves differently with data in a larger size. You will reproduce each in a test and fix it.
You will then look at optimisation. You will use the query profile to find slow steps, avoid row-by-row processing, prefer set-based SQL and DataFrame operations, filter early, select only the columns needed and use a suitable warehouse size, which the consumer controls. You will think about caching and the cost of repeated work.
You will learn to test with realistic data volumes, since a function that is quick on ten rows may be slow on ten million.
You will make a small checklist for reviewing code before a release.
You will diagnose and fix a faulty and slow sample application.
By the end of this lesson you will be able to find, fix and speed up problems in application logic.
This lab combines the techniques of the section into one application with real business logic. You will build stored procedures, user-defined functions and Snowpark logic that work on consumer data, and test them from a consumer's point of view.
You will begin with a brief. The application should read a consumer's orders table, calculate a score for each customer using a function, produce a summary table by segment with a Snowpark procedure and provide a facade procedure that runs the whole process and returns a message. You will plan the objects and the access they need.
Next you will build the pieces. You will define a reference to the orders table in the manifest, create a SQL function for the scoring rule, create a Python Snowpark procedure that reads through the reference and writes the segments, and create a SQL facade procedure that validates the reference, calls the Snowpark procedure, records the run in a history table and handles errors.
You will grant the appropriate privileges to the application roles, expose only the facade and the results view, and keep the helpers internal. You will deploy in development mode, link a test table and run the whole process. You will check the results against a manual calculation.
You will test the failure paths, for example by calling the procedure before the reference is set, by linking a table with a missing column and by calling an internal procedure as a consumer role.
You will use the query profile to look for improvements and apply one.
By the end of this lab you will be able to build, secure and test layered application logic.
A Native App is far more useful to most consumers when it has a graphical interface. Streamlit makes it possible to build one directly inside Snowflake. In this lesson you will be introduced to Streamlit in Snowflake Native Apps.
You will begin with what Streamlit is. It is a Python framework for building interactive data applications, where the page is defined by a script that uses simple calls for text, tables, charts and input widgets. In Snowflake, the script runs inside the platform, with the data and with the permissions of the application, so there is nothing to host and no data leaves the account.
Next you will see how it fits into a Native App. You will learn that the Streamlit file is listed as an artifact in the manifest, along with the environment file that declares libraries, and that the manifest can name a default interface that opens when the consumer opens the application. You will see how the application's roles control who can open it.
You will build a first page. You will write a short script that gets the active session, runs a query against a view in the application and displays the result in a table, add a title and a button, and deploy it in development mode. You will open the interface as a consumer would.
You will learn about the limits and differences from standalone Streamlit, such as the supported libraries and the way that sessions and state work, noting that you should check the current documentation for supported versions and features.
By the end of this lesson you will be able to create and deploy a simple Streamlit interface in an application.
A good interface helps users succeed without reading a manual. The same applies to Native Apps, where the first screen often decides whether a consumer trusts the application. In this lesson you will design application interfaces and user experiences.
You will begin with the user journey. A consumer installs the app, opens it and sees what to do first. You will map this journey and identify the steps that need guidance, such as granting privileges, linking tables, setting preferences and running the first analysis. You will design the interface so that the next action is always clear.
Next you will study layout and structure. You will use sidebars for navigation and settings, tabs or pages for different tasks, columns to arrange content and expanders to hide detail. You will keep each screen focused, and use headings, short text and consistent wording.
You will design for the setup experience. If a privilege or reference is missing, the interface should explain what is needed and why, and give a button or instruction to fix it, and not just show an error. You will plan the empty states, loading messages and clear feedback after actions.
You will consider accessibility and clarity, such as readable colours, meaningful labels and not relying on colour alone. You will also plan for errors, with messages that help and do not expose internal details.
You will sketch the screens for a customer analytics app, review them against the journey and refine them.
By the end of this lesson you will be able to design an interface that guides users clearly through a Native App.
An interface becomes valuable when it works with real data and real logic. In this lesson you will connect Streamlit to application data and logic, so that the pages show live results and can trigger actions.
You will begin with reading data. You will get the session in the Streamlit script, run a query against a view that the application exposes and show the result with a table or a chart. You will cache the result with the caching feature, so that the interface is quick, and use a time limit to avoid stale data.
Next you will call logic. You will connect a button to a stored procedure, using the session to call it with arguments from the input widgets, and show the returned message. You will use a spinner while it runs and report success or failure clearly. You will see why calls that change data should be triggered only by an explicit action.
You will learn to handle the state of the page. You will use the session state to keep values between interactions, and to avoid running an expensive operation every time that the page reruns. You will design the code so that data access is in small functions that are easy to test.
You will consider security. You will use only the objects that the application exposes, validate user input before passing it to procedures and never place credentials in the code.
You will build a page that lets the user choose a segment, view the results and run a refresh, and test it as a consumer.
By the end of this lesson you will be able to build interactive pages that use application data and procedures.
Different users should see different things. An administrator might change settings, while an analyst might only view results. In this lesson you will implement role-aware UI controls in a Streamlit interface.
You will begin with the model. The application defines application roles, and the consumer grants them to their own roles. The Streamlit interface runs for the user who opens it, and so it can check what that user is allowed to do and show or hide controls accordingly. You will see that hiding a control is a courtesy, while the real protection is in the grants on the underlying objects.
Next you will learn how to find out the user's access. You will see techniques such as checking whether the current role has a given application role, or testing access by trying a safe operation and handling the error. You will write a helper function that returns the capabilities of the user, and use it across the pages.
You will build an interface with two modes. The viewer sees the results and filters. The administrator also sees a settings page, with controls to change thresholds and run maintenance procedures. You will disable or hide the administrator's controls for the viewer and explain why.
You will test the interface by switching between roles with different grants, and verify that attempts to call restricted procedures still fail, even if the control is shown.
You will discuss the risk of relying on the interface alone.
By the end of this lesson you will be able to build a Streamlit interface that adapts to user roles while relying on real privileges.
Applications often need to ask consumers for permissions, and the experience should be smooth and secure. The Native App Permission SDK helps you do this from the Streamlit interface. In this lesson you will use the Snowflake Native App Permission SDK.
You will begin with the problem. Without a helper, a consumer must run SQL commands or use the settings screens to grant the privileges or link the references that the application needs, which is confusing. The SDK lets the interface check whether the privileges are in place, and open a request that the consumer can approve directly in the app.
Next you will study the main capabilities. You will see how to check whether a given privilege has been granted, how to request one or several privileges, how to request a reference binding, with the object types the app supports, and how to find out whether the request has been approved. You will learn how the SDK works with the definitions in the manifest, which remain the source of truth.
You will build a setup page. When the user opens the app, it checks for the required privileges and references and shows a clear status for each, with a button to request those that are missing. You will use language that explains why each is needed.
You will handle all the outcomes: approval, refusal and no response. The rest of the interface should degrade gracefully and explain what is not available.
You will test the flow as a consumer and read the information that the consumer sees.
By the end of this lesson you will be able to add a clear permission request flow to an app.
Privileges and references are how the consumer controls the app, and the way you request them shapes how much they trust it. In this lesson you will implement consumer privilege and reference requests as a complete, thoughtful flow.
You will begin by planning the requests. You will list each privilege and reference that the application needs and classify each as required for the core function or optional for an extra feature. You will write a short explanation for each in terms that a business user can follow, and decide when in the journey to ask. Asking for everything at the start tends to discourage consumers, while asking in context is clearer.
Next you will implement it. You will use the permission tools to request a privilege or a reference when the user opens a feature that needs it. You will check the current status before asking and show the state of each. For references, you will let the user pick from the objects that suit the type, and explain the effect of linking.
You will deal with changes. If the user removes a reference or revokes a privilege, the application should notice and respond, by disabling the feature and telling the user how to restore it. You will use the callbacks defined in the manifest to validate a reference when it is added, for instance by checking that the table has the columns needed.
You will test the experience as a consumer through several paths, including refusal and revocation.
You will document the requests in the readme so that security teams can review them before approval.
By the end of this lesson you will be able to build a clear, resilient flow for privilege and reference requests.
Streamlit interfaces in Native Apps can fail in ways that are hard to see, because the user may be a consumer whose account you cannot access. In this lesson you will test and troubleshoot Streamlit applications.
You will begin with testing during development. You will deploy the application in development mode and open it under different roles. You will go through each page, exercising every control, with normal data, empty tables, large tables, invalid input and missing privileges. You will keep a checklist of the scenarios, and learn to test the first-time experience from a clean installation.
Next you will study common problems. The interface may not load because the file is not listed in the manifest or the environment file lists an unsupported package. A page may show an access error because a grant is missing. Data may appear stale because of caching. A button may run a procedure more than once because of the way Streamlit reruns the script. You will reproduce each and fix it.
You will learn how to find the cause. You will read the error shown in the interface and the full details, check the query history, use the logging from the application to see what happened on the server and add temporary diagnostic output that you remove before release.
You will design the interface to fail gracefully, with a short, friendly message for the user and a technical log entry for the provider, so that you can support consumers without seeing their data.
You will practise with a faulty sample app and repair it.
By the end of this lesson you will be able to test an interface thoroughly and diagnose typical failures.
This lab brings the section together. You will build an interactive Streamlit dashboard for a Native App that reads data through a reference, runs application logic, respects roles and requests the privileges it needs.
You will begin with the plan. The dashboard has a setup page that checks for the required privileges and the reference, a results page with filters and charts and an administration page with settings and a refresh button. You will list the objects and procedures that each page uses.
Next you will build it. You will write the Streamlit script with pages in a sidebar, add the permission checks, using the SDK to request what is missing, and then build the results page with a query on the exposed view, a segment filter and a chart. You will add the refresh action that calls the facade procedure and shows the outcome, and the administration page with a threshold setting that is saved to the settings table.
You will add role awareness, so that only the administrators see the settings, and handle the empty states, such as before the reference is linked or before the first run. You will list the interface file and the environment file in the manifest and set the interface as the default.
You will deploy in development mode, and test as an administrator and a viewer, with and without data. You will try the failure paths and fix the problems you find.
You will take screenshots or notes of each state, for your own documentation.
By the end of this lab you will be able to deliver a complete, role-aware and secure Streamlit interface for a Native App.
Some workloads do not fit into SQL or Snowpark, such as a custom machine learning service, a web API or software that needs specific libraries. Snowpark Container Services lets you run containerised applications inside Snowflake. In this lesson you will be introduced to Snowpark Container Services.
You will begin with what it is. Snowpark Container Services, often shortened to SPCS, is a fully managed container platform in Snowflake. You package your software as a container image, store it in an image repository, and run it on compute that Snowflake manages, close to the data and within its security boundary. You will see why this is attractive when you want to avoid sending data to an external platform.
Next you will meet the main objects. An image repository stores images. A compute pool provides the nodes that run the containers. A service is a running set of containers defined by a specification. Jobs run to completion, and endpoints make a service reachable. You will see how these relate and which roles and privileges manage each.
You will learn about the typical uses, which include model inference with specialised frameworks, GPU workloads, web applications and APIs and background processing, and when a container is better than a stored procedure.
You will discuss the requirements and limitations, such as that the availability of the feature depends on the region and account, that it uses credits while compute pools run and that you should check the current documentation for details.
You will build a glossary of the terms to use in later lessons.
By the end of this lesson you will be able to describe what SPCS is and when to use it.
Containers change the shape of a Native App. The app is no longer just SQL objects and an interface, but also a running service with its own network and compute needs. In this lesson you will study Native App architecture with containerised workloads.
You will begin with the architecture. The application package contains the service specification and, depending on the design, references to images that are stored in an image repository in the provider account. When the consumer installs the application and grants the required privileges, such as the ability to create a compute pool, the application can create the pool and start the service in the consumer's account.
Next you will see how the pieces connect. SQL functions and procedures in the application can call the service through an endpoint, and a Streamlit interface can use these functions to present results. The service can read the consumer's data through the application, and can write results back, using only the privileges it has been granted.
You will look at the security aspects. The service runs inside Snowflake, its network access is limited unless external access is approved, and the images are controlled by the provider. You will discuss how the consumer can inspect what is requested and how the provider must keep the images updated and free from known vulnerabilities.
You will consider cost and lifecycle. Compute pools consume credits while they run, so you need to design when they start, suspend and stop, and tell the consumer.
You will draw an architecture diagram for an example, such as a model scoring service, with the flows and the privileges.
By the end of this lesson you will be able to explain how containerised workloads fit into a Native App.
A container image is the packaged software that your service runs, and it is the foundation of an SPCS workload. In this lesson you will create and manage container images, and learn how to get them into Snowflake.
You will begin with the basics. An image is built from a Dockerfile, which describes a base image, the files to include, the dependencies to install and the command that starts the service. You will write a simple Dockerfile for a small web service, and build it locally with Docker. You will learn why the image should be built for the platform that Snowflake uses and why it should be small and use a trusted base.
Next you will look at the image repository. You will create one in your Snowflake account, find its address, log in with the Docker command line using the Snowflake tools and push the image. You will list the images in the repository and check the tags.
You will then consider versioning and management. You will use meaningful tags that match your application versions and avoid the use of a floating tag such as latest for a release. You will remove old images that are no longer needed, and discuss how images relate to application versions and upgrades.
You will study the security practices, which include scanning images for known vulnerabilities, not including secrets in the image and running as a non-root user where possible.
You will also look at how the application package refers to the image in the service specification.
You will build, push and verify an example image.
By the end of this lesson you will be able to build, publish and manage the images used by a Native App.
Once you have an image, you need compute to run it and a specification to describe how. In this lesson you will study compute pools, services and service specifications.
You will begin with compute pools. A compute pool is a set of virtual machine nodes on which services run. You will learn how to choose the instance family, for example standard CPU or GPU, and the minimum and maximum number of nodes, how a pool starts, suspends automatically after a period of inactivity and resumes, and how the cost relates to the time that it runs. You will see how a Native App requests the privilege to create a pool and how the consumer's approval is involved.
Next you will look at the service specification, a YAML file that defines the containers in a service. You will read and write one, with the container name, the image path, the command and arguments, the environment variables, the resources requested, the volumes and the endpoints that it exposes. You will understand how secrets and the application's references can be used without placing credentials in the file.
You will then create a service from the specification, check its status and read its logs. You will learn about the states that a service passes through, and the commands for suspending, resuming, altering and dropping it.
You will review how to size the resources, how to plan for several instances where supported and how to keep costs under control.
You will read a faulty specification and find its errors.
By the end of this lesson you will be able to configure pools and services with correct specifications.
A service is only useful if something can reach it, and in a secure platform that access must be carefully controlled. In this lesson you will study service endpoints, permissions and external access for containerised services.
You will begin with endpoints. A specification can declare endpoints, each with a name and a port, and optionally mark an endpoint as public, so that it can be reached from outside Snowflake through an authenticated URL. You will see how a service's endpoints are listed and used, and how service functions allow SQL to call a service endpoint, so that data can be sent for processing and a result returned.
Next you will look at permissions. You will learn that the access to a service is controlled by roles. A service role may be defined in the specification, and privileges to use the endpoints are granted to it, which the application can then expose through application roles. You will see how to give consumers the right level of access and no more.
You will then study external access. By default, a service cannot call the internet. If it must, for example to download a model or to call an external API, the app must request an external access integration, based on network rules and with secrets for credentials, and the consumer must approve it. You will see how to limit the destinations, and why you should avoid broad rules.
You will consider the inbound and outbound paths together in a diagram and mark each control.
You will answer scenario questions about who can reach what and why a call fails.
By the end of this lesson you will be able to secure service access and configure external connectivity correctly.
A containerised application has more moving parts, and so it has more ways to fail. In this lesson you will learn container-based application deployment and troubleshooting, with a method that you can use in the exam and in practice.
You will begin with the deployment flow. The provider builds and pushes the image, adds the specification and the setup logic to the package, creates a version and publishes it. The consumer installs the application, grants the privileges and the application creates the compute pool and the service. You will list each step and what can go wrong.
Next you will study common failures. The image may not be found or may be built for the wrong platform. The compute pool may not start because of a missing privilege or insufficient capacity. The service may crash because of an error in the code or a wrong command. An endpoint may be unreachable because of the wrong port or a missing role grant. External calls may fail because access was not approved. Costs may rise because a pool is never suspended.
You will learn the diagnostic steps. You will check the status of the pool and the service, read the container logs, look at the events and the service description, verify the privileges and test the endpoint from SQL. You will work in an order that moves from the infrastructure to the application, so you do not guess.
You will fix a series of faulty deployments and write a troubleshooting checklist.
You will also think about what information a consumer can share with you and what they should not.
By the end of this lesson you will be able to deploy containerised apps and diagnose failures in an orderly way.
In this lab you will bring the container lessons together. You will build a containerised service for a Native App, expose it to SQL and test it from a consumer's point of view, using a simple but realistic example.
You will begin with the design. The service is a small scoring API, written in Python, that receives a batch of values and returns a score for each. The application wraps it with a service function and a procedure, and provides a view for results. You will list the objects, the privileges for a compute pool and the roles that will use it.
Next you will build it. You will write the service code and the Dockerfile, build the image, create an image repository and push it. You will write the service specification with the container, the resource requests and the endpoint, and add it to the application package with the setup script that creates the pool and the service when the privilege is granted.
You will deploy in development mode, grant the required privilege as a consumer and watch the pool and service start. You will create the service function and call it from SQL on sample data and check the results. You will read the logs, and test what happens when the service is suspended or the endpoint is called by a role without access.
You will practise cost control by suspending the pool and confirming that the application handles the stopped state with a clear message.
You will finish by cleaning up the service, the pool and the images.
By the end of this lab you will be able to build, deploy and secure a containerised service in a Native App.
The Snowflake CLI is the main tool for developing Native Apps, and a good workflow saves time and prevents mistakes. In this lesson you will study Snowflake CLI development workflows.
You will begin with the project definition. You will see how the snowflake.yml file describes the application package, the files to upload and the name of the application, and how it can use templating and variables to adapt to different environments. You will learn the structure of the project and the purpose of each entry.
Next you will learn the main commands. You will use the commands to initialise a project, to deploy it, which uploads files and creates or updates the package, to run the application, which creates or upgrades the application object, to open it, to view the status and to drop it. You will see how a single command can run the whole cycle for rapid iteration.
You will then look at working with several environments. You will set up connections for development and test accounts, use different configurations for each and avoid hard-coded names. You will learn how to run the same project with different parameters.
You will consider how to include the workflow in version control and automation. You will write a short script, or a pipeline definition, that deploys the application on each change and runs basic checks, keeping credentials in a secure store and not in the repository.
You will practise the whole cycle with a small change and measure how quickly you can see the result.
By the end of this lesson you will be able to run an efficient, repeatable development workflow with the CLI.
Testing an application locally, before anyone else sees it, is where most defects should be found. In this lesson you will study local application testing and debug modes.
You will begin with development mode. When you create an application from a stage and not from a registered version, it runs in debug mode, which allows you to see more of its internals. You will learn what that means, such as access to objects that are normally hidden and the ability to change files and refresh without making a new version. You will see why this is for the provider's own development and testing only.
Next you will see how to use it. You will deploy a change, run the procedures and look at the objects inside the application, query the internal tables to check the state and look at the logs. You will see the difference between what you see in debug mode and what a consumer sees, and so you will learn to test as a consumer too, by using a separate role with only the granted application roles.
You will then design your tests. You will create a set of repeatable tests for the setup script, the procedures, the functions and the permissions, including negative tests for access that should fail. You will keep test data separate and write the tests as scripts that you can run after each change.
You will learn how to test installation and upgrade, by creating an application from an earlier version and upgrading it, and how to test in an account that is separate from your development account.
You will practise on a sample application with deliberate defects.
By the end of this lesson you will be able to test an app effectively in debug mode and as a consumer.
When something goes wrong in an application that runs in someone else's account, logs are often the only way to understand it. In this lesson you will configure event tables and application logging.
You will begin with the concept. An event table is a special table in the consumer's account that collects log messages, traces and other events from the objects that run in it, including the application. The account has one active event table, and the consumer controls it. You will see how the application writes to it automatically when you use the logging functions.
Next you will set up the configuration. You will learn how the manifest sets the default log level for the application, and how the level can be changed at run time. You will write log messages from SQL procedures, using the system functions, and from Python, using the standard logging module, with levels such as debug, info, warning and error.
You will then query the event table. You will filter by the application, the level and the time, and read the messages together with their attributes. You will practise reading logs to follow what a procedure did.
You will think about what to log and what not to log. You should record the steps, the timing and the errors, and avoid sensitive data, credentials and personal information. You will consider the volume, since too much logging has a cost.
You will explain how a provider can obtain the logs only when the consumer agrees, which is covered in the next lesson.
You will add logging to a sample application and check the results.
By the end of this lesson you will be able to log from applications and read the results safely.
Logs tell you what happened, while traces and telemetry tell you how the application behaves over time. The provider also needs a controlled way to see what is happening in consumer accounts. In this lesson you will study tracing, telemetry and provider event sharing.
You will begin with tracing. You will learn that the application can emit traces, which are records of the steps in an operation and how long each one took, and that the manifest and the application's settings control the trace level. You will add trace events and attributes in a procedure and read them in the event table, so that you can see where time is spent.
Next you will look at telemetry. You will see what kinds of data the platform can collect from the application, such as logs, traces and metrics, and how it is limited by the levels that have been set. You will understand that the consumer's account remains the owner of its event table.
You will then learn about provider event sharing. A provider can ask to receive some of the events from consumer accounts, to help with support and monitoring, and the consumer must agree. You will see how the provider defines which events it wants, how the consumer approves the sharing and how the provider receives the events in its own account, to be queried and analysed. You will discuss why this is designed to protect consumer privacy and why the provider should ask only for what is needed.
You will plan a monitoring approach that uses shared events to detect errors and slow operations.
By the end of this lesson you will be able to explain and configure tracing and the controlled sharing of events.
Some of the most frustrating problems occur at installation and at runtime in an account that you cannot see. A systematic approach is the way to deal with them. In this lesson you will troubleshoot installation and runtime errors.
You will begin with installation errors. These include a failing setup script, a missing or invalid manifest entry, a privilege that has not been granted, an unsupported feature in the consumer's region or edition, a name that conflicts with an existing object and a reference with the wrong type. You will see the error text that each produces, and learn to find the failing statement.
Next you will study runtime errors. These include a procedure that cannot reach an object because of access rights, a reference that has not been set, a data shape that differs from what the code expects, a timeout or resource problem, an external call that has not been approved and a service that is not running. You will reproduce each in a test application.
You will use a method. First, reproduce the problem in your own account if possible. Second, read the exact message and find where it comes from. Third, check the privileges, references and configuration. Fourth, check the logs and events. Fifth, make one change at a time and test again.
You will learn how to support a consumer, by asking them for specific, non-sensitive information such as the version, the error message and the time, and by giving clear steps to check their settings.
You will build a troubleshooting guide and use it on three faulty examples.
By the end of this lesson you will be able to diagnose and resolve typical installation and runtime failures.
This lab combines the skills of development and testing. You will install, test and troubleshoot a Native App in development mode, with logging turned on and a set of deliberate defects to diagnose.
You will begin with a sample application that has an event table configured, a manifest with a log level and a few procedures that write messages. You will deploy it with the CLI and verify that it installs. You will create a consumer test role and grant it the application role.
Next you will test the normal operation. You will call the procedures, check the results and then read the log messages and traces in the event table, filtering by the application and the level. You will confirm that the messages show the steps of each procedure and that there is no sensitive data in them.
You will then introduce defects, one at a time. In the first, a grant is missing, so that the consumer role cannot call a procedure. In the second, the reference is not set. In the third, the setup script has a syntax error. In the fourth, a column name is wrong. For each, you will observe the symptom, find the cause using the error message and the logs, fix it and redeploy.
You will also run an upgrade test by creating a second version of the app and checking that the state is kept and the new code is used.
You will record your steps in a troubleshooting log and turn it into a checklist.
You will remove the test objects.
By the end of this lab you will be able to install, test and troubleshoot an app with confidence.
This course contains the use of artificial intelligence.
Are you preparing for the SnowPro Specialty: Native Apps (NAS-C02) Certification exam? Do you want to develop practical expertise in building, securing, deploying, and managing applications within the Snowflake AI Data Cloud? This comprehensive course combines structured certification preparation with real-world Snowflake Native Application development, helping you build the technical knowledge and practical skills needed to pursue your certification goals.
The course is structured around the four major NAS-C02 exam domains: Design, Build, Deploy, and Manage Snowflake Native Applications. Through detailed lectures, practical demonstrations, hands-on exercises, scenario-based learning, and practice examinations, you will develop a strong understanding of the entire Snowflake Native App lifecycle.
Begin by exploring the Snowflake Native App Framework, provider and consumer architectures, application packages, secure data sharing, and application distribution. Learn how to translate business requirements into scalable, secure, and maintainable Snowflake application architectures.
Dive into Snowflake Native App development using SQL, Python, Snowpark, YAML manifest files, application setup scripts, versioned schemas, stored procedures, user-defined functions (UDFs), and database objects. Discover how to build interactive data applications using Streamlit in Snowflake and integrate containerized workloads using Snowpark Container Services (SPCS).
Security is a critical component of modern data applications. Explore Snowflake security, role-based access control (RBAC), application roles, object references, privilege management, consumer approvals, external access integrations, and secure application development practices. Understand how to protect sensitive information while delivering powerful data-driven applications.
You will also learn how to package, publish, and distribute applications through the Snowflake Marketplace, including private listings, public listings, application monetization, automated security scanning, and consumer installation workflows.
Develop practical expertise in application versioning, release channels, release directives, patch management, application upgrades, observability, event tables, telemetry, logging, debugging, and production troubleshooting.
What makes this course different?
Comprehensive coverage of the four SnowPro NAS-C02 certification domains.
15 structured sections containing 90 technical lectures.
12 practical Snowflake Native App hands-on labs.
A real-world Native App development capstone project.
Four planned full-length mock examinations with 220 original practice questions.
Scenario-based learning and certification-focused technical explanations.
Practical examples using Snowflake CLI, SQL, Snowpark, Streamlit, and container services.
Throughout the course, you will connect certification concepts with realistic enterprise challenges, including cloud application development, data engineering, data governance, cloud security, application lifecycle management, and software deployment.
This course is designed for Snowflake developers, data engineers, software engineers, cloud architects, solution architects, data architects, platform engineers, DevOps professionals, technical consultants, and anyone pursuing the SnowPro Specialty: Native Apps certification.
Whether you are expanding your existing Snowflake expertise, transitioning into cloud data engineering, developing commercial data applications, or advancing your career in cloud computing and enterprise application development, this course provides a structured learning pathway.
By the end of this course, you will understand how to design secure architectures, develop functional Native Apps, implement application security, manage Marketplace deployments, and maintain applications throughout their production lifecycle. You will also be better equipped to approach NAS-C02 certification exam questions with confidence.
Enroll today and take the next step toward developing your expertise in Snowflake Native Apps, Snowflake certification preparation, cloud data platforms, and enterprise data application development.
Disclaimer: This is an independent certification preparation course and is not affiliated with, sponsored by, or endorsed by Snowflake Inc. Certification examination fees are not included, and passing the examination is not guaranteed.