RCG Snowflake System API - Implementation Template

(0 reviews)

Prerequisites

Each implementation template relies on services or data in order to function.

Please review the use cases described on the MuleSoft Accelerator for Retail solution pages for more information about dependencies on other APIs and services.

The following example shows how to create Loyalty and Subscription records in a Snowflake instance.

Prerequisite set up

  1. Create a Snowflake instance (account). Go to the Classic Console to create a database, schema, and load a table.

    Snowflake Classic Console screenshot

  2. To create a database, click Database > Create a new database.

    Create a database in Snowflake screenshot

  3. Enter RETAIL_DB as the name and click Finish.

    Name the new database in Snowflake screenshot

  4. To create a schema, click RETAIL_DB > Schemas > Create a new schema.

    Create a schema in Snowflake screenshot

  5. Enter CUSTOMER as the schema name and click Finish.

    Name a new schema in Snowflake screenshot

  6. To create a table, click Tables > Create a table > Schema Name > Add Column names > Finish.

    Create a table in Snowflake screenshot

    Add columns to a table in Snowflake screenshot

  7. Click the table name and load any desired mock data by clicking Load Table:

    Load data into a table in Snowflake screenshot

    a. In the Warehouse tab, select the Warehouse and click Next.

    Select the warehouse for loading files in Snowflake screenshot

    b. In the Source Files tab, select Load files from your computer, click Select Files, select the files to upload and click Next.

    Load local source files into Snowflake screenshot

    Selected file information for loading into Snowflake screenshot

    c. In the Load Options tab, select the location from which to load files, such as Continue loading valid data from the file and click Next.

    Continue loading valid data option from the file in Snowflake screenshot

    d. View the load results and click OK.

    View file loaded results rows parsed and loaded into Snowflake screenshot

  8. To view the loaded data, run a SQL query from Worksheet:

    Run a query on the new table in a Snowflake worksheet screenshot

Note: Tables can also be created by running SQL queries in src/main/resources/snowflake_queries.txt.


Reviews

TypeTemplate
OrganizationMuleSoft
Published by
MuleSoft Solutions
Published onApr 26, 2022
Asset overview

Asset versions for 2.5.x

Asset versions
VersionActions
2.5.0