Get your CloudLink connection up and running in just 15 minutes with our automated SQL script. This is the recommended approach for most organizations.

Why Choose Script Setup?

Speed & Reliability

15-minute setup with automated configuration and built-in best practices

Optimized Performance

Pre-configured settings for warehouse sizing, scaling, and security

Reduced Errors

Automated configuration eliminates common manual setup mistakes

Future-Proof

Latest best practices included with regular script updates

Prerequisites

Before running the script, ensure you have:
1

Required Access

Snowflake Admin

ACCOUNTADMIN role access in SnowflakeRequired for creating users, roles, and warehouses

Network Access

IP Whitelist configured for Elementum accessSee IP addresses in CloudLink Overview
2

Data Requirements

Table Preparation

Unique identifiers on all tables to be integratedEach table must have a primary key or unique key column

Access Policy

Organization domain will be automatically whitelistedFormat: [your-org].elementum.io

What the Script Does

The automated script performs these essential configuration steps:
1

Create Elementum Role

Creates a dedicated ELEMENTUM role with minimal required permissions
2

Create Service User

Sets up ELEMENTUM user account with secure authentication
3

Configure Permissions

Grants only necessary permissions following principle of least privilege

Step-by-Step Setup

1

Download the Setup Script

Get the latest script from Elementum:
  1. Navigate to Settings > Cloud Links in Elementum
  2. Click Add Connection
  3. Select “Snowflake”
  4. Click “Download Setup Script”
2

Prepare Your Password

Set a strong password for the Elementum service account:
# Must meet Snowflake password requirements:
# - At least 8 characters
# - Mix of uppercase, lowercase, numbers
# - At least one special character
# - Cannot contain username or common words

# Example strong password format:
ElementumData2024!SecurePass
Important: Save this password securely - you’ll need it to configure the connection in Elementum.
3

Run the Core Script

Execute the script in Snowflake:
  1. Open Snowflake web interface
  2. Switch to ACCOUNTADMIN role
  3. Open a new worksheet
  4. Paste the modified script
  5. Execute all statements
-- The script includes these main sections:

-- 1. Variable Setup
set USER_PASSWORD='YourSecurePassword123!';

-- 2. Role Creation
CREATE ROLE IF NOT EXISTS ELEMENTUM;
GRANT ROLE ELEMENTUM TO ROLE SYSADMIN;

-- 3. User Creation
CREATE USER IF NOT EXISTS ELEMENTUM
MUST_CHANGE_PASSWORD=false
PASSWORD=$USER_PASSWORD;

-- 4. Warehouse Creation
CREATE WAREHOUSE IF NOT EXISTS ELEMENTUM
WITH WAREHOUSE_SIZE='MEDIUM',
MIN_CLUSTER_COUNT = 1,
MAX_CLUSTER_COUNT = 10,
AUTO_SUSPEND=60;

-- 5. Database and Schema Setup
CREATE DATABASE IF NOT EXISTS ELEMENTUM;
CREATE SCHEMA IF NOT EXISTS ELEMENTUM_PLATFORM;
CREATE SCHEMA IF NOT EXISTS PUBLIC;

-- 6. Cortex AI Access
GRANT DATABASE ROLE SNOWFLAKE.CORTEX_USER TO ROLE ELEMENTUM;
4

Configure Data Access

Grant permissions for your specific tables:The script includes template commands that you need to customize for your data:
-- Uncomment and customize these lines for each table:
USE ROLE SYSADMIN;
USE DATABASE "YOUR_DATABASE_NAME";
GRANT SELECT ON TABLE "YOUR_TABLE_NAME" TO ROLE ELEMENTUM;

-- For tables that need write access:
GRANT INSERT, UPDATE, DELETE, SELECT ON TABLE "YOUR_TABLE_NAME" TO ROLE ELEMENTUM;

-- Example for a customer table:
USE DATABASE "SALES_DB";
GRANT SELECT ON TABLE "CUSTOMERS" TO ROLE ELEMENTUM;
GRANT SELECT ON TABLE "ORDERS" TO ROLE ELEMENTUM;
For reference data and reporting tables:
-- Grant SELECT permission only
GRANT SELECT ON TABLE database.schema.table_name TO ROLE ELEMENTUM;
5

Verify Configuration

Test the setup before proceeding:
-- Test that the service account can log in
-- (Run this in a new worksheet or session)
USE ROLE ELEMENTUM;
USE WAREHOUSE ELEMENTUM;
USE DATABASE ELEMENTUM;

-- Should execute without errors
SELECT CURRENT_ROLE(), CURRENT_WAREHOUSE(), CURRENT_DATABASE();

Configuration Summary

After successful script execution, you’ll have these credentials for Elementum configuration:

Connection Details

Username: ELEMENTUM Password: [your chosen password] Role: ELEMENTUM Warehouse: ELEMENTUM Database: ELEMENTUM

Next Steps

Use these credentials in the Elementum Configuration Guide to complete your setup

Performance Optimization

The script creates an optimized warehouse configuration, but you may want to adjust based on your specific needs:
Default Configuration:
  • Size: Medium
  • Min Clusters: 1
  • Max Clusters: 10
  • Auto-Suspend: 60 seconds
When to Adjust:
  • Increase size for large data volumes or complex queries
  • Decrease size for development/testing environments
  • Adjust cluster limits based on concurrency needs
Detailed Warehouse Optimization Guide →

Troubleshooting

Security Considerations

The script implements security best practices:

Principle of Least Privilege

Minimal Permissions: Only grants necessary access rights Role Isolation: Dedicated role prevents permission creep Audit Trail: All access logged and monitored

Secure Configuration

Strong Authentication: Password requirements enforced Network Security: IP whitelisting for access control Encrypted Connections: TLS encryption for all communication

Next Steps

With your Snowflake configuration complete, proceed to:
1

Configure Elementum Connection

Complete the setup in Elementum using your new credentials
2

Optimize Performance

Review table types and warehouse configuration for optimal performance
3

Implement Best Practices

Follow our data best practices for long-term success

Getting Help


This guide is updated regularly with the latest script features and best practices. Last updated: