Skip to content

SuccessMaharjan/Export-CSV-from-Snowflake

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Export CSV from Snowflake

This repository provides code for exporting CSV files from a Snowflake schema and load the exported CSV files into another Snowflake account.

Prerequisites

  • Snowflake accounts (to export from and to import to)

Usage

  1. Fork the Repository:
  • Click the "Fork" button on the top right corner of this repository.
  1. Clone the repository:
git clone https://github.com/YOUR_USERNAME/Export-CSV-from-Snowflake.git

Note: Replace YOUR_USERNAME with your GitHub username.

  1. Navigate to the directory:
cd Export-CSV-from-Snowflake
  1. Create the target database and schema in the target Snowflake:
Create database <db-name>
Create schema <schema-name>
  1. Create .env file:
SNOWFLAKE_USER=<username>
SNOWFLAKE_PASSWORD=<password>
SNOWFLAKE_ACCOUNT=<account-name>
SNOWFLAKE_WAREHOUSE=<warehouse>
SNOWFLAKE_ROLE=<role>


SNOWFLAKE_DATABASE=<db-name-for-source-tables>
SNOWFLAKE_SCHEMA=<schema-name-for-source-tables>

CSV_FILE_PATH=<your-path>/Export-CSV-from-Snowflake/extracted_csv
DBT_SEEDS_FOLDER=<your-path>/Export-CSV-from-Snowflake/loadcsv/seeds
CSV_FILES_DIRECTORY=<your-path>/Export-CSV-from-Snowflake/extracted_csv

TARGET_SNOWFLAKE_USER=<username>
TARGET_SNOWFLAKE_PASSWORD=<password>
TARGET_SNOWFLAKE_ACCOUNT=<account-name>
TARGET_SNOWFLAKE_WAREHOUSE=<warehouse>
TARGET_SNOWFLAKE_ROLE=<role>

TARGET_SNOWFLAKE_DATABASE=<db-name-for-target-tables>
TARGET_SNOWFLAKE_SCHEMA=<schema-name-for-target-tables>
  1. Run Streamlit App
streamlit run app.py

Click on "Export Snowflake CSV Data"

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published