This repository provides code for exporting CSV files from a Snowflake schema and load the exported CSV files into another Snowflake account.
- Snowflake accounts (to export from and to import to)
- Fork the Repository:
- Click the "Fork" button on the top right corner of this repository.
- Clone the repository:
git clone https://github.com/YOUR_USERNAME/Export-CSV-from-Snowflake.git
Note: Replace YOUR_USERNAME with your GitHub username.
- Navigate to the directory:
cd Export-CSV-from-Snowflake
- Create the target database and schema in the target Snowflake:
Create database <db-name>
Create schema <schema-name>
- 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>
- Run Streamlit App
streamlit run app.py
Click on "Export Snowflake CSV Data"