In this demo you'll learn how to expand the capabilities of your Snowflake data pipelines by easily extending them with external services and functionality.
To know more about how different companies are using External Function , you can refer this link --
https://www.vebuso.com/2021/04/bringi...
Prerequisite:
Configuring a Snowflake Storage Integration to Access Amazon S3
• Configuring a Snowflake Storage Integratio...
Know about API Gateway in-depth--
What is a Proxy?
• What is a Proxy?
Concept of Reverse Proxy & API Gateway
• Concept of Reverse Proxy & API Gateway
Introduction to API Gateway with in-depth intuition
• Introduction to API Gateway with in-depth ...
Creating a POST Api | AWS API Gateway Passing Data to AWS Lambda
• Creating a POST Api | AWS API Gateway Pass...
Working With Query Parameters In API | API Gateway
• Working With Query Parameters In API | API...
Create a REST API on AWS | Step by Step Tutorial
• Create a REST API on AWS | Step by Step Tu...
Usage Plan & API key - Amazon API Gateway
• Usage Plan & API key - Amazon API Gateway
Snowflake External Function Creation Steps:
-----------------------------------------------------------------------
Step 1: Creating Lambda Function
Step 2: Create Rest API
Step 3: Snowflake IAM Role
Demo 1:
--------------
import json
def lambda_handler(event, context):
TODO implement
print(event)
translated=[]
for row in event['data']:
data=row[1]
message="Hello {}".format(data)
translated.append([row[0],message])
return {
'statusCode': 200,
'data': translated
}
Demo 2:
---------------
import json
def lambda_handler(event, context):
TODO implement
print(event)
translated=[]
for row in event['data']:
name=row[1]
department=row[2]
message="{} works in {} Department".format(name, department)
translated.append([row[0],message])
return {
'statusCode': 200,
'data': translated
}
Snowflake Code:
---------------------------
--drop database if required
drop database if exists ramu;
--Create Database
create database if not exists ramu;
use ramu;
CREATE OR REPLACE api integration hellotesting
api_provider = aws_api_gateway
api_aws_role_arn = '{Put your AWS Role here}'
enabled = true
api_allowed_prefixes = ({API Invoke URL});
DESCRIBE integration hellotesting;
create or replace external function helloworld
(Name varchar,Department varchar)
returns variant
api_integration = hellotesting
as {API Invoke URL};
select Name,DEPARTMENT,helloworld(Name,DEPARTMENT) from "DEMO_DB"."PUBLIC"."EMPLOYEE";
Check this playlist for more AWS Projects in Big Data domain:
• Demystifying Data Engineering with Cloud C...
In questa pagina del sito puoi guardare il video online External Functions Tutorial | Snowflake della durata di ore minuti seconda in buona qualità , che l'utente ha caricato Knowledge Amplifier 30 ottobre 2021, condividi il link con amici e conoscenti, su youtube questo video è già stato visto 5,649 volte e gli è piaciuto 74 spettatori. Buona visione!