top of page

AmberESG for Snowflake Documentation
Version 2.0:  13 June 2024

AmberESG for Snowflake


Welcome to AmberESG for Snowflake, an innovative AI-powered tool designed to enrich your content creation for Environmental, Social, and Governance (ESG) topics directly within your Snowflake environment. Leveraging advanced AI algorithms and tailored to meet the unique needs of ESG initiatives, AmberESG stands as a beacon for organizations aiming to enhance their ESG content strategy.


Key Features

  • Insights from Public Sources: Enhance your understanding of ESG criteria and stay ahead of industry trends by accessing insights and data from public sources. AmberESG makes it easy to learn about vital ESG-related information tailored to specific categories, regions, and contexts.

  • AI-Powered Learning: Utilize the power of AI to not only generate content but also continuously learn from the vast array of ESG-related information available publicly. AmberESG adapts and evolves, offering ever-improving suggestions and insights.

  • Tailored Content Generation: Create compelling and relevant content for your ESG initiatives with inputs like category, region, platform, intent, style, and length. AmberESG’s AI algorithms deliver content that aligns perfectly with your preferences and requirements.


Getting Started


To start using AMBERESG for Snowflake, open up a SQL worksheet and follow these steps:


Initial Setup


1.    Assign Required Role:
       USE ROLE ACCOUNTADMIN;


2.    Create Database and Schema:
       CREATE DATABASE AMBERESG_CONFIG;
       CREATE SCHEMA AMBERESG_CONFIG.INIT_SCHEMA;


3.    Set Active Database and Schema:
       USE DATABASE AMBERESG_CONFIG;
       USE SCHEMA INIT_SCHEMA;


4.    Grant Necessary Permissions:
       GRANT CREATE NETWORK RULE, CREATE SECRET, USAGE ON SCHEMA      AMBERESG_CONFIG.INIT_SCHEMA TO ROLE ACCOUNTADMIN;


Configuration
1.    Network Rule and Secret Creation:
       CREATE OR REPLACE NETWORK RULE AMBERESG_NETWORK_RULE
       MODE = EGRESS
       TYPE = HOST_PORT
       VALUE_LIST = ('13.233.247.11:3000');

       CREATE OR REPLACE SECRET AMBERESG_API_KEY
       TYPE = GENERIC_STRING
       SECRET_STRING = '';
       SECRET_STRING value will be kept empty


2.    External Access Integration:
       CREATE OR REPLACE EXTERNAL ACCESS INTEGRATION AMBERESG_EXT_INT
       ALLOWED_NETWORK_RULES = (AMBERESG_NETWORK_RULE)
       ALLOWED_AUTHENTICATION_SECRETS = (AMBERESG_API_KEY)
       ENABLED = TRUE;


3.    Grant Access to Application:
       GRANT USAGE ON DATABASE AMBERESG_CONFIG TO APPLICATION AMBERESG;
       GRANT USAGE ON SCHEMA AMBERESG_CONFIG.INIT_SCHEMA TO APPLICATION AMBERESG;
       GRANT USAGE ON INTEGRATION AMBERESG_EXT_INT TO APPLICATION AMBERESG;
       GRANT READ ON SECRET AMBERESG_CONFIG.INIT_SCHEMA.AMBERESG_API_KEY TO APPLICATION AMBERESG;


4.    Initialize Application:
       CALL AMBERESG.app_functions.init_app(PARSE_JSON('{
       "secret_name": "AMBERESG_CONFIG.INIT_SCHEMA.AMBERESG_API_KEY",
       "external_access_integration_name": "AMBERESG_EXT_INT",

       }'));


     Result:
     AMBERESG is initialized successfully and ready to use.


Debugging Guide


When encountering issues during the setup or operation of AMBERESG for Snowflake, follow these steps to diagnose and resolve common problems:

 

1. Role Permissions: Ensure the ACCOUNTADMIN role is assigned to the user performing the setup. This role is necessary for creating databases, schemas, network rules, and secrets.

​       USE ROLE ACCOUNTADMIN;

 

2. Verify Configuration Source: Ensure that the correct Database AMBERESG_CONFIG and Schema INIT_SCHEMA is selected. If a custom database and schema is opted, ensure the accurate selection of the intended database and schema for the application configuration settings throughout the setup process.

       USE DATABASE AMBERESG_CONFIG;
       USE SCHEMA INIT_SCHEMA;


3.    Application Permissions: Verify that the application AMBERESG has been granted the necessary permissions to access the database, schema, integration, and secrets. These permissions are crucial for the application’s ability to interact with Snowflake resources.
       GRANT USAGE ON DATABASE AMBERESG_CONFIG TO APPLICATION AMBERESG;
       GRANT USAGE ON SCHEMA AMBERESG_CONFIG.INIT_SCHEMA TO APPLICATION AMBERESG;
       GRANT USAGE ON INTEGRATION AMBERESG_EXT_INT TO APPLICATION AMBERESG;
       GRANT READ ON SECRET AMBERESG_CONFIG.INIT_SCHEMA.AMBERESG_API_KEY TO APPLICATION AMBERESG;


4.    Check Network Configuration: Confirm that the network rule AMBERESG_NETWORK_RULE accurately reflects the required egress settings for accessing api.openai.com. Incorrect network configurations can prevent AMBERESG from communicating with external services.
       CREATE OR REPLACE NETWORK RULE AMBERESG_NETWORK_RULE
       MODE = EGRESS
       TYPE = HOST_PORT
       VALUE_LIST = (‘13.233.247.11:3000’);


5.    Application Initialization Parameters: Check the initialization parameters provided to the AMBERESG_CONFIG.INIT_SCHEMA.INIT_APP procedure. Ensure that the secret_name and external_access_integration_name accurately reflect the created resources.
       CALL AMBERESG.app_functions.init_app(PARSE_JSON('{
        "secret_name": "AMBERESG_CONFIG.INIT_SCHEMA.AMBERESG_API_KEY",
        "external_access_integration_name": "AMBERESG_EXT_INT",

        }'));


For further assistance with setting up AMBERESG, consult the documentation or reach out to our support team.


Future Plans


AmberFlux is constantly working on enhancing AMBERESG for Snowflake. Moving forward, the application’s functionalities will be upgraded in the following ways:

  1. Interact with your files: Analyse your ESG related documents directly from Snowflake to receive personalized AI insights tailored to your individual data.

  2. Model Options: Additional Models using Snowflake Cortex like Llama2, Claude-3 and GPT4 will be integrated to offer customers the option to choose the model of their choice. All the models will be fine-tuned on our dataset to ensure quality assistance.

bottom of page