Dataset Viewer
Auto-converted to Parquet
conversations
listlengths
2
2
[ { "from": "human", "value": "Write an ETL pipeline in Python to load `data_0.json` into Snowflake. The pipeline should:\n- Load the `JSON` file\n- Automatically detect the primary key\n- Clean whitespace and nulls\n- Normalize data\n- Load the cleaned data into a Snowflake table named `etl_table_0`" }, { "from": "gpt", "value": "```python\nimport pandas as pd\n\n# Load the file\ndf = pd.read_csv(\"data_0.csv\")\n\n# Assume the first column is the primary key\nprimary_key = df.columns[0]\n\n# Drop rows with null PKs\ndf = df.dropna(subset=[primary_key])\n\n# Clean whitespace and lower strings\nfor col in df.select_dtypes(include=\"object\"):\n df[col] = df[col].str.strip().str.lower()\n\n# Connect to Snowflake\nimport snowflake.connector\nconn = snowflake.connector.connect(\n user='USER', password='PASSWORD', account='ACCOUNT'\n)\ncur = conn.cursor()\n\n# Create the table\ncur.execute(\"CREATE OR REPLACE TABLE etl_table_0 (col1 VARCHAR, col2 VARCHAR, col3 VARCHAR, col4 VARCHAR)\")\n\n# Insert the data\nfor _, row in df.iterrows():\n cur.execute(\n \"INSERT INTO etl_table_0 (col1, col2, col3, col4) VALUES (%s, %s, %s, %s)\",\n tuple(row)\n )\n\nconn.commit()\nconn.close()\n```" } ]
[ { "from": "human", "value": "Write an ETL pipeline in Python to load `data_1.json` into Snowflake. The pipeline should:\n- Load the `JSON` file\n- Automatically detect the primary key\n- Clean whitespace and nulls\n- Normalize data\n- Load the cleaned data into a Snowflake table named `etl_table_1`" }, { "from": "gpt", "value": "```python\nimport pandas as pd\n\n# Load the file\ndf = pd.read_csv(\"data_1.csv\")\n\n# Assume the first column is the primary key\nprimary_key = df.columns[0]\n\n# Drop rows with null PKs\ndf = df.dropna(subset=[primary_key])\n\n# Clean whitespace and lower strings\nfor col in df.select_dtypes(include=\"object\"):\n df[col] = df[col].str.strip().str.lower()\n\n# Connect to Snowflake\nimport snowflake.connector\nconn = snowflake.connector.connect(\n user='USER', password='PASSWORD', account='ACCOUNT'\n)\ncur = conn.cursor()\n\n# Create the table\ncur.execute(\"CREATE OR REPLACE TABLE etl_table_1 (col1 VARCHAR, col2 VARCHAR, col3 VARCHAR, col4 VARCHAR)\")\n\n# Insert the data\nfor _, row in df.iterrows():\n cur.execute(\n \"INSERT INTO etl_table_1 (col1, col2, col3, col4) VALUES (%s, %s, %s, %s)\",\n tuple(row)\n )\n\nconn.commit()\nconn.close()\n```" } ]
[ { "from": "human", "value": "Write an ETL pipeline in Python to load `data_2.json` into Snowflake. The pipeline should:\n- Load the `JSON` file\n- Automatically detect the primary key\n- Clean whitespace and nulls\n- Normalize data\n- Load the cleaned data into a Snowflake table named `etl_table_2`" }, { "from": "gpt", "value": "```python\nimport pandas as pd\n\n# Load the file\ndf = pd.read_csv(\"data_2.csv\")\n\n# Assume the first column is the primary key\nprimary_key = df.columns[0]\n\n# Drop rows with null PKs\ndf = df.dropna(subset=[primary_key])\n\n# Clean whitespace and lower strings\nfor col in df.select_dtypes(include=\"object\"):\n df[col] = df[col].str.strip().str.lower()\n\n# Connect to Snowflake\nimport snowflake.connector\nconn = snowflake.connector.connect(\n user='USER', password='PASSWORD', account='ACCOUNT'\n)\ncur = conn.cursor()\n\n# Create the table\ncur.execute(\"CREATE OR REPLACE TABLE etl_table_2 (col1 VARCHAR, col2 VARCHAR, col3 VARCHAR, col4 VARCHAR)\")\n\n# Insert the data\nfor _, row in df.iterrows():\n cur.execute(\n \"INSERT INTO etl_table_2 (col1, col2, col3, col4) VALUES (%s, %s, %s, %s)\",\n tuple(row)\n )\n\nconn.commit()\nconn.close()\n```" } ]
[ { "from": "human", "value": "Write an ETL pipeline in Python to load `data_3.json` into Snowflake. The pipeline should:\n- Load the `JSON` file\n- Automatically detect the primary key\n- Clean whitespace and nulls\n- Normalize data\n- Load the cleaned data into a Snowflake table named `etl_table_3`" }, { "from": "gpt", "value": "```python\nimport pandas as pd\n\n# Load the file\ndf = pd.read_json(\"data_3.json\")\n\n# Assume the first column is the primary key\nprimary_key = df.columns[0]\n\n# Drop rows with null PKs\ndf = df.dropna(subset=[primary_key])\n\n# Clean whitespace and lower strings\nfor col in df.select_dtypes(include=\"object\"):\n df[col] = df[col].str.strip().str.lower()\n\n# Connect to Snowflake\nimport snowflake.connector\nconn = snowflake.connector.connect(\n user='USER', password='PASSWORD', account='ACCOUNT'\n)\ncur = conn.cursor()\n\n# Create the table\ncur.execute(\"CREATE OR REPLACE TABLE etl_table_3 (col1 VARCHAR, col2 VARCHAR, col3 VARCHAR, col4 VARCHAR)\")\n\n# Insert the data\nfor _, row in df.iterrows():\n cur.execute(\n \"INSERT INTO etl_table_3 (col1, col2, col3, col4) VALUES (%s, %s, %s, %s)\",\n tuple(row)\n )\n\nconn.commit()\nconn.close()\n```" } ]
[ { "from": "human", "value": "Write an ETL pipeline in Python to load `data_4.json` into Snowflake. The pipeline should:\n- Load the `JSON` file\n- Automatically detect the primary key\n- Clean whitespace and nulls\n- Normalize data\n- Load the cleaned data into a Snowflake table named `etl_table_4`" }, { "from": "gpt", "value": "```python\nimport pandas as pd\n\n# Load the file\ndf = pd.read_csv(\"data_4.csv\")\n\n# Assume the first column is the primary key\nprimary_key = df.columns[0]\n\n# Drop rows with null PKs\ndf = df.dropna(subset=[primary_key])\n\n# Clean whitespace and lower strings\nfor col in df.select_dtypes(include=\"object\"):\n df[col] = df[col].str.strip().str.lower()\n\n# Connect to Snowflake\nimport snowflake.connector\nconn = snowflake.connector.connect(\n user='USER', password='PASSWORD', account='ACCOUNT'\n)\ncur = conn.cursor()\n\n# Create the table\ncur.execute(\"CREATE OR REPLACE TABLE etl_table_4 (col1 VARCHAR, col2 VARCHAR, col3 VARCHAR, col4 VARCHAR)\")\n\n# Insert the data\nfor _, row in df.iterrows():\n cur.execute(\n \"INSERT INTO etl_table_4 (col1, col2, col3, col4) VALUES (%s, %s, %s, %s)\",\n tuple(row)\n )\n\nconn.commit()\nconn.close()\n```" } ]
[ { "from": "human", "value": "Write an ETL pipeline in Python to load `data_5.json` into Snowflake. The pipeline should:\n- Load the `JSON` file\n- Automatically detect the primary key\n- Clean whitespace and nulls\n- Normalize data\n- Load the cleaned data into a Snowflake table named `etl_table_5`" }, { "from": "gpt", "value": "```python\nimport pandas as pd\n\n# Load the file\ndf = pd.read_json(\"data_5.json\")\n\n# Assume the first column is the primary key\nprimary_key = df.columns[0]\n\n# Drop rows with null PKs\ndf = df.dropna(subset=[primary_key])\n\n# Clean whitespace and lower strings\nfor col in df.select_dtypes(include=\"object\"):\n df[col] = df[col].str.strip().str.lower()\n\n# Connect to Snowflake\nimport snowflake.connector\nconn = snowflake.connector.connect(\n user='USER', password='PASSWORD', account='ACCOUNT'\n)\ncur = conn.cursor()\n\n# Create the table\ncur.execute(\"CREATE OR REPLACE TABLE etl_table_5 (col1 VARCHAR, col2 VARCHAR, col3 VARCHAR, col4 VARCHAR)\")\n\n# Insert the data\nfor _, row in df.iterrows():\n cur.execute(\n \"INSERT INTO etl_table_5 (col1, col2, col3, col4) VALUES (%s, %s, %s, %s)\",\n tuple(row)\n )\n\nconn.commit()\nconn.close()\n```" } ]
[ { "from": "human", "value": "Write an ETL pipeline in Python to load `data_6.csv` into Snowflake. The pipeline should:\n- Load the `CSV` file\n- Automatically detect the primary key\n- Clean whitespace and nulls\n- Normalize data\n- Load the cleaned data into a Snowflake table named `etl_table_6`" }, { "from": "gpt", "value": "```python\nimport pandas as pd\n\n# Load the file\ndf = pd.read_json(\"data_6.json\")\n\n# Assume the first column is the primary key\nprimary_key = df.columns[0]\n\n# Drop rows with null PKs\ndf = df.dropna(subset=[primary_key])\n\n# Clean whitespace and lower strings\nfor col in df.select_dtypes(include=\"object\"):\n df[col] = df[col].str.strip().str.lower()\n\n# Connect to Snowflake\nimport snowflake.connector\nconn = snowflake.connector.connect(\n user='USER', password='PASSWORD', account='ACCOUNT'\n)\ncur = conn.cursor()\n\n# Create the table\ncur.execute(\"CREATE OR REPLACE TABLE etl_table_6 (col1 VARCHAR, col2 VARCHAR, col3 VARCHAR, col4 VARCHAR)\")\n\n# Insert the data\nfor _, row in df.iterrows():\n cur.execute(\n \"INSERT INTO etl_table_6 (col1, col2, col3, col4) VALUES (%s, %s, %s, %s)\",\n tuple(row)\n )\n\nconn.commit()\nconn.close()\n```" } ]
[ { "from": "human", "value": "Write an ETL pipeline in Python to load `data_7.json` into Snowflake. The pipeline should:\n- Load the `JSON` file\n- Automatically detect the primary key\n- Clean whitespace and nulls\n- Normalize data\n- Load the cleaned data into a Snowflake table named `etl_table_7`" }, { "from": "gpt", "value": "```python\nimport pandas as pd\n\n# Load the file\ndf = pd.read_csv(\"data_7.csv\")\n\n# Assume the first column is the primary key\nprimary_key = df.columns[0]\n\n# Drop rows with null PKs\ndf = df.dropna(subset=[primary_key])\n\n# Clean whitespace and lower strings\nfor col in df.select_dtypes(include=\"object\"):\n df[col] = df[col].str.strip().str.lower()\n\n# Connect to Snowflake\nimport snowflake.connector\nconn = snowflake.connector.connect(\n user='USER', password='PASSWORD', account='ACCOUNT'\n)\ncur = conn.cursor()\n\n# Create the table\ncur.execute(\"CREATE OR REPLACE TABLE etl_table_7 (col1 VARCHAR, col2 VARCHAR, col3 VARCHAR, col4 VARCHAR)\")\n\n# Insert the data\nfor _, row in df.iterrows():\n cur.execute(\n \"INSERT INTO etl_table_7 (col1, col2, col3, col4) VALUES (%s, %s, %s, %s)\",\n tuple(row)\n )\n\nconn.commit()\nconn.close()\n```" } ]
[ { "from": "human", "value": "Write an ETL pipeline in Python to load `data_8.json` into Snowflake. The pipeline should:\n- Load the `JSON` file\n- Automatically detect the primary key\n- Clean whitespace and nulls\n- Normalize data\n- Load the cleaned data into a Snowflake table named `etl_table_8`" }, { "from": "gpt", "value": "```python\nimport pandas as pd\n\n# Load the file\ndf = pd.read_csv(\"data_8.csv\")\n\n# Assume the first column is the primary key\nprimary_key = df.columns[0]\n\n# Drop rows with null PKs\ndf = df.dropna(subset=[primary_key])\n\n# Clean whitespace and lower strings\nfor col in df.select_dtypes(include=\"object\"):\n df[col] = df[col].str.strip().str.lower()\n\n# Connect to Snowflake\nimport snowflake.connector\nconn = snowflake.connector.connect(\n user='USER', password='PASSWORD', account='ACCOUNT'\n)\ncur = conn.cursor()\n\n# Create the table\ncur.execute(\"CREATE OR REPLACE TABLE etl_table_8 (col1 VARCHAR, col2 VARCHAR, col3 VARCHAR, col4 VARCHAR)\")\n\n# Insert the data\nfor _, row in df.iterrows():\n cur.execute(\n \"INSERT INTO etl_table_8 (col1, col2, col3, col4) VALUES (%s, %s, %s, %s)\",\n tuple(row)\n )\n\nconn.commit()\nconn.close()\n```" } ]
[ { "from": "human", "value": "Write an ETL pipeline in Python to load `data_9.csv` into Snowflake. The pipeline should:\n- Load the `CSV` file\n- Automatically detect the primary key\n- Clean whitespace and nulls\n- Normalize data\n- Load the cleaned data into a Snowflake table named `etl_table_9`" }, { "from": "gpt", "value": "```python\nimport pandas as pd\n\n# Load the file\ndf = pd.read_csv(\"data_9.csv\")\n\n# Assume the first column is the primary key\nprimary_key = df.columns[0]\n\n# Drop rows with null PKs\ndf = df.dropna(subset=[primary_key])\n\n# Clean whitespace and lower strings\nfor col in df.select_dtypes(include=\"object\"):\n df[col] = df[col].str.strip().str.lower()\n\n# Connect to Snowflake\nimport snowflake.connector\nconn = snowflake.connector.connect(\n user='USER', password='PASSWORD', account='ACCOUNT'\n)\ncur = conn.cursor()\n\n# Create the table\ncur.execute(\"CREATE OR REPLACE TABLE etl_table_9 (col1 VARCHAR, col2 VARCHAR, col3 VARCHAR, col4 VARCHAR)\")\n\n# Insert the data\nfor _, row in df.iterrows():\n cur.execute(\n \"INSERT INTO etl_table_9 (col1, col2, col3, col4) VALUES (%s, %s, %s, %s)\",\n tuple(row)\n )\n\nconn.commit()\nconn.close()\n```" } ]
[ { "from": "human", "value": "Write an ETL pipeline in Python to load `data_10.json` into Snowflake. The pipeline should:\n- Load the `JSON` file\n- Automatically detect the primary key\n- Clean whitespace and nulls\n- Normalize data\n- Load the cleaned data into a Snowflake table named `etl_table_10`" }, { "from": "gpt", "value": "```python\nimport pandas as pd\n\n# Load the file\ndf = pd.read_csv(\"data_10.csv\")\n\n# Assume the first column is the primary key\nprimary_key = df.columns[0]\n\n# Drop rows with null PKs\ndf = df.dropna(subset=[primary_key])\n\n# Clean whitespace and lower strings\nfor col in df.select_dtypes(include=\"object\"):\n df[col] = df[col].str.strip().str.lower()\n\n# Connect to Snowflake\nimport snowflake.connector\nconn = snowflake.connector.connect(\n user='USER', password='PASSWORD', account='ACCOUNT'\n)\ncur = conn.cursor()\n\n# Create the table\ncur.execute(\"CREATE OR REPLACE TABLE etl_table_10 (col1 VARCHAR, col2 VARCHAR, col3 VARCHAR, col4 VARCHAR)\")\n\n# Insert the data\nfor _, row in df.iterrows():\n cur.execute(\n \"INSERT INTO etl_table_10 (col1, col2, col3, col4) VALUES (%s, %s, %s, %s)\",\n tuple(row)\n )\n\nconn.commit()\nconn.close()\n```" } ]
[ { "from": "human", "value": "Write an ETL pipeline in Python to load `data_11.csv` into Snowflake. The pipeline should:\n- Load the `CSV` file\n- Automatically detect the primary key\n- Clean whitespace and nulls\n- Normalize data\n- Load the cleaned data into a Snowflake table named `etl_table_11`" }, { "from": "gpt", "value": "```python\nimport pandas as pd\n\n# Load the file\ndf = pd.read_csv(\"data_11.csv\")\n\n# Assume the first column is the primary key\nprimary_key = df.columns[0]\n\n# Drop rows with null PKs\ndf = df.dropna(subset=[primary_key])\n\n# Clean whitespace and lower strings\nfor col in df.select_dtypes(include=\"object\"):\n df[col] = df[col].str.strip().str.lower()\n\n# Connect to Snowflake\nimport snowflake.connector\nconn = snowflake.connector.connect(\n user='USER', password='PASSWORD', account='ACCOUNT'\n)\ncur = conn.cursor()\n\n# Create the table\ncur.execute(\"CREATE OR REPLACE TABLE etl_table_11 (col1 VARCHAR, col2 VARCHAR, col3 VARCHAR, col4 VARCHAR)\")\n\n# Insert the data\nfor _, row in df.iterrows():\n cur.execute(\n \"INSERT INTO etl_table_11 (col1, col2, col3, col4) VALUES (%s, %s, %s, %s)\",\n tuple(row)\n )\n\nconn.commit()\nconn.close()\n```" } ]
[ { "from": "human", "value": "Write an ETL pipeline in Python to load `data_12.csv` into Snowflake. The pipeline should:\n- Load the `CSV` file\n- Automatically detect the primary key\n- Clean whitespace and nulls\n- Normalize data\n- Load the cleaned data into a Snowflake table named `etl_table_12`" }, { "from": "gpt", "value": "```python\nimport pandas as pd\n\n# Load the file\ndf = pd.read_json(\"data_12.json\")\n\n# Assume the first column is the primary key\nprimary_key = df.columns[0]\n\n# Drop rows with null PKs\ndf = df.dropna(subset=[primary_key])\n\n# Clean whitespace and lower strings\nfor col in df.select_dtypes(include=\"object\"):\n df[col] = df[col].str.strip().str.lower()\n\n# Connect to Snowflake\nimport snowflake.connector\nconn = snowflake.connector.connect(\n user='USER', password='PASSWORD', account='ACCOUNT'\n)\ncur = conn.cursor()\n\n# Create the table\ncur.execute(\"CREATE OR REPLACE TABLE etl_table_12 (col1 VARCHAR, col2 VARCHAR, col3 VARCHAR, col4 VARCHAR)\")\n\n# Insert the data\nfor _, row in df.iterrows():\n cur.execute(\n \"INSERT INTO etl_table_12 (col1, col2, col3, col4) VALUES (%s, %s, %s, %s)\",\n tuple(row)\n )\n\nconn.commit()\nconn.close()\n```" } ]
[ { "from": "human", "value": "Write an ETL pipeline in Python to load `data_13.csv` into Snowflake. The pipeline should:\n- Load the `CSV` file\n- Automatically detect the primary key\n- Clean whitespace and nulls\n- Normalize data\n- Load the cleaned data into a Snowflake table named `etl_table_13`" }, { "from": "gpt", "value": "```python\nimport pandas as pd\n\n# Load the file\ndf = pd.read_csv(\"data_13.csv\")\n\n# Assume the first column is the primary key\nprimary_key = df.columns[0]\n\n# Drop rows with null PKs\ndf = df.dropna(subset=[primary_key])\n\n# Clean whitespace and lower strings\nfor col in df.select_dtypes(include=\"object\"):\n df[col] = df[col].str.strip().str.lower()\n\n# Connect to Snowflake\nimport snowflake.connector\nconn = snowflake.connector.connect(\n user='USER', password='PASSWORD', account='ACCOUNT'\n)\ncur = conn.cursor()\n\n# Create the table\ncur.execute(\"CREATE OR REPLACE TABLE etl_table_13 (col1 VARCHAR, col2 VARCHAR, col3 VARCHAR, col4 VARCHAR)\")\n\n# Insert the data\nfor _, row in df.iterrows():\n cur.execute(\n \"INSERT INTO etl_table_13 (col1, col2, col3, col4) VALUES (%s, %s, %s, %s)\",\n tuple(row)\n )\n\nconn.commit()\nconn.close()\n```" } ]
[ { "from": "human", "value": "Write an ETL pipeline in Python to load `data_14.json` into Snowflake. The pipeline should:\n- Load the `JSON` file\n- Automatically detect the primary key\n- Clean whitespace and nulls\n- Normalize data\n- Load the cleaned data into a Snowflake table named `etl_table_14`" }, { "from": "gpt", "value": "```python\nimport pandas as pd\n\n# Load the file\ndf = pd.read_csv(\"data_14.csv\")\n\n# Assume the first column is the primary key\nprimary_key = df.columns[0]\n\n# Drop rows with null PKs\ndf = df.dropna(subset=[primary_key])\n\n# Clean whitespace and lower strings\nfor col in df.select_dtypes(include=\"object\"):\n df[col] = df[col].str.strip().str.lower()\n\n# Connect to Snowflake\nimport snowflake.connector\nconn = snowflake.connector.connect(\n user='USER', password='PASSWORD', account='ACCOUNT'\n)\ncur = conn.cursor()\n\n# Create the table\ncur.execute(\"CREATE OR REPLACE TABLE etl_table_14 (col1 VARCHAR, col2 VARCHAR, col3 VARCHAR, col4 VARCHAR)\")\n\n# Insert the data\nfor _, row in df.iterrows():\n cur.execute(\n \"INSERT INTO etl_table_14 (col1, col2, col3, col4) VALUES (%s, %s, %s, %s)\",\n tuple(row)\n )\n\nconn.commit()\nconn.close()\n```" } ]
[ { "from": "human", "value": "Write an ETL pipeline in Python to load `data_15.csv` into Snowflake. The pipeline should:\n- Load the `CSV` file\n- Automatically detect the primary key\n- Clean whitespace and nulls\n- Normalize data\n- Load the cleaned data into a Snowflake table named `etl_table_15`" }, { "from": "gpt", "value": "```python\nimport pandas as pd\n\n# Load the file\ndf = pd.read_json(\"data_15.json\")\n\n# Assume the first column is the primary key\nprimary_key = df.columns[0]\n\n# Drop rows with null PKs\ndf = df.dropna(subset=[primary_key])\n\n# Clean whitespace and lower strings\nfor col in df.select_dtypes(include=\"object\"):\n df[col] = df[col].str.strip().str.lower()\n\n# Connect to Snowflake\nimport snowflake.connector\nconn = snowflake.connector.connect(\n user='USER', password='PASSWORD', account='ACCOUNT'\n)\ncur = conn.cursor()\n\n# Create the table\ncur.execute(\"CREATE OR REPLACE TABLE etl_table_15 (col1 VARCHAR, col2 VARCHAR, col3 VARCHAR, col4 VARCHAR)\")\n\n# Insert the data\nfor _, row in df.iterrows():\n cur.execute(\n \"INSERT INTO etl_table_15 (col1, col2, col3, col4) VALUES (%s, %s, %s, %s)\",\n tuple(row)\n )\n\nconn.commit()\nconn.close()\n```" } ]
[ { "from": "human", "value": "Write an ETL pipeline in Python to load `data_16.json` into Snowflake. The pipeline should:\n- Load the `JSON` file\n- Automatically detect the primary key\n- Clean whitespace and nulls\n- Normalize data\n- Load the cleaned data into a Snowflake table named `etl_table_16`" }, { "from": "gpt", "value": "```python\nimport pandas as pd\n\n# Load the file\ndf = pd.read_csv(\"data_16.csv\")\n\n# Assume the first column is the primary key\nprimary_key = df.columns[0]\n\n# Drop rows with null PKs\ndf = df.dropna(subset=[primary_key])\n\n# Clean whitespace and lower strings\nfor col in df.select_dtypes(include=\"object\"):\n df[col] = df[col].str.strip().str.lower()\n\n# Connect to Snowflake\nimport snowflake.connector\nconn = snowflake.connector.connect(\n user='USER', password='PASSWORD', account='ACCOUNT'\n)\ncur = conn.cursor()\n\n# Create the table\ncur.execute(\"CREATE OR REPLACE TABLE etl_table_16 (col1 VARCHAR, col2 VARCHAR, col3 VARCHAR, col4 VARCHAR)\")\n\n# Insert the data\nfor _, row in df.iterrows():\n cur.execute(\n \"INSERT INTO etl_table_16 (col1, col2, col3, col4) VALUES (%s, %s, %s, %s)\",\n tuple(row)\n )\n\nconn.commit()\nconn.close()\n```" } ]
[ { "from": "human", "value": "Write an ETL pipeline in Python to load `data_17.csv` into Snowflake. The pipeline should:\n- Load the `CSV` file\n- Automatically detect the primary key\n- Clean whitespace and nulls\n- Normalize data\n- Load the cleaned data into a Snowflake table named `etl_table_17`" }, { "from": "gpt", "value": "```python\nimport pandas as pd\n\n# Load the file\ndf = pd.read_json(\"data_17.json\")\n\n# Assume the first column is the primary key\nprimary_key = df.columns[0]\n\n# Drop rows with null PKs\ndf = df.dropna(subset=[primary_key])\n\n# Clean whitespace and lower strings\nfor col in df.select_dtypes(include=\"object\"):\n df[col] = df[col].str.strip().str.lower()\n\n# Connect to Snowflake\nimport snowflake.connector\nconn = snowflake.connector.connect(\n user='USER', password='PASSWORD', account='ACCOUNT'\n)\ncur = conn.cursor()\n\n# Create the table\ncur.execute(\"CREATE OR REPLACE TABLE etl_table_17 (col1 VARCHAR, col2 VARCHAR, col3 VARCHAR, col4 VARCHAR)\")\n\n# Insert the data\nfor _, row in df.iterrows():\n cur.execute(\n \"INSERT INTO etl_table_17 (col1, col2, col3, col4) VALUES (%s, %s, %s, %s)\",\n tuple(row)\n )\n\nconn.commit()\nconn.close()\n```" } ]
[ { "from": "human", "value": "Write an ETL pipeline in Python to load `data_18.json` into Snowflake. The pipeline should:\n- Load the `JSON` file\n- Automatically detect the primary key\n- Clean whitespace and nulls\n- Normalize data\n- Load the cleaned data into a Snowflake table named `etl_table_18`" }, { "from": "gpt", "value": "```python\nimport pandas as pd\n\n# Load the file\ndf = pd.read_json(\"data_18.json\")\n\n# Assume the first column is the primary key\nprimary_key = df.columns[0]\n\n# Drop rows with null PKs\ndf = df.dropna(subset=[primary_key])\n\n# Clean whitespace and lower strings\nfor col in df.select_dtypes(include=\"object\"):\n df[col] = df[col].str.strip().str.lower()\n\n# Connect to Snowflake\nimport snowflake.connector\nconn = snowflake.connector.connect(\n user='USER', password='PASSWORD', account='ACCOUNT'\n)\ncur = conn.cursor()\n\n# Create the table\ncur.execute(\"CREATE OR REPLACE TABLE etl_table_18 (col1 VARCHAR, col2 VARCHAR, col3 VARCHAR, col4 VARCHAR)\")\n\n# Insert the data\nfor _, row in df.iterrows():\n cur.execute(\n \"INSERT INTO etl_table_18 (col1, col2, col3, col4) VALUES (%s, %s, %s, %s)\",\n tuple(row)\n )\n\nconn.commit()\nconn.close()\n```" } ]
[ { "from": "human", "value": "Write an ETL pipeline in Python to load `data_19.json` into Snowflake. The pipeline should:\n- Load the `JSON` file\n- Automatically detect the primary key\n- Clean whitespace and nulls\n- Normalize data\n- Load the cleaned data into a Snowflake table named `etl_table_19`" }, { "from": "gpt", "value": "```python\nimport pandas as pd\n\n# Load the file\ndf = pd.read_json(\"data_19.json\")\n\n# Assume the first column is the primary key\nprimary_key = df.columns[0]\n\n# Drop rows with null PKs\ndf = df.dropna(subset=[primary_key])\n\n# Clean whitespace and lower strings\nfor col in df.select_dtypes(include=\"object\"):\n df[col] = df[col].str.strip().str.lower()\n\n# Connect to Snowflake\nimport snowflake.connector\nconn = snowflake.connector.connect(\n user='USER', password='PASSWORD', account='ACCOUNT'\n)\ncur = conn.cursor()\n\n# Create the table\ncur.execute(\"CREATE OR REPLACE TABLE etl_table_19 (col1 VARCHAR, col2 VARCHAR, col3 VARCHAR, col4 VARCHAR)\")\n\n# Insert the data\nfor _, row in df.iterrows():\n cur.execute(\n \"INSERT INTO etl_table_19 (col1, col2, col3, col4) VALUES (%s, %s, %s, %s)\",\n tuple(row)\n )\n\nconn.commit()\nconn.close()\n```" } ]
[ { "from": "human", "value": "Write an ETL pipeline in Python to load `data_20.csv` into Snowflake. The pipeline should:\n- Load the `CSV` file\n- Automatically detect the primary key\n- Clean whitespace and nulls\n- Normalize data\n- Load the cleaned data into a Snowflake table named `etl_table_20`" }, { "from": "gpt", "value": "```python\nimport pandas as pd\n\n# Load the file\ndf = pd.read_csv(\"data_20.csv\")\n\n# Assume the first column is the primary key\nprimary_key = df.columns[0]\n\n# Drop rows with null PKs\ndf = df.dropna(subset=[primary_key])\n\n# Clean whitespace and lower strings\nfor col in df.select_dtypes(include=\"object\"):\n df[col] = df[col].str.strip().str.lower()\n\n# Connect to Snowflake\nimport snowflake.connector\nconn = snowflake.connector.connect(\n user='USER', password='PASSWORD', account='ACCOUNT'\n)\ncur = conn.cursor()\n\n# Create the table\ncur.execute(\"CREATE OR REPLACE TABLE etl_table_20 (col1 VARCHAR, col2 VARCHAR, col3 VARCHAR, col4 VARCHAR)\")\n\n# Insert the data\nfor _, row in df.iterrows():\n cur.execute(\n \"INSERT INTO etl_table_20 (col1, col2, col3, col4) VALUES (%s, %s, %s, %s)\",\n tuple(row)\n )\n\nconn.commit()\nconn.close()\n```" } ]
[ { "from": "human", "value": "Write an ETL pipeline in Python to load `data_21.csv` into Snowflake. The pipeline should:\n- Load the `CSV` file\n- Automatically detect the primary key\n- Clean whitespace and nulls\n- Normalize data\n- Load the cleaned data into a Snowflake table named `etl_table_21`" }, { "from": "gpt", "value": "```python\nimport pandas as pd\n\n# Load the file\ndf = pd.read_json(\"data_21.json\")\n\n# Assume the first column is the primary key\nprimary_key = df.columns[0]\n\n# Drop rows with null PKs\ndf = df.dropna(subset=[primary_key])\n\n# Clean whitespace and lower strings\nfor col in df.select_dtypes(include=\"object\"):\n df[col] = df[col].str.strip().str.lower()\n\n# Connect to Snowflake\nimport snowflake.connector\nconn = snowflake.connector.connect(\n user='USER', password='PASSWORD', account='ACCOUNT'\n)\ncur = conn.cursor()\n\n# Create the table\ncur.execute(\"CREATE OR REPLACE TABLE etl_table_21 (col1 VARCHAR, col2 VARCHAR, col3 VARCHAR, col4 VARCHAR)\")\n\n# Insert the data\nfor _, row in df.iterrows():\n cur.execute(\n \"INSERT INTO etl_table_21 (col1, col2, col3, col4) VALUES (%s, %s, %s, %s)\",\n tuple(row)\n )\n\nconn.commit()\nconn.close()\n```" } ]
[ { "from": "human", "value": "Write an ETL pipeline in Python to load `data_22.csv` into Snowflake. The pipeline should:\n- Load the `CSV` file\n- Automatically detect the primary key\n- Clean whitespace and nulls\n- Normalize data\n- Load the cleaned data into a Snowflake table named `etl_table_22`" }, { "from": "gpt", "value": "```python\nimport pandas as pd\n\n# Load the file\ndf = pd.read_csv(\"data_22.csv\")\n\n# Assume the first column is the primary key\nprimary_key = df.columns[0]\n\n# Drop rows with null PKs\ndf = df.dropna(subset=[primary_key])\n\n# Clean whitespace and lower strings\nfor col in df.select_dtypes(include=\"object\"):\n df[col] = df[col].str.strip().str.lower()\n\n# Connect to Snowflake\nimport snowflake.connector\nconn = snowflake.connector.connect(\n user='USER', password='PASSWORD', account='ACCOUNT'\n)\ncur = conn.cursor()\n\n# Create the table\ncur.execute(\"CREATE OR REPLACE TABLE etl_table_22 (col1 VARCHAR, col2 VARCHAR, col3 VARCHAR, col4 VARCHAR)\")\n\n# Insert the data\nfor _, row in df.iterrows():\n cur.execute(\n \"INSERT INTO etl_table_22 (col1, col2, col3, col4) VALUES (%s, %s, %s, %s)\",\n tuple(row)\n )\n\nconn.commit()\nconn.close()\n```" } ]
[ { "from": "human", "value": "Write an ETL pipeline in Python to load `data_23.json` into Snowflake. The pipeline should:\n- Load the `JSON` file\n- Automatically detect the primary key\n- Clean whitespace and nulls\n- Normalize data\n- Load the cleaned data into a Snowflake table named `etl_table_23`" }, { "from": "gpt", "value": "```python\nimport pandas as pd\n\n# Load the file\ndf = pd.read_csv(\"data_23.csv\")\n\n# Assume the first column is the primary key\nprimary_key = df.columns[0]\n\n# Drop rows with null PKs\ndf = df.dropna(subset=[primary_key])\n\n# Clean whitespace and lower strings\nfor col in df.select_dtypes(include=\"object\"):\n df[col] = df[col].str.strip().str.lower()\n\n# Connect to Snowflake\nimport snowflake.connector\nconn = snowflake.connector.connect(\n user='USER', password='PASSWORD', account='ACCOUNT'\n)\ncur = conn.cursor()\n\n# Create the table\ncur.execute(\"CREATE OR REPLACE TABLE etl_table_23 (col1 VARCHAR, col2 VARCHAR, col3 VARCHAR, col4 VARCHAR)\")\n\n# Insert the data\nfor _, row in df.iterrows():\n cur.execute(\n \"INSERT INTO etl_table_23 (col1, col2, col3, col4) VALUES (%s, %s, %s, %s)\",\n tuple(row)\n )\n\nconn.commit()\nconn.close()\n```" } ]
[ { "from": "human", "value": "Write an ETL pipeline in Python to load `data_24.csv` into Snowflake. The pipeline should:\n- Load the `CSV` file\n- Automatically detect the primary key\n- Clean whitespace and nulls\n- Normalize data\n- Load the cleaned data into a Snowflake table named `etl_table_24`" }, { "from": "gpt", "value": "```python\nimport pandas as pd\n\n# Load the file\ndf = pd.read_csv(\"data_24.csv\")\n\n# Assume the first column is the primary key\nprimary_key = df.columns[0]\n\n# Drop rows with null PKs\ndf = df.dropna(subset=[primary_key])\n\n# Clean whitespace and lower strings\nfor col in df.select_dtypes(include=\"object\"):\n df[col] = df[col].str.strip().str.lower()\n\n# Connect to Snowflake\nimport snowflake.connector\nconn = snowflake.connector.connect(\n user='USER', password='PASSWORD', account='ACCOUNT'\n)\ncur = conn.cursor()\n\n# Create the table\ncur.execute(\"CREATE OR REPLACE TABLE etl_table_24 (col1 VARCHAR, col2 VARCHAR, col3 VARCHAR, col4 VARCHAR)\")\n\n# Insert the data\nfor _, row in df.iterrows():\n cur.execute(\n \"INSERT INTO etl_table_24 (col1, col2, col3, col4) VALUES (%s, %s, %s, %s)\",\n tuple(row)\n )\n\nconn.commit()\nconn.close()\n```" } ]
[ { "from": "human", "value": "Write an ETL pipeline in Python to load `data_25.json` into Snowflake. The pipeline should:\n- Load the `JSON` file\n- Automatically detect the primary key\n- Clean whitespace and nulls\n- Normalize data\n- Load the cleaned data into a Snowflake table named `etl_table_25`" }, { "from": "gpt", "value": "```python\nimport pandas as pd\n\n# Load the file\ndf = pd.read_csv(\"data_25.csv\")\n\n# Assume the first column is the primary key\nprimary_key = df.columns[0]\n\n# Drop rows with null PKs\ndf = df.dropna(subset=[primary_key])\n\n# Clean whitespace and lower strings\nfor col in df.select_dtypes(include=\"object\"):\n df[col] = df[col].str.strip().str.lower()\n\n# Connect to Snowflake\nimport snowflake.connector\nconn = snowflake.connector.connect(\n user='USER', password='PASSWORD', account='ACCOUNT'\n)\ncur = conn.cursor()\n\n# Create the table\ncur.execute(\"CREATE OR REPLACE TABLE etl_table_25 (col1 VARCHAR, col2 VARCHAR, col3 VARCHAR, col4 VARCHAR)\")\n\n# Insert the data\nfor _, row in df.iterrows():\n cur.execute(\n \"INSERT INTO etl_table_25 (col1, col2, col3, col4) VALUES (%s, %s, %s, %s)\",\n tuple(row)\n )\n\nconn.commit()\nconn.close()\n```" } ]
[ { "from": "human", "value": "Write an ETL pipeline in Python to load `data_26.csv` into Snowflake. The pipeline should:\n- Load the `CSV` file\n- Automatically detect the primary key\n- Clean whitespace and nulls\n- Normalize data\n- Load the cleaned data into a Snowflake table named `etl_table_26`" }, { "from": "gpt", "value": "```python\nimport pandas as pd\n\n# Load the file\ndf = pd.read_csv(\"data_26.csv\")\n\n# Assume the first column is the primary key\nprimary_key = df.columns[0]\n\n# Drop rows with null PKs\ndf = df.dropna(subset=[primary_key])\n\n# Clean whitespace and lower strings\nfor col in df.select_dtypes(include=\"object\"):\n df[col] = df[col].str.strip().str.lower()\n\n# Connect to Snowflake\nimport snowflake.connector\nconn = snowflake.connector.connect(\n user='USER', password='PASSWORD', account='ACCOUNT'\n)\ncur = conn.cursor()\n\n# Create the table\ncur.execute(\"CREATE OR REPLACE TABLE etl_table_26 (col1 VARCHAR, col2 VARCHAR, col3 VARCHAR, col4 VARCHAR)\")\n\n# Insert the data\nfor _, row in df.iterrows():\n cur.execute(\n \"INSERT INTO etl_table_26 (col1, col2, col3, col4) VALUES (%s, %s, %s, %s)\",\n tuple(row)\n )\n\nconn.commit()\nconn.close()\n```" } ]
[ { "from": "human", "value": "Write an ETL pipeline in Python to load `data_27.csv` into Snowflake. The pipeline should:\n- Load the `CSV` file\n- Automatically detect the primary key\n- Clean whitespace and nulls\n- Normalize data\n- Load the cleaned data into a Snowflake table named `etl_table_27`" }, { "from": "gpt", "value": "```python\nimport pandas as pd\n\n# Load the file\ndf = pd.read_csv(\"data_27.csv\")\n\n# Assume the first column is the primary key\nprimary_key = df.columns[0]\n\n# Drop rows with null PKs\ndf = df.dropna(subset=[primary_key])\n\n# Clean whitespace and lower strings\nfor col in df.select_dtypes(include=\"object\"):\n df[col] = df[col].str.strip().str.lower()\n\n# Connect to Snowflake\nimport snowflake.connector\nconn = snowflake.connector.connect(\n user='USER', password='PASSWORD', account='ACCOUNT'\n)\ncur = conn.cursor()\n\n# Create the table\ncur.execute(\"CREATE OR REPLACE TABLE etl_table_27 (col1 VARCHAR, col2 VARCHAR, col3 VARCHAR, col4 VARCHAR)\")\n\n# Insert the data\nfor _, row in df.iterrows():\n cur.execute(\n \"INSERT INTO etl_table_27 (col1, col2, col3, col4) VALUES (%s, %s, %s, %s)\",\n tuple(row)\n )\n\nconn.commit()\nconn.close()\n```" } ]
[ { "from": "human", "value": "Write an ETL pipeline in Python to load `data_28.json` into Snowflake. The pipeline should:\n- Load the `JSON` file\n- Automatically detect the primary key\n- Clean whitespace and nulls\n- Normalize data\n- Load the cleaned data into a Snowflake table named `etl_table_28`" }, { "from": "gpt", "value": "```python\nimport pandas as pd\n\n# Load the file\ndf = pd.read_csv(\"data_28.csv\")\n\n# Assume the first column is the primary key\nprimary_key = df.columns[0]\n\n# Drop rows with null PKs\ndf = df.dropna(subset=[primary_key])\n\n# Clean whitespace and lower strings\nfor col in df.select_dtypes(include=\"object\"):\n df[col] = df[col].str.strip().str.lower()\n\n# Connect to Snowflake\nimport snowflake.connector\nconn = snowflake.connector.connect(\n user='USER', password='PASSWORD', account='ACCOUNT'\n)\ncur = conn.cursor()\n\n# Create the table\ncur.execute(\"CREATE OR REPLACE TABLE etl_table_28 (col1 VARCHAR, col2 VARCHAR, col3 VARCHAR, col4 VARCHAR)\")\n\n# Insert the data\nfor _, row in df.iterrows():\n cur.execute(\n \"INSERT INTO etl_table_28 (col1, col2, col3, col4) VALUES (%s, %s, %s, %s)\",\n tuple(row)\n )\n\nconn.commit()\nconn.close()\n```" } ]
[ { "from": "human", "value": "Write an ETL pipeline in Python to load `data_29.csv` into Snowflake. The pipeline should:\n- Load the `CSV` file\n- Automatically detect the primary key\n- Clean whitespace and nulls\n- Normalize data\n- Load the cleaned data into a Snowflake table named `etl_table_29`" }, { "from": "gpt", "value": "```python\nimport pandas as pd\n\n# Load the file\ndf = pd.read_csv(\"data_29.csv\")\n\n# Assume the first column is the primary key\nprimary_key = df.columns[0]\n\n# Drop rows with null PKs\ndf = df.dropna(subset=[primary_key])\n\n# Clean whitespace and lower strings\nfor col in df.select_dtypes(include=\"object\"):\n df[col] = df[col].str.strip().str.lower()\n\n# Connect to Snowflake\nimport snowflake.connector\nconn = snowflake.connector.connect(\n user='USER', password='PASSWORD', account='ACCOUNT'\n)\ncur = conn.cursor()\n\n# Create the table\ncur.execute(\"CREATE OR REPLACE TABLE etl_table_29 (col1 VARCHAR, col2 VARCHAR, col3 VARCHAR, col4 VARCHAR)\")\n\n# Insert the data\nfor _, row in df.iterrows():\n cur.execute(\n \"INSERT INTO etl_table_29 (col1, col2, col3, col4) VALUES (%s, %s, %s, %s)\",\n tuple(row)\n )\n\nconn.commit()\nconn.close()\n```" } ]
[ { "from": "human", "value": "Write an ETL pipeline in Python to load `data_30.json` into Snowflake. The pipeline should:\n- Load the `JSON` file\n- Automatically detect the primary key\n- Clean whitespace and nulls\n- Normalize data\n- Load the cleaned data into a Snowflake table named `etl_table_30`" }, { "from": "gpt", "value": "```python\nimport pandas as pd\n\n# Load the file\ndf = pd.read_json(\"data_30.json\")\n\n# Assume the first column is the primary key\nprimary_key = df.columns[0]\n\n# Drop rows with null PKs\ndf = df.dropna(subset=[primary_key])\n\n# Clean whitespace and lower strings\nfor col in df.select_dtypes(include=\"object\"):\n df[col] = df[col].str.strip().str.lower()\n\n# Connect to Snowflake\nimport snowflake.connector\nconn = snowflake.connector.connect(\n user='USER', password='PASSWORD', account='ACCOUNT'\n)\ncur = conn.cursor()\n\n# Create the table\ncur.execute(\"CREATE OR REPLACE TABLE etl_table_30 (col1 VARCHAR, col2 VARCHAR, col3 VARCHAR, col4 VARCHAR)\")\n\n# Insert the data\nfor _, row in df.iterrows():\n cur.execute(\n \"INSERT INTO etl_table_30 (col1, col2, col3, col4) VALUES (%s, %s, %s, %s)\",\n tuple(row)\n )\n\nconn.commit()\nconn.close()\n```" } ]
[ { "from": "human", "value": "Write an ETL pipeline in Python to load `data_31.csv` into Snowflake. The pipeline should:\n- Load the `CSV` file\n- Automatically detect the primary key\n- Clean whitespace and nulls\n- Normalize data\n- Load the cleaned data into a Snowflake table named `etl_table_31`" }, { "from": "gpt", "value": "```python\nimport pandas as pd\n\n# Load the file\ndf = pd.read_csv(\"data_31.csv\")\n\n# Assume the first column is the primary key\nprimary_key = df.columns[0]\n\n# Drop rows with null PKs\ndf = df.dropna(subset=[primary_key])\n\n# Clean whitespace and lower strings\nfor col in df.select_dtypes(include=\"object\"):\n df[col] = df[col].str.strip().str.lower()\n\n# Connect to Snowflake\nimport snowflake.connector\nconn = snowflake.connector.connect(\n user='USER', password='PASSWORD', account='ACCOUNT'\n)\ncur = conn.cursor()\n\n# Create the table\ncur.execute(\"CREATE OR REPLACE TABLE etl_table_31 (col1 VARCHAR, col2 VARCHAR, col3 VARCHAR, col4 VARCHAR)\")\n\n# Insert the data\nfor _, row in df.iterrows():\n cur.execute(\n \"INSERT INTO etl_table_31 (col1, col2, col3, col4) VALUES (%s, %s, %s, %s)\",\n tuple(row)\n )\n\nconn.commit()\nconn.close()\n```" } ]
[ { "from": "human", "value": "Write an ETL pipeline in Python to load `data_32.csv` into Snowflake. The pipeline should:\n- Load the `CSV` file\n- Automatically detect the primary key\n- Clean whitespace and nulls\n- Normalize data\n- Load the cleaned data into a Snowflake table named `etl_table_32`" }, { "from": "gpt", "value": "```python\nimport pandas as pd\n\n# Load the file\ndf = pd.read_json(\"data_32.json\")\n\n# Assume the first column is the primary key\nprimary_key = df.columns[0]\n\n# Drop rows with null PKs\ndf = df.dropna(subset=[primary_key])\n\n# Clean whitespace and lower strings\nfor col in df.select_dtypes(include=\"object\"):\n df[col] = df[col].str.strip().str.lower()\n\n# Connect to Snowflake\nimport snowflake.connector\nconn = snowflake.connector.connect(\n user='USER', password='PASSWORD', account='ACCOUNT'\n)\ncur = conn.cursor()\n\n# Create the table\ncur.execute(\"CREATE OR REPLACE TABLE etl_table_32 (col1 VARCHAR, col2 VARCHAR, col3 VARCHAR, col4 VARCHAR)\")\n\n# Insert the data\nfor _, row in df.iterrows():\n cur.execute(\n \"INSERT INTO etl_table_32 (col1, col2, col3, col4) VALUES (%s, %s, %s, %s)\",\n tuple(row)\n )\n\nconn.commit()\nconn.close()\n```" } ]
[ { "from": "human", "value": "Write an ETL pipeline in Python to load `data_33.csv` into Snowflake. The pipeline should:\n- Load the `CSV` file\n- Automatically detect the primary key\n- Clean whitespace and nulls\n- Normalize data\n- Load the cleaned data into a Snowflake table named `etl_table_33`" }, { "from": "gpt", "value": "```python\nimport pandas as pd\n\n# Load the file\ndf = pd.read_csv(\"data_33.csv\")\n\n# Assume the first column is the primary key\nprimary_key = df.columns[0]\n\n# Drop rows with null PKs\ndf = df.dropna(subset=[primary_key])\n\n# Clean whitespace and lower strings\nfor col in df.select_dtypes(include=\"object\"):\n df[col] = df[col].str.strip().str.lower()\n\n# Connect to Snowflake\nimport snowflake.connector\nconn = snowflake.connector.connect(\n user='USER', password='PASSWORD', account='ACCOUNT'\n)\ncur = conn.cursor()\n\n# Create the table\ncur.execute(\"CREATE OR REPLACE TABLE etl_table_33 (col1 VARCHAR, col2 VARCHAR, col3 VARCHAR, col4 VARCHAR)\")\n\n# Insert the data\nfor _, row in df.iterrows():\n cur.execute(\n \"INSERT INTO etl_table_33 (col1, col2, col3, col4) VALUES (%s, %s, %s, %s)\",\n tuple(row)\n )\n\nconn.commit()\nconn.close()\n```" } ]
[ { "from": "human", "value": "Write an ETL pipeline in Python to load `data_34.json` into Snowflake. The pipeline should:\n- Load the `JSON` file\n- Automatically detect the primary key\n- Clean whitespace and nulls\n- Normalize data\n- Load the cleaned data into a Snowflake table named `etl_table_34`" }, { "from": "gpt", "value": "```python\nimport pandas as pd\n\n# Load the file\ndf = pd.read_json(\"data_34.json\")\n\n# Assume the first column is the primary key\nprimary_key = df.columns[0]\n\n# Drop rows with null PKs\ndf = df.dropna(subset=[primary_key])\n\n# Clean whitespace and lower strings\nfor col in df.select_dtypes(include=\"object\"):\n df[col] = df[col].str.strip().str.lower()\n\n# Connect to Snowflake\nimport snowflake.connector\nconn = snowflake.connector.connect(\n user='USER', password='PASSWORD', account='ACCOUNT'\n)\ncur = conn.cursor()\n\n# Create the table\ncur.execute(\"CREATE OR REPLACE TABLE etl_table_34 (col1 VARCHAR, col2 VARCHAR, col3 VARCHAR, col4 VARCHAR)\")\n\n# Insert the data\nfor _, row in df.iterrows():\n cur.execute(\n \"INSERT INTO etl_table_34 (col1, col2, col3, col4) VALUES (%s, %s, %s, %s)\",\n tuple(row)\n )\n\nconn.commit()\nconn.close()\n```" } ]
[ { "from": "human", "value": "Write an ETL pipeline in Python to load `data_35.csv` into Snowflake. The pipeline should:\n- Load the `CSV` file\n- Automatically detect the primary key\n- Clean whitespace and nulls\n- Normalize data\n- Load the cleaned data into a Snowflake table named `etl_table_35`" }, { "from": "gpt", "value": "```python\nimport pandas as pd\n\n# Load the file\ndf = pd.read_csv(\"data_35.csv\")\n\n# Assume the first column is the primary key\nprimary_key = df.columns[0]\n\n# Drop rows with null PKs\ndf = df.dropna(subset=[primary_key])\n\n# Clean whitespace and lower strings\nfor col in df.select_dtypes(include=\"object\"):\n df[col] = df[col].str.strip().str.lower()\n\n# Connect to Snowflake\nimport snowflake.connector\nconn = snowflake.connector.connect(\n user='USER', password='PASSWORD', account='ACCOUNT'\n)\ncur = conn.cursor()\n\n# Create the table\ncur.execute(\"CREATE OR REPLACE TABLE etl_table_35 (col1 VARCHAR, col2 VARCHAR, col3 VARCHAR, col4 VARCHAR)\")\n\n# Insert the data\nfor _, row in df.iterrows():\n cur.execute(\n \"INSERT INTO etl_table_35 (col1, col2, col3, col4) VALUES (%s, %s, %s, %s)\",\n tuple(row)\n )\n\nconn.commit()\nconn.close()\n```" } ]
[ { "from": "human", "value": "Write an ETL pipeline in Python to load `data_36.json` into Snowflake. The pipeline should:\n- Load the `JSON` file\n- Automatically detect the primary key\n- Clean whitespace and nulls\n- Normalize data\n- Load the cleaned data into a Snowflake table named `etl_table_36`" }, { "from": "gpt", "value": "```python\nimport pandas as pd\n\n# Load the file\ndf = pd.read_csv(\"data_36.csv\")\n\n# Assume the first column is the primary key\nprimary_key = df.columns[0]\n\n# Drop rows with null PKs\ndf = df.dropna(subset=[primary_key])\n\n# Clean whitespace and lower strings\nfor col in df.select_dtypes(include=\"object\"):\n df[col] = df[col].str.strip().str.lower()\n\n# Connect to Snowflake\nimport snowflake.connector\nconn = snowflake.connector.connect(\n user='USER', password='PASSWORD', account='ACCOUNT'\n)\ncur = conn.cursor()\n\n# Create the table\ncur.execute(\"CREATE OR REPLACE TABLE etl_table_36 (col1 VARCHAR, col2 VARCHAR, col3 VARCHAR, col4 VARCHAR)\")\n\n# Insert the data\nfor _, row in df.iterrows():\n cur.execute(\n \"INSERT INTO etl_table_36 (col1, col2, col3, col4) VALUES (%s, %s, %s, %s)\",\n tuple(row)\n )\n\nconn.commit()\nconn.close()\n```" } ]
[ { "from": "human", "value": "Write an ETL pipeline in Python to load `data_37.csv` into Snowflake. The pipeline should:\n- Load the `CSV` file\n- Automatically detect the primary key\n- Clean whitespace and nulls\n- Normalize data\n- Load the cleaned data into a Snowflake table named `etl_table_37`" }, { "from": "gpt", "value": "```python\nimport pandas as pd\n\n# Load the file\ndf = pd.read_json(\"data_37.json\")\n\n# Assume the first column is the primary key\nprimary_key = df.columns[0]\n\n# Drop rows with null PKs\ndf = df.dropna(subset=[primary_key])\n\n# Clean whitespace and lower strings\nfor col in df.select_dtypes(include=\"object\"):\n df[col] = df[col].str.strip().str.lower()\n\n# Connect to Snowflake\nimport snowflake.connector\nconn = snowflake.connector.connect(\n user='USER', password='PASSWORD', account='ACCOUNT'\n)\ncur = conn.cursor()\n\n# Create the table\ncur.execute(\"CREATE OR REPLACE TABLE etl_table_37 (col1 VARCHAR, col2 VARCHAR, col3 VARCHAR, col4 VARCHAR)\")\n\n# Insert the data\nfor _, row in df.iterrows():\n cur.execute(\n \"INSERT INTO etl_table_37 (col1, col2, col3, col4) VALUES (%s, %s, %s, %s)\",\n tuple(row)\n )\n\nconn.commit()\nconn.close()\n```" } ]
[ { "from": "human", "value": "Write an ETL pipeline in Python to load `data_38.json` into Snowflake. The pipeline should:\n- Load the `JSON` file\n- Automatically detect the primary key\n- Clean whitespace and nulls\n- Normalize data\n- Load the cleaned data into a Snowflake table named `etl_table_38`" }, { "from": "gpt", "value": "```python\nimport pandas as pd\n\n# Load the file\ndf = pd.read_csv(\"data_38.csv\")\n\n# Assume the first column is the primary key\nprimary_key = df.columns[0]\n\n# Drop rows with null PKs\ndf = df.dropna(subset=[primary_key])\n\n# Clean whitespace and lower strings\nfor col in df.select_dtypes(include=\"object\"):\n df[col] = df[col].str.strip().str.lower()\n\n# Connect to Snowflake\nimport snowflake.connector\nconn = snowflake.connector.connect(\n user='USER', password='PASSWORD', account='ACCOUNT'\n)\ncur = conn.cursor()\n\n# Create the table\ncur.execute(\"CREATE OR REPLACE TABLE etl_table_38 (col1 VARCHAR, col2 VARCHAR, col3 VARCHAR, col4 VARCHAR)\")\n\n# Insert the data\nfor _, row in df.iterrows():\n cur.execute(\n \"INSERT INTO etl_table_38 (col1, col2, col3, col4) VALUES (%s, %s, %s, %s)\",\n tuple(row)\n )\n\nconn.commit()\nconn.close()\n```" } ]
[ { "from": "human", "value": "Write an ETL pipeline in Python to load `data_39.json` into Snowflake. The pipeline should:\n- Load the `JSON` file\n- Automatically detect the primary key\n- Clean whitespace and nulls\n- Normalize data\n- Load the cleaned data into a Snowflake table named `etl_table_39`" }, { "from": "gpt", "value": "```python\nimport pandas as pd\n\n# Load the file\ndf = pd.read_csv(\"data_39.csv\")\n\n# Assume the first column is the primary key\nprimary_key = df.columns[0]\n\n# Drop rows with null PKs\ndf = df.dropna(subset=[primary_key])\n\n# Clean whitespace and lower strings\nfor col in df.select_dtypes(include=\"object\"):\n df[col] = df[col].str.strip().str.lower()\n\n# Connect to Snowflake\nimport snowflake.connector\nconn = snowflake.connector.connect(\n user='USER', password='PASSWORD', account='ACCOUNT'\n)\ncur = conn.cursor()\n\n# Create the table\ncur.execute(\"CREATE OR REPLACE TABLE etl_table_39 (col1 VARCHAR, col2 VARCHAR, col3 VARCHAR, col4 VARCHAR)\")\n\n# Insert the data\nfor _, row in df.iterrows():\n cur.execute(\n \"INSERT INTO etl_table_39 (col1, col2, col3, col4) VALUES (%s, %s, %s, %s)\",\n tuple(row)\n )\n\nconn.commit()\nconn.close()\n```" } ]
[ { "from": "human", "value": "Write an ETL pipeline in Python to load `data_40.csv` into Snowflake. The pipeline should:\n- Load the `CSV` file\n- Automatically detect the primary key\n- Clean whitespace and nulls\n- Normalize data\n- Load the cleaned data into a Snowflake table named `etl_table_40`" }, { "from": "gpt", "value": "```python\nimport pandas as pd\n\n# Load the file\ndf = pd.read_json(\"data_40.json\")\n\n# Assume the first column is the primary key\nprimary_key = df.columns[0]\n\n# Drop rows with null PKs\ndf = df.dropna(subset=[primary_key])\n\n# Clean whitespace and lower strings\nfor col in df.select_dtypes(include=\"object\"):\n df[col] = df[col].str.strip().str.lower()\n\n# Connect to Snowflake\nimport snowflake.connector\nconn = snowflake.connector.connect(\n user='USER', password='PASSWORD', account='ACCOUNT'\n)\ncur = conn.cursor()\n\n# Create the table\ncur.execute(\"CREATE OR REPLACE TABLE etl_table_40 (col1 VARCHAR, col2 VARCHAR, col3 VARCHAR, col4 VARCHAR)\")\n\n# Insert the data\nfor _, row in df.iterrows():\n cur.execute(\n \"INSERT INTO etl_table_40 (col1, col2, col3, col4) VALUES (%s, %s, %s, %s)\",\n tuple(row)\n )\n\nconn.commit()\nconn.close()\n```" } ]
[ { "from": "human", "value": "Write an ETL pipeline in Python to load `data_41.csv` into Snowflake. The pipeline should:\n- Load the `CSV` file\n- Automatically detect the primary key\n- Clean whitespace and nulls\n- Normalize data\n- Load the cleaned data into a Snowflake table named `etl_table_41`" }, { "from": "gpt", "value": "```python\nimport pandas as pd\n\n# Load the file\ndf = pd.read_json(\"data_41.json\")\n\n# Assume the first column is the primary key\nprimary_key = df.columns[0]\n\n# Drop rows with null PKs\ndf = df.dropna(subset=[primary_key])\n\n# Clean whitespace and lower strings\nfor col in df.select_dtypes(include=\"object\"):\n df[col] = df[col].str.strip().str.lower()\n\n# Connect to Snowflake\nimport snowflake.connector\nconn = snowflake.connector.connect(\n user='USER', password='PASSWORD', account='ACCOUNT'\n)\ncur = conn.cursor()\n\n# Create the table\ncur.execute(\"CREATE OR REPLACE TABLE etl_table_41 (col1 VARCHAR, col2 VARCHAR, col3 VARCHAR, col4 VARCHAR)\")\n\n# Insert the data\nfor _, row in df.iterrows():\n cur.execute(\n \"INSERT INTO etl_table_41 (col1, col2, col3, col4) VALUES (%s, %s, %s, %s)\",\n tuple(row)\n )\n\nconn.commit()\nconn.close()\n```" } ]
[ { "from": "human", "value": "Write an ETL pipeline in Python to load `data_42.csv` into Snowflake. The pipeline should:\n- Load the `CSV` file\n- Automatically detect the primary key\n- Clean whitespace and nulls\n- Normalize data\n- Load the cleaned data into a Snowflake table named `etl_table_42`" }, { "from": "gpt", "value": "```python\nimport pandas as pd\n\n# Load the file\ndf = pd.read_json(\"data_42.json\")\n\n# Assume the first column is the primary key\nprimary_key = df.columns[0]\n\n# Drop rows with null PKs\ndf = df.dropna(subset=[primary_key])\n\n# Clean whitespace and lower strings\nfor col in df.select_dtypes(include=\"object\"):\n df[col] = df[col].str.strip().str.lower()\n\n# Connect to Snowflake\nimport snowflake.connector\nconn = snowflake.connector.connect(\n user='USER', password='PASSWORD', account='ACCOUNT'\n)\ncur = conn.cursor()\n\n# Create the table\ncur.execute(\"CREATE OR REPLACE TABLE etl_table_42 (col1 VARCHAR, col2 VARCHAR, col3 VARCHAR, col4 VARCHAR)\")\n\n# Insert the data\nfor _, row in df.iterrows():\n cur.execute(\n \"INSERT INTO etl_table_42 (col1, col2, col3, col4) VALUES (%s, %s, %s, %s)\",\n tuple(row)\n )\n\nconn.commit()\nconn.close()\n```" } ]
[ { "from": "human", "value": "Write an ETL pipeline in Python to load `data_43.json` into Snowflake. The pipeline should:\n- Load the `JSON` file\n- Automatically detect the primary key\n- Clean whitespace and nulls\n- Normalize data\n- Load the cleaned data into a Snowflake table named `etl_table_43`" }, { "from": "gpt", "value": "```python\nimport pandas as pd\n\n# Load the file\ndf = pd.read_csv(\"data_43.csv\")\n\n# Assume the first column is the primary key\nprimary_key = df.columns[0]\n\n# Drop rows with null PKs\ndf = df.dropna(subset=[primary_key])\n\n# Clean whitespace and lower strings\nfor col in df.select_dtypes(include=\"object\"):\n df[col] = df[col].str.strip().str.lower()\n\n# Connect to Snowflake\nimport snowflake.connector\nconn = snowflake.connector.connect(\n user='USER', password='PASSWORD', account='ACCOUNT'\n)\ncur = conn.cursor()\n\n# Create the table\ncur.execute(\"CREATE OR REPLACE TABLE etl_table_43 (col1 VARCHAR, col2 VARCHAR, col3 VARCHAR, col4 VARCHAR)\")\n\n# Insert the data\nfor _, row in df.iterrows():\n cur.execute(\n \"INSERT INTO etl_table_43 (col1, col2, col3, col4) VALUES (%s, %s, %s, %s)\",\n tuple(row)\n )\n\nconn.commit()\nconn.close()\n```" } ]
[ { "from": "human", "value": "Write an ETL pipeline in Python to load `data_44.csv` into Snowflake. The pipeline should:\n- Load the `CSV` file\n- Automatically detect the primary key\n- Clean whitespace and nulls\n- Normalize data\n- Load the cleaned data into a Snowflake table named `etl_table_44`" }, { "from": "gpt", "value": "```python\nimport pandas as pd\n\n# Load the file\ndf = pd.read_json(\"data_44.json\")\n\n# Assume the first column is the primary key\nprimary_key = df.columns[0]\n\n# Drop rows with null PKs\ndf = df.dropna(subset=[primary_key])\n\n# Clean whitespace and lower strings\nfor col in df.select_dtypes(include=\"object\"):\n df[col] = df[col].str.strip().str.lower()\n\n# Connect to Snowflake\nimport snowflake.connector\nconn = snowflake.connector.connect(\n user='USER', password='PASSWORD', account='ACCOUNT'\n)\ncur = conn.cursor()\n\n# Create the table\ncur.execute(\"CREATE OR REPLACE TABLE etl_table_44 (col1 VARCHAR, col2 VARCHAR, col3 VARCHAR, col4 VARCHAR)\")\n\n# Insert the data\nfor _, row in df.iterrows():\n cur.execute(\n \"INSERT INTO etl_table_44 (col1, col2, col3, col4) VALUES (%s, %s, %s, %s)\",\n tuple(row)\n )\n\nconn.commit()\nconn.close()\n```" } ]
[ { "from": "human", "value": "Write an ETL pipeline in Python to load `data_45.csv` into Snowflake. The pipeline should:\n- Load the `CSV` file\n- Automatically detect the primary key\n- Clean whitespace and nulls\n- Normalize data\n- Load the cleaned data into a Snowflake table named `etl_table_45`" }, { "from": "gpt", "value": "```python\nimport pandas as pd\n\n# Load the file\ndf = pd.read_json(\"data_45.json\")\n\n# Assume the first column is the primary key\nprimary_key = df.columns[0]\n\n# Drop rows with null PKs\ndf = df.dropna(subset=[primary_key])\n\n# Clean whitespace and lower strings\nfor col in df.select_dtypes(include=\"object\"):\n df[col] = df[col].str.strip().str.lower()\n\n# Connect to Snowflake\nimport snowflake.connector\nconn = snowflake.connector.connect(\n user='USER', password='PASSWORD', account='ACCOUNT'\n)\ncur = conn.cursor()\n\n# Create the table\ncur.execute(\"CREATE OR REPLACE TABLE etl_table_45 (col1 VARCHAR, col2 VARCHAR, col3 VARCHAR, col4 VARCHAR)\")\n\n# Insert the data\nfor _, row in df.iterrows():\n cur.execute(\n \"INSERT INTO etl_table_45 (col1, col2, col3, col4) VALUES (%s, %s, %s, %s)\",\n tuple(row)\n )\n\nconn.commit()\nconn.close()\n```" } ]
[ { "from": "human", "value": "Write an ETL pipeline in Python to load `data_46.csv` into Snowflake. The pipeline should:\n- Load the `CSV` file\n- Automatically detect the primary key\n- Clean whitespace and nulls\n- Normalize data\n- Load the cleaned data into a Snowflake table named `etl_table_46`" }, { "from": "gpt", "value": "```python\nimport pandas as pd\n\n# Load the file\ndf = pd.read_json(\"data_46.json\")\n\n# Assume the first column is the primary key\nprimary_key = df.columns[0]\n\n# Drop rows with null PKs\ndf = df.dropna(subset=[primary_key])\n\n# Clean whitespace and lower strings\nfor col in df.select_dtypes(include=\"object\"):\n df[col] = df[col].str.strip().str.lower()\n\n# Connect to Snowflake\nimport snowflake.connector\nconn = snowflake.connector.connect(\n user='USER', password='PASSWORD', account='ACCOUNT'\n)\ncur = conn.cursor()\n\n# Create the table\ncur.execute(\"CREATE OR REPLACE TABLE etl_table_46 (col1 VARCHAR, col2 VARCHAR, col3 VARCHAR, col4 VARCHAR)\")\n\n# Insert the data\nfor _, row in df.iterrows():\n cur.execute(\n \"INSERT INTO etl_table_46 (col1, col2, col3, col4) VALUES (%s, %s, %s, %s)\",\n tuple(row)\n )\n\nconn.commit()\nconn.close()\n```" } ]
[ { "from": "human", "value": "Write an ETL pipeline in Python to load `data_47.json` into Snowflake. The pipeline should:\n- Load the `JSON` file\n- Automatically detect the primary key\n- Clean whitespace and nulls\n- Normalize data\n- Load the cleaned data into a Snowflake table named `etl_table_47`" }, { "from": "gpt", "value": "```python\nimport pandas as pd\n\n# Load the file\ndf = pd.read_json(\"data_47.json\")\n\n# Assume the first column is the primary key\nprimary_key = df.columns[0]\n\n# Drop rows with null PKs\ndf = df.dropna(subset=[primary_key])\n\n# Clean whitespace and lower strings\nfor col in df.select_dtypes(include=\"object\"):\n df[col] = df[col].str.strip().str.lower()\n\n# Connect to Snowflake\nimport snowflake.connector\nconn = snowflake.connector.connect(\n user='USER', password='PASSWORD', account='ACCOUNT'\n)\ncur = conn.cursor()\n\n# Create the table\ncur.execute(\"CREATE OR REPLACE TABLE etl_table_47 (col1 VARCHAR, col2 VARCHAR, col3 VARCHAR, col4 VARCHAR)\")\n\n# Insert the data\nfor _, row in df.iterrows():\n cur.execute(\n \"INSERT INTO etl_table_47 (col1, col2, col3, col4) VALUES (%s, %s, %s, %s)\",\n tuple(row)\n )\n\nconn.commit()\nconn.close()\n```" } ]
[ { "from": "human", "value": "Write an ETL pipeline in Python to load `data_48.csv` into Snowflake. The pipeline should:\n- Load the `CSV` file\n- Automatically detect the primary key\n- Clean whitespace and nulls\n- Normalize data\n- Load the cleaned data into a Snowflake table named `etl_table_48`" }, { "from": "gpt", "value": "```python\nimport pandas as pd\n\n# Load the file\ndf = pd.read_json(\"data_48.json\")\n\n# Assume the first column is the primary key\nprimary_key = df.columns[0]\n\n# Drop rows with null PKs\ndf = df.dropna(subset=[primary_key])\n\n# Clean whitespace and lower strings\nfor col in df.select_dtypes(include=\"object\"):\n df[col] = df[col].str.strip().str.lower()\n\n# Connect to Snowflake\nimport snowflake.connector\nconn = snowflake.connector.connect(\n user='USER', password='PASSWORD', account='ACCOUNT'\n)\ncur = conn.cursor()\n\n# Create the table\ncur.execute(\"CREATE OR REPLACE TABLE etl_table_48 (col1 VARCHAR, col2 VARCHAR, col3 VARCHAR, col4 VARCHAR)\")\n\n# Insert the data\nfor _, row in df.iterrows():\n cur.execute(\n \"INSERT INTO etl_table_48 (col1, col2, col3, col4) VALUES (%s, %s, %s, %s)\",\n tuple(row)\n )\n\nconn.commit()\nconn.close()\n```" } ]
[ { "from": "human", "value": "Write an ETL pipeline in Python to load `data_49.csv` into Snowflake. The pipeline should:\n- Load the `CSV` file\n- Automatically detect the primary key\n- Clean whitespace and nulls\n- Normalize data\n- Load the cleaned data into a Snowflake table named `etl_table_49`" }, { "from": "gpt", "value": "```python\nimport pandas as pd\n\n# Load the file\ndf = pd.read_json(\"data_49.json\")\n\n# Assume the first column is the primary key\nprimary_key = df.columns[0]\n\n# Drop rows with null PKs\ndf = df.dropna(subset=[primary_key])\n\n# Clean whitespace and lower strings\nfor col in df.select_dtypes(include=\"object\"):\n df[col] = df[col].str.strip().str.lower()\n\n# Connect to Snowflake\nimport snowflake.connector\nconn = snowflake.connector.connect(\n user='USER', password='PASSWORD', account='ACCOUNT'\n)\ncur = conn.cursor()\n\n# Create the table\ncur.execute(\"CREATE OR REPLACE TABLE etl_table_49 (col1 VARCHAR, col2 VARCHAR, col3 VARCHAR, col4 VARCHAR)\")\n\n# Insert the data\nfor _, row in df.iterrows():\n cur.execute(\n \"INSERT INTO etl_table_49 (col1, col2, col3, col4) VALUES (%s, %s, %s, %s)\",\n tuple(row)\n )\n\nconn.commit()\nconn.close()\n```" } ]
[ { "from": "human", "value": "Write an ETL pipeline in Python to load `data_50.json` into Snowflake. The pipeline should:\n- Load the `JSON` file\n- Automatically detect the primary key\n- Clean whitespace and nulls\n- Normalize data\n- Load the cleaned data into a Snowflake table named `etl_table_50`" }, { "from": "gpt", "value": "```python\nimport pandas as pd\n\n# Load the file\ndf = pd.read_csv(\"data_50.csv\")\n\n# Assume the first column is the primary key\nprimary_key = df.columns[0]\n\n# Drop rows with null PKs\ndf = df.dropna(subset=[primary_key])\n\n# Clean whitespace and lower strings\nfor col in df.select_dtypes(include=\"object\"):\n df[col] = df[col].str.strip().str.lower()\n\n# Connect to Snowflake\nimport snowflake.connector\nconn = snowflake.connector.connect(\n user='USER', password='PASSWORD', account='ACCOUNT'\n)\ncur = conn.cursor()\n\n# Create the table\ncur.execute(\"CREATE OR REPLACE TABLE etl_table_50 (col1 VARCHAR, col2 VARCHAR, col3 VARCHAR, col4 VARCHAR)\")\n\n# Insert the data\nfor _, row in df.iterrows():\n cur.execute(\n \"INSERT INTO etl_table_50 (col1, col2, col3, col4) VALUES (%s, %s, %s, %s)\",\n tuple(row)\n )\n\nconn.commit()\nconn.close()\n```" } ]
[ { "from": "human", "value": "Write an ETL pipeline in Python to load `data_51.json` into Snowflake. The pipeline should:\n- Load the `JSON` file\n- Automatically detect the primary key\n- Clean whitespace and nulls\n- Normalize data\n- Load the cleaned data into a Snowflake table named `etl_table_51`" }, { "from": "gpt", "value": "```python\nimport pandas as pd\n\n# Load the file\ndf = pd.read_json(\"data_51.json\")\n\n# Assume the first column is the primary key\nprimary_key = df.columns[0]\n\n# Drop rows with null PKs\ndf = df.dropna(subset=[primary_key])\n\n# Clean whitespace and lower strings\nfor col in df.select_dtypes(include=\"object\"):\n df[col] = df[col].str.strip().str.lower()\n\n# Connect to Snowflake\nimport snowflake.connector\nconn = snowflake.connector.connect(\n user='USER', password='PASSWORD', account='ACCOUNT'\n)\ncur = conn.cursor()\n\n# Create the table\ncur.execute(\"CREATE OR REPLACE TABLE etl_table_51 (col1 VARCHAR, col2 VARCHAR, col3 VARCHAR, col4 VARCHAR)\")\n\n# Insert the data\nfor _, row in df.iterrows():\n cur.execute(\n \"INSERT INTO etl_table_51 (col1, col2, col3, col4) VALUES (%s, %s, %s, %s)\",\n tuple(row)\n )\n\nconn.commit()\nconn.close()\n```" } ]
[ { "from": "human", "value": "Write an ETL pipeline in Python to load `data_52.json` into Snowflake. The pipeline should:\n- Load the `JSON` file\n- Automatically detect the primary key\n- Clean whitespace and nulls\n- Normalize data\n- Load the cleaned data into a Snowflake table named `etl_table_52`" }, { "from": "gpt", "value": "```python\nimport pandas as pd\n\n# Load the file\ndf = pd.read_json(\"data_52.json\")\n\n# Assume the first column is the primary key\nprimary_key = df.columns[0]\n\n# Drop rows with null PKs\ndf = df.dropna(subset=[primary_key])\n\n# Clean whitespace and lower strings\nfor col in df.select_dtypes(include=\"object\"):\n df[col] = df[col].str.strip().str.lower()\n\n# Connect to Snowflake\nimport snowflake.connector\nconn = snowflake.connector.connect(\n user='USER', password='PASSWORD', account='ACCOUNT'\n)\ncur = conn.cursor()\n\n# Create the table\ncur.execute(\"CREATE OR REPLACE TABLE etl_table_52 (col1 VARCHAR, col2 VARCHAR, col3 VARCHAR, col4 VARCHAR)\")\n\n# Insert the data\nfor _, row in df.iterrows():\n cur.execute(\n \"INSERT INTO etl_table_52 (col1, col2, col3, col4) VALUES (%s, %s, %s, %s)\",\n tuple(row)\n )\n\nconn.commit()\nconn.close()\n```" } ]
[ { "from": "human", "value": "Write an ETL pipeline in Python to load `data_53.json` into Snowflake. The pipeline should:\n- Load the `JSON` file\n- Automatically detect the primary key\n- Clean whitespace and nulls\n- Normalize data\n- Load the cleaned data into a Snowflake table named `etl_table_53`" }, { "from": "gpt", "value": "```python\nimport pandas as pd\n\n# Load the file\ndf = pd.read_json(\"data_53.json\")\n\n# Assume the first column is the primary key\nprimary_key = df.columns[0]\n\n# Drop rows with null PKs\ndf = df.dropna(subset=[primary_key])\n\n# Clean whitespace and lower strings\nfor col in df.select_dtypes(include=\"object\"):\n df[col] = df[col].str.strip().str.lower()\n\n# Connect to Snowflake\nimport snowflake.connector\nconn = snowflake.connector.connect(\n user='USER', password='PASSWORD', account='ACCOUNT'\n)\ncur = conn.cursor()\n\n# Create the table\ncur.execute(\"CREATE OR REPLACE TABLE etl_table_53 (col1 VARCHAR, col2 VARCHAR, col3 VARCHAR, col4 VARCHAR)\")\n\n# Insert the data\nfor _, row in df.iterrows():\n cur.execute(\n \"INSERT INTO etl_table_53 (col1, col2, col3, col4) VALUES (%s, %s, %s, %s)\",\n tuple(row)\n )\n\nconn.commit()\nconn.close()\n```" } ]
[ { "from": "human", "value": "Write an ETL pipeline in Python to load `data_54.csv` into Snowflake. The pipeline should:\n- Load the `CSV` file\n- Automatically detect the primary key\n- Clean whitespace and nulls\n- Normalize data\n- Load the cleaned data into a Snowflake table named `etl_table_54`" }, { "from": "gpt", "value": "```python\nimport pandas as pd\n\n# Load the file\ndf = pd.read_json(\"data_54.json\")\n\n# Assume the first column is the primary key\nprimary_key = df.columns[0]\n\n# Drop rows with null PKs\ndf = df.dropna(subset=[primary_key])\n\n# Clean whitespace and lower strings\nfor col in df.select_dtypes(include=\"object\"):\n df[col] = df[col].str.strip().str.lower()\n\n# Connect to Snowflake\nimport snowflake.connector\nconn = snowflake.connector.connect(\n user='USER', password='PASSWORD', account='ACCOUNT'\n)\ncur = conn.cursor()\n\n# Create the table\ncur.execute(\"CREATE OR REPLACE TABLE etl_table_54 (col1 VARCHAR, col2 VARCHAR, col3 VARCHAR, col4 VARCHAR)\")\n\n# Insert the data\nfor _, row in df.iterrows():\n cur.execute(\n \"INSERT INTO etl_table_54 (col1, col2, col3, col4) VALUES (%s, %s, %s, %s)\",\n tuple(row)\n )\n\nconn.commit()\nconn.close()\n```" } ]
[ { "from": "human", "value": "Write an ETL pipeline in Python to load `data_55.json` into Snowflake. The pipeline should:\n- Load the `JSON` file\n- Automatically detect the primary key\n- Clean whitespace and nulls\n- Normalize data\n- Load the cleaned data into a Snowflake table named `etl_table_55`" }, { "from": "gpt", "value": "```python\nimport pandas as pd\n\n# Load the file\ndf = pd.read_csv(\"data_55.csv\")\n\n# Assume the first column is the primary key\nprimary_key = df.columns[0]\n\n# Drop rows with null PKs\ndf = df.dropna(subset=[primary_key])\n\n# Clean whitespace and lower strings\nfor col in df.select_dtypes(include=\"object\"):\n df[col] = df[col].str.strip().str.lower()\n\n# Connect to Snowflake\nimport snowflake.connector\nconn = snowflake.connector.connect(\n user='USER', password='PASSWORD', account='ACCOUNT'\n)\ncur = conn.cursor()\n\n# Create the table\ncur.execute(\"CREATE OR REPLACE TABLE etl_table_55 (col1 VARCHAR, col2 VARCHAR, col3 VARCHAR, col4 VARCHAR)\")\n\n# Insert the data\nfor _, row in df.iterrows():\n cur.execute(\n \"INSERT INTO etl_table_55 (col1, col2, col3, col4) VALUES (%s, %s, %s, %s)\",\n tuple(row)\n )\n\nconn.commit()\nconn.close()\n```" } ]
[ { "from": "human", "value": "Write an ETL pipeline in Python to load `data_56.json` into Snowflake. The pipeline should:\n- Load the `JSON` file\n- Automatically detect the primary key\n- Clean whitespace and nulls\n- Normalize data\n- Load the cleaned data into a Snowflake table named `etl_table_56`" }, { "from": "gpt", "value": "```python\nimport pandas as pd\n\n# Load the file\ndf = pd.read_csv(\"data_56.csv\")\n\n# Assume the first column is the primary key\nprimary_key = df.columns[0]\n\n# Drop rows with null PKs\ndf = df.dropna(subset=[primary_key])\n\n# Clean whitespace and lower strings\nfor col in df.select_dtypes(include=\"object\"):\n df[col] = df[col].str.strip().str.lower()\n\n# Connect to Snowflake\nimport snowflake.connector\nconn = snowflake.connector.connect(\n user='USER', password='PASSWORD', account='ACCOUNT'\n)\ncur = conn.cursor()\n\n# Create the table\ncur.execute(\"CREATE OR REPLACE TABLE etl_table_56 (col1 VARCHAR, col2 VARCHAR, col3 VARCHAR, col4 VARCHAR)\")\n\n# Insert the data\nfor _, row in df.iterrows():\n cur.execute(\n \"INSERT INTO etl_table_56 (col1, col2, col3, col4) VALUES (%s, %s, %s, %s)\",\n tuple(row)\n )\n\nconn.commit()\nconn.close()\n```" } ]
[ { "from": "human", "value": "Write an ETL pipeline in Python to load `data_57.json` into Snowflake. The pipeline should:\n- Load the `JSON` file\n- Automatically detect the primary key\n- Clean whitespace and nulls\n- Normalize data\n- Load the cleaned data into a Snowflake table named `etl_table_57`" }, { "from": "gpt", "value": "```python\nimport pandas as pd\n\n# Load the file\ndf = pd.read_json(\"data_57.json\")\n\n# Assume the first column is the primary key\nprimary_key = df.columns[0]\n\n# Drop rows with null PKs\ndf = df.dropna(subset=[primary_key])\n\n# Clean whitespace and lower strings\nfor col in df.select_dtypes(include=\"object\"):\n df[col] = df[col].str.strip().str.lower()\n\n# Connect to Snowflake\nimport snowflake.connector\nconn = snowflake.connector.connect(\n user='USER', password='PASSWORD', account='ACCOUNT'\n)\ncur = conn.cursor()\n\n# Create the table\ncur.execute(\"CREATE OR REPLACE TABLE etl_table_57 (col1 VARCHAR, col2 VARCHAR, col3 VARCHAR, col4 VARCHAR)\")\n\n# Insert the data\nfor _, row in df.iterrows():\n cur.execute(\n \"INSERT INTO etl_table_57 (col1, col2, col3, col4) VALUES (%s, %s, %s, %s)\",\n tuple(row)\n )\n\nconn.commit()\nconn.close()\n```" } ]
[ { "from": "human", "value": "Write an ETL pipeline in Python to load `data_58.csv` into Snowflake. The pipeline should:\n- Load the `CSV` file\n- Automatically detect the primary key\n- Clean whitespace and nulls\n- Normalize data\n- Load the cleaned data into a Snowflake table named `etl_table_58`" }, { "from": "gpt", "value": "```python\nimport pandas as pd\n\n# Load the file\ndf = pd.read_json(\"data_58.json\")\n\n# Assume the first column is the primary key\nprimary_key = df.columns[0]\n\n# Drop rows with null PKs\ndf = df.dropna(subset=[primary_key])\n\n# Clean whitespace and lower strings\nfor col in df.select_dtypes(include=\"object\"):\n df[col] = df[col].str.strip().str.lower()\n\n# Connect to Snowflake\nimport snowflake.connector\nconn = snowflake.connector.connect(\n user='USER', password='PASSWORD', account='ACCOUNT'\n)\ncur = conn.cursor()\n\n# Create the table\ncur.execute(\"CREATE OR REPLACE TABLE etl_table_58 (col1 VARCHAR, col2 VARCHAR, col3 VARCHAR, col4 VARCHAR)\")\n\n# Insert the data\nfor _, row in df.iterrows():\n cur.execute(\n \"INSERT INTO etl_table_58 (col1, col2, col3, col4) VALUES (%s, %s, %s, %s)\",\n tuple(row)\n )\n\nconn.commit()\nconn.close()\n```" } ]
[ { "from": "human", "value": "Write an ETL pipeline in Python to load `data_59.csv` into Snowflake. The pipeline should:\n- Load the `CSV` file\n- Automatically detect the primary key\n- Clean whitespace and nulls\n- Normalize data\n- Load the cleaned data into a Snowflake table named `etl_table_59`" }, { "from": "gpt", "value": "```python\nimport pandas as pd\n\n# Load the file\ndf = pd.read_json(\"data_59.json\")\n\n# Assume the first column is the primary key\nprimary_key = df.columns[0]\n\n# Drop rows with null PKs\ndf = df.dropna(subset=[primary_key])\n\n# Clean whitespace and lower strings\nfor col in df.select_dtypes(include=\"object\"):\n df[col] = df[col].str.strip().str.lower()\n\n# Connect to Snowflake\nimport snowflake.connector\nconn = snowflake.connector.connect(\n user='USER', password='PASSWORD', account='ACCOUNT'\n)\ncur = conn.cursor()\n\n# Create the table\ncur.execute(\"CREATE OR REPLACE TABLE etl_table_59 (col1 VARCHAR, col2 VARCHAR, col3 VARCHAR, col4 VARCHAR)\")\n\n# Insert the data\nfor _, row in df.iterrows():\n cur.execute(\n \"INSERT INTO etl_table_59 (col1, col2, col3, col4) VALUES (%s, %s, %s, %s)\",\n tuple(row)\n )\n\nconn.commit()\nconn.close()\n```" } ]
[ { "from": "human", "value": "Write an ETL pipeline in Python to load `data_60.json` into Snowflake. The pipeline should:\n- Load the `JSON` file\n- Automatically detect the primary key\n- Clean whitespace and nulls\n- Normalize data\n- Load the cleaned data into a Snowflake table named `etl_table_60`" }, { "from": "gpt", "value": "```python\nimport pandas as pd\n\n# Load the file\ndf = pd.read_json(\"data_60.json\")\n\n# Assume the first column is the primary key\nprimary_key = df.columns[0]\n\n# Drop rows with null PKs\ndf = df.dropna(subset=[primary_key])\n\n# Clean whitespace and lower strings\nfor col in df.select_dtypes(include=\"object\"):\n df[col] = df[col].str.strip().str.lower()\n\n# Connect to Snowflake\nimport snowflake.connector\nconn = snowflake.connector.connect(\n user='USER', password='PASSWORD', account='ACCOUNT'\n)\ncur = conn.cursor()\n\n# Create the table\ncur.execute(\"CREATE OR REPLACE TABLE etl_table_60 (col1 VARCHAR, col2 VARCHAR, col3 VARCHAR, col4 VARCHAR)\")\n\n# Insert the data\nfor _, row in df.iterrows():\n cur.execute(\n \"INSERT INTO etl_table_60 (col1, col2, col3, col4) VALUES (%s, %s, %s, %s)\",\n tuple(row)\n )\n\nconn.commit()\nconn.close()\n```" } ]
[ { "from": "human", "value": "Write an ETL pipeline in Python to load `data_61.json` into Snowflake. The pipeline should:\n- Load the `JSON` file\n- Automatically detect the primary key\n- Clean whitespace and nulls\n- Normalize data\n- Load the cleaned data into a Snowflake table named `etl_table_61`" }, { "from": "gpt", "value": "```python\nimport pandas as pd\n\n# Load the file\ndf = pd.read_csv(\"data_61.csv\")\n\n# Assume the first column is the primary key\nprimary_key = df.columns[0]\n\n# Drop rows with null PKs\ndf = df.dropna(subset=[primary_key])\n\n# Clean whitespace and lower strings\nfor col in df.select_dtypes(include=\"object\"):\n df[col] = df[col].str.strip().str.lower()\n\n# Connect to Snowflake\nimport snowflake.connector\nconn = snowflake.connector.connect(\n user='USER', password='PASSWORD', account='ACCOUNT'\n)\ncur = conn.cursor()\n\n# Create the table\ncur.execute(\"CREATE OR REPLACE TABLE etl_table_61 (col1 VARCHAR, col2 VARCHAR, col3 VARCHAR, col4 VARCHAR)\")\n\n# Insert the data\nfor _, row in df.iterrows():\n cur.execute(\n \"INSERT INTO etl_table_61 (col1, col2, col3, col4) VALUES (%s, %s, %s, %s)\",\n tuple(row)\n )\n\nconn.commit()\nconn.close()\n```" } ]
[ { "from": "human", "value": "Write an ETL pipeline in Python to load `data_62.json` into Snowflake. The pipeline should:\n- Load the `JSON` file\n- Automatically detect the primary key\n- Clean whitespace and nulls\n- Normalize data\n- Load the cleaned data into a Snowflake table named `etl_table_62`" }, { "from": "gpt", "value": "```python\nimport pandas as pd\n\n# Load the file\ndf = pd.read_csv(\"data_62.csv\")\n\n# Assume the first column is the primary key\nprimary_key = df.columns[0]\n\n# Drop rows with null PKs\ndf = df.dropna(subset=[primary_key])\n\n# Clean whitespace and lower strings\nfor col in df.select_dtypes(include=\"object\"):\n df[col] = df[col].str.strip().str.lower()\n\n# Connect to Snowflake\nimport snowflake.connector\nconn = snowflake.connector.connect(\n user='USER', password='PASSWORD', account='ACCOUNT'\n)\ncur = conn.cursor()\n\n# Create the table\ncur.execute(\"CREATE OR REPLACE TABLE etl_table_62 (col1 VARCHAR, col2 VARCHAR, col3 VARCHAR, col4 VARCHAR)\")\n\n# Insert the data\nfor _, row in df.iterrows():\n cur.execute(\n \"INSERT INTO etl_table_62 (col1, col2, col3, col4) VALUES (%s, %s, %s, %s)\",\n tuple(row)\n )\n\nconn.commit()\nconn.close()\n```" } ]
[ { "from": "human", "value": "Write an ETL pipeline in Python to load `data_63.json` into Snowflake. The pipeline should:\n- Load the `JSON` file\n- Automatically detect the primary key\n- Clean whitespace and nulls\n- Normalize data\n- Load the cleaned data into a Snowflake table named `etl_table_63`" }, { "from": "gpt", "value": "```python\nimport pandas as pd\n\n# Load the file\ndf = pd.read_csv(\"data_63.csv\")\n\n# Assume the first column is the primary key\nprimary_key = df.columns[0]\n\n# Drop rows with null PKs\ndf = df.dropna(subset=[primary_key])\n\n# Clean whitespace and lower strings\nfor col in df.select_dtypes(include=\"object\"):\n df[col] = df[col].str.strip().str.lower()\n\n# Connect to Snowflake\nimport snowflake.connector\nconn = snowflake.connector.connect(\n user='USER', password='PASSWORD', account='ACCOUNT'\n)\ncur = conn.cursor()\n\n# Create the table\ncur.execute(\"CREATE OR REPLACE TABLE etl_table_63 (col1 VARCHAR, col2 VARCHAR, col3 VARCHAR, col4 VARCHAR)\")\n\n# Insert the data\nfor _, row in df.iterrows():\n cur.execute(\n \"INSERT INTO etl_table_63 (col1, col2, col3, col4) VALUES (%s, %s, %s, %s)\",\n tuple(row)\n )\n\nconn.commit()\nconn.close()\n```" } ]
[ { "from": "human", "value": "Write an ETL pipeline in Python to load `data_64.json` into Snowflake. The pipeline should:\n- Load the `JSON` file\n- Automatically detect the primary key\n- Clean whitespace and nulls\n- Normalize data\n- Load the cleaned data into a Snowflake table named `etl_table_64`" }, { "from": "gpt", "value": "```python\nimport pandas as pd\n\n# Load the file\ndf = pd.read_json(\"data_64.json\")\n\n# Assume the first column is the primary key\nprimary_key = df.columns[0]\n\n# Drop rows with null PKs\ndf = df.dropna(subset=[primary_key])\n\n# Clean whitespace and lower strings\nfor col in df.select_dtypes(include=\"object\"):\n df[col] = df[col].str.strip().str.lower()\n\n# Connect to Snowflake\nimport snowflake.connector\nconn = snowflake.connector.connect(\n user='USER', password='PASSWORD', account='ACCOUNT'\n)\ncur = conn.cursor()\n\n# Create the table\ncur.execute(\"CREATE OR REPLACE TABLE etl_table_64 (col1 VARCHAR, col2 VARCHAR, col3 VARCHAR, col4 VARCHAR)\")\n\n# Insert the data\nfor _, row in df.iterrows():\n cur.execute(\n \"INSERT INTO etl_table_64 (col1, col2, col3, col4) VALUES (%s, %s, %s, %s)\",\n tuple(row)\n )\n\nconn.commit()\nconn.close()\n```" } ]
[ { "from": "human", "value": "Write an ETL pipeline in Python to load `data_65.json` into Snowflake. The pipeline should:\n- Load the `JSON` file\n- Automatically detect the primary key\n- Clean whitespace and nulls\n- Normalize data\n- Load the cleaned data into a Snowflake table named `etl_table_65`" }, { "from": "gpt", "value": "```python\nimport pandas as pd\n\n# Load the file\ndf = pd.read_json(\"data_65.json\")\n\n# Assume the first column is the primary key\nprimary_key = df.columns[0]\n\n# Drop rows with null PKs\ndf = df.dropna(subset=[primary_key])\n\n# Clean whitespace and lower strings\nfor col in df.select_dtypes(include=\"object\"):\n df[col] = df[col].str.strip().str.lower()\n\n# Connect to Snowflake\nimport snowflake.connector\nconn = snowflake.connector.connect(\n user='USER', password='PASSWORD', account='ACCOUNT'\n)\ncur = conn.cursor()\n\n# Create the table\ncur.execute(\"CREATE OR REPLACE TABLE etl_table_65 (col1 VARCHAR, col2 VARCHAR, col3 VARCHAR, col4 VARCHAR)\")\n\n# Insert the data\nfor _, row in df.iterrows():\n cur.execute(\n \"INSERT INTO etl_table_65 (col1, col2, col3, col4) VALUES (%s, %s, %s, %s)\",\n tuple(row)\n )\n\nconn.commit()\nconn.close()\n```" } ]
[ { "from": "human", "value": "Write an ETL pipeline in Python to load `data_66.csv` into Snowflake. The pipeline should:\n- Load the `CSV` file\n- Automatically detect the primary key\n- Clean whitespace and nulls\n- Normalize data\n- Load the cleaned data into a Snowflake table named `etl_table_66`" }, { "from": "gpt", "value": "```python\nimport pandas as pd\n\n# Load the file\ndf = pd.read_csv(\"data_66.csv\")\n\n# Assume the first column is the primary key\nprimary_key = df.columns[0]\n\n# Drop rows with null PKs\ndf = df.dropna(subset=[primary_key])\n\n# Clean whitespace and lower strings\nfor col in df.select_dtypes(include=\"object\"):\n df[col] = df[col].str.strip().str.lower()\n\n# Connect to Snowflake\nimport snowflake.connector\nconn = snowflake.connector.connect(\n user='USER', password='PASSWORD', account='ACCOUNT'\n)\ncur = conn.cursor()\n\n# Create the table\ncur.execute(\"CREATE OR REPLACE TABLE etl_table_66 (col1 VARCHAR, col2 VARCHAR, col3 VARCHAR, col4 VARCHAR)\")\n\n# Insert the data\nfor _, row in df.iterrows():\n cur.execute(\n \"INSERT INTO etl_table_66 (col1, col2, col3, col4) VALUES (%s, %s, %s, %s)\",\n tuple(row)\n )\n\nconn.commit()\nconn.close()\n```" } ]
[ { "from": "human", "value": "Write an ETL pipeline in Python to load `data_67.json` into Snowflake. The pipeline should:\n- Load the `JSON` file\n- Automatically detect the primary key\n- Clean whitespace and nulls\n- Normalize data\n- Load the cleaned data into a Snowflake table named `etl_table_67`" }, { "from": "gpt", "value": "```python\nimport pandas as pd\n\n# Load the file\ndf = pd.read_csv(\"data_67.csv\")\n\n# Assume the first column is the primary key\nprimary_key = df.columns[0]\n\n# Drop rows with null PKs\ndf = df.dropna(subset=[primary_key])\n\n# Clean whitespace and lower strings\nfor col in df.select_dtypes(include=\"object\"):\n df[col] = df[col].str.strip().str.lower()\n\n# Connect to Snowflake\nimport snowflake.connector\nconn = snowflake.connector.connect(\n user='USER', password='PASSWORD', account='ACCOUNT'\n)\ncur = conn.cursor()\n\n# Create the table\ncur.execute(\"CREATE OR REPLACE TABLE etl_table_67 (col1 VARCHAR, col2 VARCHAR, col3 VARCHAR, col4 VARCHAR)\")\n\n# Insert the data\nfor _, row in df.iterrows():\n cur.execute(\n \"INSERT INTO etl_table_67 (col1, col2, col3, col4) VALUES (%s, %s, %s, %s)\",\n tuple(row)\n )\n\nconn.commit()\nconn.close()\n```" } ]
[ { "from": "human", "value": "Write an ETL pipeline in Python to load `data_68.csv` into Snowflake. The pipeline should:\n- Load the `CSV` file\n- Automatically detect the primary key\n- Clean whitespace and nulls\n- Normalize data\n- Load the cleaned data into a Snowflake table named `etl_table_68`" }, { "from": "gpt", "value": "```python\nimport pandas as pd\n\n# Load the file\ndf = pd.read_csv(\"data_68.csv\")\n\n# Assume the first column is the primary key\nprimary_key = df.columns[0]\n\n# Drop rows with null PKs\ndf = df.dropna(subset=[primary_key])\n\n# Clean whitespace and lower strings\nfor col in df.select_dtypes(include=\"object\"):\n df[col] = df[col].str.strip().str.lower()\n\n# Connect to Snowflake\nimport snowflake.connector\nconn = snowflake.connector.connect(\n user='USER', password='PASSWORD', account='ACCOUNT'\n)\ncur = conn.cursor()\n\n# Create the table\ncur.execute(\"CREATE OR REPLACE TABLE etl_table_68 (col1 VARCHAR, col2 VARCHAR, col3 VARCHAR, col4 VARCHAR)\")\n\n# Insert the data\nfor _, row in df.iterrows():\n cur.execute(\n \"INSERT INTO etl_table_68 (col1, col2, col3, col4) VALUES (%s, %s, %s, %s)\",\n tuple(row)\n )\n\nconn.commit()\nconn.close()\n```" } ]
[ { "from": "human", "value": "Write an ETL pipeline in Python to load `data_69.csv` into Snowflake. The pipeline should:\n- Load the `CSV` file\n- Automatically detect the primary key\n- Clean whitespace and nulls\n- Normalize data\n- Load the cleaned data into a Snowflake table named `etl_table_69`" }, { "from": "gpt", "value": "```python\nimport pandas as pd\n\n# Load the file\ndf = pd.read_json(\"data_69.json\")\n\n# Assume the first column is the primary key\nprimary_key = df.columns[0]\n\n# Drop rows with null PKs\ndf = df.dropna(subset=[primary_key])\n\n# Clean whitespace and lower strings\nfor col in df.select_dtypes(include=\"object\"):\n df[col] = df[col].str.strip().str.lower()\n\n# Connect to Snowflake\nimport snowflake.connector\nconn = snowflake.connector.connect(\n user='USER', password='PASSWORD', account='ACCOUNT'\n)\ncur = conn.cursor()\n\n# Create the table\ncur.execute(\"CREATE OR REPLACE TABLE etl_table_69 (col1 VARCHAR, col2 VARCHAR, col3 VARCHAR, col4 VARCHAR)\")\n\n# Insert the data\nfor _, row in df.iterrows():\n cur.execute(\n \"INSERT INTO etl_table_69 (col1, col2, col3, col4) VALUES (%s, %s, %s, %s)\",\n tuple(row)\n )\n\nconn.commit()\nconn.close()\n```" } ]
[ { "from": "human", "value": "Write an ETL pipeline in Python to load `data_70.json` into Snowflake. The pipeline should:\n- Load the `JSON` file\n- Automatically detect the primary key\n- Clean whitespace and nulls\n- Normalize data\n- Load the cleaned data into a Snowflake table named `etl_table_70`" }, { "from": "gpt", "value": "```python\nimport pandas as pd\n\n# Load the file\ndf = pd.read_json(\"data_70.json\")\n\n# Assume the first column is the primary key\nprimary_key = df.columns[0]\n\n# Drop rows with null PKs\ndf = df.dropna(subset=[primary_key])\n\n# Clean whitespace and lower strings\nfor col in df.select_dtypes(include=\"object\"):\n df[col] = df[col].str.strip().str.lower()\n\n# Connect to Snowflake\nimport snowflake.connector\nconn = snowflake.connector.connect(\n user='USER', password='PASSWORD', account='ACCOUNT'\n)\ncur = conn.cursor()\n\n# Create the table\ncur.execute(\"CREATE OR REPLACE TABLE etl_table_70 (col1 VARCHAR, col2 VARCHAR, col3 VARCHAR, col4 VARCHAR)\")\n\n# Insert the data\nfor _, row in df.iterrows():\n cur.execute(\n \"INSERT INTO etl_table_70 (col1, col2, col3, col4) VALUES (%s, %s, %s, %s)\",\n tuple(row)\n )\n\nconn.commit()\nconn.close()\n```" } ]
[ { "from": "human", "value": "Write an ETL pipeline in Python to load `data_71.json` into Snowflake. The pipeline should:\n- Load the `JSON` file\n- Automatically detect the primary key\n- Clean whitespace and nulls\n- Normalize data\n- Load the cleaned data into a Snowflake table named `etl_table_71`" }, { "from": "gpt", "value": "```python\nimport pandas as pd\n\n# Load the file\ndf = pd.read_json(\"data_71.json\")\n\n# Assume the first column is the primary key\nprimary_key = df.columns[0]\n\n# Drop rows with null PKs\ndf = df.dropna(subset=[primary_key])\n\n# Clean whitespace and lower strings\nfor col in df.select_dtypes(include=\"object\"):\n df[col] = df[col].str.strip().str.lower()\n\n# Connect to Snowflake\nimport snowflake.connector\nconn = snowflake.connector.connect(\n user='USER', password='PASSWORD', account='ACCOUNT'\n)\ncur = conn.cursor()\n\n# Create the table\ncur.execute(\"CREATE OR REPLACE TABLE etl_table_71 (col1 VARCHAR, col2 VARCHAR, col3 VARCHAR, col4 VARCHAR)\")\n\n# Insert the data\nfor _, row in df.iterrows():\n cur.execute(\n \"INSERT INTO etl_table_71 (col1, col2, col3, col4) VALUES (%s, %s, %s, %s)\",\n tuple(row)\n )\n\nconn.commit()\nconn.close()\n```" } ]
[ { "from": "human", "value": "Write an ETL pipeline in Python to load `data_72.csv` into Snowflake. The pipeline should:\n- Load the `CSV` file\n- Automatically detect the primary key\n- Clean whitespace and nulls\n- Normalize data\n- Load the cleaned data into a Snowflake table named `etl_table_72`" }, { "from": "gpt", "value": "```python\nimport pandas as pd\n\n# Load the file\ndf = pd.read_json(\"data_72.json\")\n\n# Assume the first column is the primary key\nprimary_key = df.columns[0]\n\n# Drop rows with null PKs\ndf = df.dropna(subset=[primary_key])\n\n# Clean whitespace and lower strings\nfor col in df.select_dtypes(include=\"object\"):\n df[col] = df[col].str.strip().str.lower()\n\n# Connect to Snowflake\nimport snowflake.connector\nconn = snowflake.connector.connect(\n user='USER', password='PASSWORD', account='ACCOUNT'\n)\ncur = conn.cursor()\n\n# Create the table\ncur.execute(\"CREATE OR REPLACE TABLE etl_table_72 (col1 VARCHAR, col2 VARCHAR, col3 VARCHAR, col4 VARCHAR)\")\n\n# Insert the data\nfor _, row in df.iterrows():\n cur.execute(\n \"INSERT INTO etl_table_72 (col1, col2, col3, col4) VALUES (%s, %s, %s, %s)\",\n tuple(row)\n )\n\nconn.commit()\nconn.close()\n```" } ]
[ { "from": "human", "value": "Write an ETL pipeline in Python to load `data_73.json` into Snowflake. The pipeline should:\n- Load the `JSON` file\n- Automatically detect the primary key\n- Clean whitespace and nulls\n- Normalize data\n- Load the cleaned data into a Snowflake table named `etl_table_73`" }, { "from": "gpt", "value": "```python\nimport pandas as pd\n\n# Load the file\ndf = pd.read_json(\"data_73.json\")\n\n# Assume the first column is the primary key\nprimary_key = df.columns[0]\n\n# Drop rows with null PKs\ndf = df.dropna(subset=[primary_key])\n\n# Clean whitespace and lower strings\nfor col in df.select_dtypes(include=\"object\"):\n df[col] = df[col].str.strip().str.lower()\n\n# Connect to Snowflake\nimport snowflake.connector\nconn = snowflake.connector.connect(\n user='USER', password='PASSWORD', account='ACCOUNT'\n)\ncur = conn.cursor()\n\n# Create the table\ncur.execute(\"CREATE OR REPLACE TABLE etl_table_73 (col1 VARCHAR, col2 VARCHAR, col3 VARCHAR, col4 VARCHAR)\")\n\n# Insert the data\nfor _, row in df.iterrows():\n cur.execute(\n \"INSERT INTO etl_table_73 (col1, col2, col3, col4) VALUES (%s, %s, %s, %s)\",\n tuple(row)\n )\n\nconn.commit()\nconn.close()\n```" } ]
[ { "from": "human", "value": "Write an ETL pipeline in Python to load `data_74.csv` into Snowflake. The pipeline should:\n- Load the `CSV` file\n- Automatically detect the primary key\n- Clean whitespace and nulls\n- Normalize data\n- Load the cleaned data into a Snowflake table named `etl_table_74`" }, { "from": "gpt", "value": "```python\nimport pandas as pd\n\n# Load the file\ndf = pd.read_json(\"data_74.json\")\n\n# Assume the first column is the primary key\nprimary_key = df.columns[0]\n\n# Drop rows with null PKs\ndf = df.dropna(subset=[primary_key])\n\n# Clean whitespace and lower strings\nfor col in df.select_dtypes(include=\"object\"):\n df[col] = df[col].str.strip().str.lower()\n\n# Connect to Snowflake\nimport snowflake.connector\nconn = snowflake.connector.connect(\n user='USER', password='PASSWORD', account='ACCOUNT'\n)\ncur = conn.cursor()\n\n# Create the table\ncur.execute(\"CREATE OR REPLACE TABLE etl_table_74 (col1 VARCHAR, col2 VARCHAR, col3 VARCHAR, col4 VARCHAR)\")\n\n# Insert the data\nfor _, row in df.iterrows():\n cur.execute(\n \"INSERT INTO etl_table_74 (col1, col2, col3, col4) VALUES (%s, %s, %s, %s)\",\n tuple(row)\n )\n\nconn.commit()\nconn.close()\n```" } ]
[ { "from": "human", "value": "Write an ETL pipeline in Python to load `data_75.json` into Snowflake. The pipeline should:\n- Load the `JSON` file\n- Automatically detect the primary key\n- Clean whitespace and nulls\n- Normalize data\n- Load the cleaned data into a Snowflake table named `etl_table_75`" }, { "from": "gpt", "value": "```python\nimport pandas as pd\n\n# Load the file\ndf = pd.read_json(\"data_75.json\")\n\n# Assume the first column is the primary key\nprimary_key = df.columns[0]\n\n# Drop rows with null PKs\ndf = df.dropna(subset=[primary_key])\n\n# Clean whitespace and lower strings\nfor col in df.select_dtypes(include=\"object\"):\n df[col] = df[col].str.strip().str.lower()\n\n# Connect to Snowflake\nimport snowflake.connector\nconn = snowflake.connector.connect(\n user='USER', password='PASSWORD', account='ACCOUNT'\n)\ncur = conn.cursor()\n\n# Create the table\ncur.execute(\"CREATE OR REPLACE TABLE etl_table_75 (col1 VARCHAR, col2 VARCHAR, col3 VARCHAR, col4 VARCHAR)\")\n\n# Insert the data\nfor _, row in df.iterrows():\n cur.execute(\n \"INSERT INTO etl_table_75 (col1, col2, col3, col4) VALUES (%s, %s, %s, %s)\",\n tuple(row)\n )\n\nconn.commit()\nconn.close()\n```" } ]
[ { "from": "human", "value": "Write an ETL pipeline in Python to load `data_76.json` into Snowflake. The pipeline should:\n- Load the `JSON` file\n- Automatically detect the primary key\n- Clean whitespace and nulls\n- Normalize data\n- Load the cleaned data into a Snowflake table named `etl_table_76`" }, { "from": "gpt", "value": "```python\nimport pandas as pd\n\n# Load the file\ndf = pd.read_csv(\"data_76.csv\")\n\n# Assume the first column is the primary key\nprimary_key = df.columns[0]\n\n# Drop rows with null PKs\ndf = df.dropna(subset=[primary_key])\n\n# Clean whitespace and lower strings\nfor col in df.select_dtypes(include=\"object\"):\n df[col] = df[col].str.strip().str.lower()\n\n# Connect to Snowflake\nimport snowflake.connector\nconn = snowflake.connector.connect(\n user='USER', password='PASSWORD', account='ACCOUNT'\n)\ncur = conn.cursor()\n\n# Create the table\ncur.execute(\"CREATE OR REPLACE TABLE etl_table_76 (col1 VARCHAR, col2 VARCHAR, col3 VARCHAR, col4 VARCHAR)\")\n\n# Insert the data\nfor _, row in df.iterrows():\n cur.execute(\n \"INSERT INTO etl_table_76 (col1, col2, col3, col4) VALUES (%s, %s, %s, %s)\",\n tuple(row)\n )\n\nconn.commit()\nconn.close()\n```" } ]
[ { "from": "human", "value": "Write an ETL pipeline in Python to load `data_77.csv` into Snowflake. The pipeline should:\n- Load the `CSV` file\n- Automatically detect the primary key\n- Clean whitespace and nulls\n- Normalize data\n- Load the cleaned data into a Snowflake table named `etl_table_77`" }, { "from": "gpt", "value": "```python\nimport pandas as pd\n\n# Load the file\ndf = pd.read_json(\"data_77.json\")\n\n# Assume the first column is the primary key\nprimary_key = df.columns[0]\n\n# Drop rows with null PKs\ndf = df.dropna(subset=[primary_key])\n\n# Clean whitespace and lower strings\nfor col in df.select_dtypes(include=\"object\"):\n df[col] = df[col].str.strip().str.lower()\n\n# Connect to Snowflake\nimport snowflake.connector\nconn = snowflake.connector.connect(\n user='USER', password='PASSWORD', account='ACCOUNT'\n)\ncur = conn.cursor()\n\n# Create the table\ncur.execute(\"CREATE OR REPLACE TABLE etl_table_77 (col1 VARCHAR, col2 VARCHAR, col3 VARCHAR, col4 VARCHAR)\")\n\n# Insert the data\nfor _, row in df.iterrows():\n cur.execute(\n \"INSERT INTO etl_table_77 (col1, col2, col3, col4) VALUES (%s, %s, %s, %s)\",\n tuple(row)\n )\n\nconn.commit()\nconn.close()\n```" } ]
[ { "from": "human", "value": "Write an ETL pipeline in Python to load `data_78.json` into Snowflake. The pipeline should:\n- Load the `JSON` file\n- Automatically detect the primary key\n- Clean whitespace and nulls\n- Normalize data\n- Load the cleaned data into a Snowflake table named `etl_table_78`" }, { "from": "gpt", "value": "```python\nimport pandas as pd\n\n# Load the file\ndf = pd.read_json(\"data_78.json\")\n\n# Assume the first column is the primary key\nprimary_key = df.columns[0]\n\n# Drop rows with null PKs\ndf = df.dropna(subset=[primary_key])\n\n# Clean whitespace and lower strings\nfor col in df.select_dtypes(include=\"object\"):\n df[col] = df[col].str.strip().str.lower()\n\n# Connect to Snowflake\nimport snowflake.connector\nconn = snowflake.connector.connect(\n user='USER', password='PASSWORD', account='ACCOUNT'\n)\ncur = conn.cursor()\n\n# Create the table\ncur.execute(\"CREATE OR REPLACE TABLE etl_table_78 (col1 VARCHAR, col2 VARCHAR, col3 VARCHAR, col4 VARCHAR)\")\n\n# Insert the data\nfor _, row in df.iterrows():\n cur.execute(\n \"INSERT INTO etl_table_78 (col1, col2, col3, col4) VALUES (%s, %s, %s, %s)\",\n tuple(row)\n )\n\nconn.commit()\nconn.close()\n```" } ]
[ { "from": "human", "value": "Write an ETL pipeline in Python to load `data_79.csv` into Snowflake. The pipeline should:\n- Load the `CSV` file\n- Automatically detect the primary key\n- Clean whitespace and nulls\n- Normalize data\n- Load the cleaned data into a Snowflake table named `etl_table_79`" }, { "from": "gpt", "value": "```python\nimport pandas as pd\n\n# Load the file\ndf = pd.read_json(\"data_79.json\")\n\n# Assume the first column is the primary key\nprimary_key = df.columns[0]\n\n# Drop rows with null PKs\ndf = df.dropna(subset=[primary_key])\n\n# Clean whitespace and lower strings\nfor col in df.select_dtypes(include=\"object\"):\n df[col] = df[col].str.strip().str.lower()\n\n# Connect to Snowflake\nimport snowflake.connector\nconn = snowflake.connector.connect(\n user='USER', password='PASSWORD', account='ACCOUNT'\n)\ncur = conn.cursor()\n\n# Create the table\ncur.execute(\"CREATE OR REPLACE TABLE etl_table_79 (col1 VARCHAR, col2 VARCHAR, col3 VARCHAR, col4 VARCHAR)\")\n\n# Insert the data\nfor _, row in df.iterrows():\n cur.execute(\n \"INSERT INTO etl_table_79 (col1, col2, col3, col4) VALUES (%s, %s, %s, %s)\",\n tuple(row)\n )\n\nconn.commit()\nconn.close()\n```" } ]
[ { "from": "human", "value": "Write an ETL pipeline in Python to load `data_80.csv` into Snowflake. The pipeline should:\n- Load the `CSV` file\n- Automatically detect the primary key\n- Clean whitespace and nulls\n- Normalize data\n- Load the cleaned data into a Snowflake table named `etl_table_80`" }, { "from": "gpt", "value": "```python\nimport pandas as pd\n\n# Load the file\ndf = pd.read_csv(\"data_80.csv\")\n\n# Assume the first column is the primary key\nprimary_key = df.columns[0]\n\n# Drop rows with null PKs\ndf = df.dropna(subset=[primary_key])\n\n# Clean whitespace and lower strings\nfor col in df.select_dtypes(include=\"object\"):\n df[col] = df[col].str.strip().str.lower()\n\n# Connect to Snowflake\nimport snowflake.connector\nconn = snowflake.connector.connect(\n user='USER', password='PASSWORD', account='ACCOUNT'\n)\ncur = conn.cursor()\n\n# Create the table\ncur.execute(\"CREATE OR REPLACE TABLE etl_table_80 (col1 VARCHAR, col2 VARCHAR, col3 VARCHAR, col4 VARCHAR)\")\n\n# Insert the data\nfor _, row in df.iterrows():\n cur.execute(\n \"INSERT INTO etl_table_80 (col1, col2, col3, col4) VALUES (%s, %s, %s, %s)\",\n tuple(row)\n )\n\nconn.commit()\nconn.close()\n```" } ]
[ { "from": "human", "value": "Write an ETL pipeline in Python to load `data_81.json` into Snowflake. The pipeline should:\n- Load the `JSON` file\n- Automatically detect the primary key\n- Clean whitespace and nulls\n- Normalize data\n- Load the cleaned data into a Snowflake table named `etl_table_81`" }, { "from": "gpt", "value": "```python\nimport pandas as pd\n\n# Load the file\ndf = pd.read_csv(\"data_81.csv\")\n\n# Assume the first column is the primary key\nprimary_key = df.columns[0]\n\n# Drop rows with null PKs\ndf = df.dropna(subset=[primary_key])\n\n# Clean whitespace and lower strings\nfor col in df.select_dtypes(include=\"object\"):\n df[col] = df[col].str.strip().str.lower()\n\n# Connect to Snowflake\nimport snowflake.connector\nconn = snowflake.connector.connect(\n user='USER', password='PASSWORD', account='ACCOUNT'\n)\ncur = conn.cursor()\n\n# Create the table\ncur.execute(\"CREATE OR REPLACE TABLE etl_table_81 (col1 VARCHAR, col2 VARCHAR, col3 VARCHAR, col4 VARCHAR)\")\n\n# Insert the data\nfor _, row in df.iterrows():\n cur.execute(\n \"INSERT INTO etl_table_81 (col1, col2, col3, col4) VALUES (%s, %s, %s, %s)\",\n tuple(row)\n )\n\nconn.commit()\nconn.close()\n```" } ]
[ { "from": "human", "value": "Write an ETL pipeline in Python to load `data_82.json` into Snowflake. The pipeline should:\n- Load the `JSON` file\n- Automatically detect the primary key\n- Clean whitespace and nulls\n- Normalize data\n- Load the cleaned data into a Snowflake table named `etl_table_82`" }, { "from": "gpt", "value": "```python\nimport pandas as pd\n\n# Load the file\ndf = pd.read_csv(\"data_82.csv\")\n\n# Assume the first column is the primary key\nprimary_key = df.columns[0]\n\n# Drop rows with null PKs\ndf = df.dropna(subset=[primary_key])\n\n# Clean whitespace and lower strings\nfor col in df.select_dtypes(include=\"object\"):\n df[col] = df[col].str.strip().str.lower()\n\n# Connect to Snowflake\nimport snowflake.connector\nconn = snowflake.connector.connect(\n user='USER', password='PASSWORD', account='ACCOUNT'\n)\ncur = conn.cursor()\n\n# Create the table\ncur.execute(\"CREATE OR REPLACE TABLE etl_table_82 (col1 VARCHAR, col2 VARCHAR, col3 VARCHAR, col4 VARCHAR)\")\n\n# Insert the data\nfor _, row in df.iterrows():\n cur.execute(\n \"INSERT INTO etl_table_82 (col1, col2, col3, col4) VALUES (%s, %s, %s, %s)\",\n tuple(row)\n )\n\nconn.commit()\nconn.close()\n```" } ]
[ { "from": "human", "value": "Write an ETL pipeline in Python to load `data_83.csv` into Snowflake. The pipeline should:\n- Load the `CSV` file\n- Automatically detect the primary key\n- Clean whitespace and nulls\n- Normalize data\n- Load the cleaned data into a Snowflake table named `etl_table_83`" }, { "from": "gpt", "value": "```python\nimport pandas as pd\n\n# Load the file\ndf = pd.read_json(\"data_83.json\")\n\n# Assume the first column is the primary key\nprimary_key = df.columns[0]\n\n# Drop rows with null PKs\ndf = df.dropna(subset=[primary_key])\n\n# Clean whitespace and lower strings\nfor col in df.select_dtypes(include=\"object\"):\n df[col] = df[col].str.strip().str.lower()\n\n# Connect to Snowflake\nimport snowflake.connector\nconn = snowflake.connector.connect(\n user='USER', password='PASSWORD', account='ACCOUNT'\n)\ncur = conn.cursor()\n\n# Create the table\ncur.execute(\"CREATE OR REPLACE TABLE etl_table_83 (col1 VARCHAR, col2 VARCHAR, col3 VARCHAR, col4 VARCHAR)\")\n\n# Insert the data\nfor _, row in df.iterrows():\n cur.execute(\n \"INSERT INTO etl_table_83 (col1, col2, col3, col4) VALUES (%s, %s, %s, %s)\",\n tuple(row)\n )\n\nconn.commit()\nconn.close()\n```" } ]
[ { "from": "human", "value": "Write an ETL pipeline in Python to load `data_84.csv` into Snowflake. The pipeline should:\n- Load the `CSV` file\n- Automatically detect the primary key\n- Clean whitespace and nulls\n- Normalize data\n- Load the cleaned data into a Snowflake table named `etl_table_84`" }, { "from": "gpt", "value": "```python\nimport pandas as pd\n\n# Load the file\ndf = pd.read_csv(\"data_84.csv\")\n\n# Assume the first column is the primary key\nprimary_key = df.columns[0]\n\n# Drop rows with null PKs\ndf = df.dropna(subset=[primary_key])\n\n# Clean whitespace and lower strings\nfor col in df.select_dtypes(include=\"object\"):\n df[col] = df[col].str.strip().str.lower()\n\n# Connect to Snowflake\nimport snowflake.connector\nconn = snowflake.connector.connect(\n user='USER', password='PASSWORD', account='ACCOUNT'\n)\ncur = conn.cursor()\n\n# Create the table\ncur.execute(\"CREATE OR REPLACE TABLE etl_table_84 (col1 VARCHAR, col2 VARCHAR, col3 VARCHAR, col4 VARCHAR)\")\n\n# Insert the data\nfor _, row in df.iterrows():\n cur.execute(\n \"INSERT INTO etl_table_84 (col1, col2, col3, col4) VALUES (%s, %s, %s, %s)\",\n tuple(row)\n )\n\nconn.commit()\nconn.close()\n```" } ]
[ { "from": "human", "value": "Write an ETL pipeline in Python to load `data_85.json` into Snowflake. The pipeline should:\n- Load the `JSON` file\n- Automatically detect the primary key\n- Clean whitespace and nulls\n- Normalize data\n- Load the cleaned data into a Snowflake table named `etl_table_85`" }, { "from": "gpt", "value": "```python\nimport pandas as pd\n\n# Load the file\ndf = pd.read_csv(\"data_85.csv\")\n\n# Assume the first column is the primary key\nprimary_key = df.columns[0]\n\n# Drop rows with null PKs\ndf = df.dropna(subset=[primary_key])\n\n# Clean whitespace and lower strings\nfor col in df.select_dtypes(include=\"object\"):\n df[col] = df[col].str.strip().str.lower()\n\n# Connect to Snowflake\nimport snowflake.connector\nconn = snowflake.connector.connect(\n user='USER', password='PASSWORD', account='ACCOUNT'\n)\ncur = conn.cursor()\n\n# Create the table\ncur.execute(\"CREATE OR REPLACE TABLE etl_table_85 (col1 VARCHAR, col2 VARCHAR, col3 VARCHAR, col4 VARCHAR)\")\n\n# Insert the data\nfor _, row in df.iterrows():\n cur.execute(\n \"INSERT INTO etl_table_85 (col1, col2, col3, col4) VALUES (%s, %s, %s, %s)\",\n tuple(row)\n )\n\nconn.commit()\nconn.close()\n```" } ]
[ { "from": "human", "value": "Write an ETL pipeline in Python to load `data_86.csv` into Snowflake. The pipeline should:\n- Load the `CSV` file\n- Automatically detect the primary key\n- Clean whitespace and nulls\n- Normalize data\n- Load the cleaned data into a Snowflake table named `etl_table_86`" }, { "from": "gpt", "value": "```python\nimport pandas as pd\n\n# Load the file\ndf = pd.read_json(\"data_86.json\")\n\n# Assume the first column is the primary key\nprimary_key = df.columns[0]\n\n# Drop rows with null PKs\ndf = df.dropna(subset=[primary_key])\n\n# Clean whitespace and lower strings\nfor col in df.select_dtypes(include=\"object\"):\n df[col] = df[col].str.strip().str.lower()\n\n# Connect to Snowflake\nimport snowflake.connector\nconn = snowflake.connector.connect(\n user='USER', password='PASSWORD', account='ACCOUNT'\n)\ncur = conn.cursor()\n\n# Create the table\ncur.execute(\"CREATE OR REPLACE TABLE etl_table_86 (col1 VARCHAR, col2 VARCHAR, col3 VARCHAR, col4 VARCHAR)\")\n\n# Insert the data\nfor _, row in df.iterrows():\n cur.execute(\n \"INSERT INTO etl_table_86 (col1, col2, col3, col4) VALUES (%s, %s, %s, %s)\",\n tuple(row)\n )\n\nconn.commit()\nconn.close()\n```" } ]
[ { "from": "human", "value": "Write an ETL pipeline in Python to load `data_87.csv` into Snowflake. The pipeline should:\n- Load the `CSV` file\n- Automatically detect the primary key\n- Clean whitespace and nulls\n- Normalize data\n- Load the cleaned data into a Snowflake table named `etl_table_87`" }, { "from": "gpt", "value": "```python\nimport pandas as pd\n\n# Load the file\ndf = pd.read_json(\"data_87.json\")\n\n# Assume the first column is the primary key\nprimary_key = df.columns[0]\n\n# Drop rows with null PKs\ndf = df.dropna(subset=[primary_key])\n\n# Clean whitespace and lower strings\nfor col in df.select_dtypes(include=\"object\"):\n df[col] = df[col].str.strip().str.lower()\n\n# Connect to Snowflake\nimport snowflake.connector\nconn = snowflake.connector.connect(\n user='USER', password='PASSWORD', account='ACCOUNT'\n)\ncur = conn.cursor()\n\n# Create the table\ncur.execute(\"CREATE OR REPLACE TABLE etl_table_87 (col1 VARCHAR, col2 VARCHAR, col3 VARCHAR, col4 VARCHAR)\")\n\n# Insert the data\nfor _, row in df.iterrows():\n cur.execute(\n \"INSERT INTO etl_table_87 (col1, col2, col3, col4) VALUES (%s, %s, %s, %s)\",\n tuple(row)\n )\n\nconn.commit()\nconn.close()\n```" } ]
[ { "from": "human", "value": "Write an ETL pipeline in Python to load `data_88.json` into Snowflake. The pipeline should:\n- Load the `JSON` file\n- Automatically detect the primary key\n- Clean whitespace and nulls\n- Normalize data\n- Load the cleaned data into a Snowflake table named `etl_table_88`" }, { "from": "gpt", "value": "```python\nimport pandas as pd\n\n# Load the file\ndf = pd.read_csv(\"data_88.csv\")\n\n# Assume the first column is the primary key\nprimary_key = df.columns[0]\n\n# Drop rows with null PKs\ndf = df.dropna(subset=[primary_key])\n\n# Clean whitespace and lower strings\nfor col in df.select_dtypes(include=\"object\"):\n df[col] = df[col].str.strip().str.lower()\n\n# Connect to Snowflake\nimport snowflake.connector\nconn = snowflake.connector.connect(\n user='USER', password='PASSWORD', account='ACCOUNT'\n)\ncur = conn.cursor()\n\n# Create the table\ncur.execute(\"CREATE OR REPLACE TABLE etl_table_88 (col1 VARCHAR, col2 VARCHAR, col3 VARCHAR, col4 VARCHAR)\")\n\n# Insert the data\nfor _, row in df.iterrows():\n cur.execute(\n \"INSERT INTO etl_table_88 (col1, col2, col3, col4) VALUES (%s, %s, %s, %s)\",\n tuple(row)\n )\n\nconn.commit()\nconn.close()\n```" } ]
[ { "from": "human", "value": "Write an ETL pipeline in Python to load `data_89.csv` into Snowflake. The pipeline should:\n- Load the `CSV` file\n- Automatically detect the primary key\n- Clean whitespace and nulls\n- Normalize data\n- Load the cleaned data into a Snowflake table named `etl_table_89`" }, { "from": "gpt", "value": "```python\nimport pandas as pd\n\n# Load the file\ndf = pd.read_json(\"data_89.json\")\n\n# Assume the first column is the primary key\nprimary_key = df.columns[0]\n\n# Drop rows with null PKs\ndf = df.dropna(subset=[primary_key])\n\n# Clean whitespace and lower strings\nfor col in df.select_dtypes(include=\"object\"):\n df[col] = df[col].str.strip().str.lower()\n\n# Connect to Snowflake\nimport snowflake.connector\nconn = snowflake.connector.connect(\n user='USER', password='PASSWORD', account='ACCOUNT'\n)\ncur = conn.cursor()\n\n# Create the table\ncur.execute(\"CREATE OR REPLACE TABLE etl_table_89 (col1 VARCHAR, col2 VARCHAR, col3 VARCHAR, col4 VARCHAR)\")\n\n# Insert the data\nfor _, row in df.iterrows():\n cur.execute(\n \"INSERT INTO etl_table_89 (col1, col2, col3, col4) VALUES (%s, %s, %s, %s)\",\n tuple(row)\n )\n\nconn.commit()\nconn.close()\n```" } ]
[ { "from": "human", "value": "Write an ETL pipeline in Python to load `data_90.json` into Snowflake. The pipeline should:\n- Load the `JSON` file\n- Automatically detect the primary key\n- Clean whitespace and nulls\n- Normalize data\n- Load the cleaned data into a Snowflake table named `etl_table_90`" }, { "from": "gpt", "value": "```python\nimport pandas as pd\n\n# Load the file\ndf = pd.read_csv(\"data_90.csv\")\n\n# Assume the first column is the primary key\nprimary_key = df.columns[0]\n\n# Drop rows with null PKs\ndf = df.dropna(subset=[primary_key])\n\n# Clean whitespace and lower strings\nfor col in df.select_dtypes(include=\"object\"):\n df[col] = df[col].str.strip().str.lower()\n\n# Connect to Snowflake\nimport snowflake.connector\nconn = snowflake.connector.connect(\n user='USER', password='PASSWORD', account='ACCOUNT'\n)\ncur = conn.cursor()\n\n# Create the table\ncur.execute(\"CREATE OR REPLACE TABLE etl_table_90 (col1 VARCHAR, col2 VARCHAR, col3 VARCHAR, col4 VARCHAR)\")\n\n# Insert the data\nfor _, row in df.iterrows():\n cur.execute(\n \"INSERT INTO etl_table_90 (col1, col2, col3, col4) VALUES (%s, %s, %s, %s)\",\n tuple(row)\n )\n\nconn.commit()\nconn.close()\n```" } ]
[ { "from": "human", "value": "Write an ETL pipeline in Python to load `data_91.json` into Snowflake. The pipeline should:\n- Load the `JSON` file\n- Automatically detect the primary key\n- Clean whitespace and nulls\n- Normalize data\n- Load the cleaned data into a Snowflake table named `etl_table_91`" }, { "from": "gpt", "value": "```python\nimport pandas as pd\n\n# Load the file\ndf = pd.read_json(\"data_91.json\")\n\n# Assume the first column is the primary key\nprimary_key = df.columns[0]\n\n# Drop rows with null PKs\ndf = df.dropna(subset=[primary_key])\n\n# Clean whitespace and lower strings\nfor col in df.select_dtypes(include=\"object\"):\n df[col] = df[col].str.strip().str.lower()\n\n# Connect to Snowflake\nimport snowflake.connector\nconn = snowflake.connector.connect(\n user='USER', password='PASSWORD', account='ACCOUNT'\n)\ncur = conn.cursor()\n\n# Create the table\ncur.execute(\"CREATE OR REPLACE TABLE etl_table_91 (col1 VARCHAR, col2 VARCHAR, col3 VARCHAR, col4 VARCHAR)\")\n\n# Insert the data\nfor _, row in df.iterrows():\n cur.execute(\n \"INSERT INTO etl_table_91 (col1, col2, col3, col4) VALUES (%s, %s, %s, %s)\",\n tuple(row)\n )\n\nconn.commit()\nconn.close()\n```" } ]
[ { "from": "human", "value": "Write an ETL pipeline in Python to load `data_92.json` into Snowflake. The pipeline should:\n- Load the `JSON` file\n- Automatically detect the primary key\n- Clean whitespace and nulls\n- Normalize data\n- Load the cleaned data into a Snowflake table named `etl_table_92`" }, { "from": "gpt", "value": "```python\nimport pandas as pd\n\n# Load the file\ndf = pd.read_json(\"data_92.json\")\n\n# Assume the first column is the primary key\nprimary_key = df.columns[0]\n\n# Drop rows with null PKs\ndf = df.dropna(subset=[primary_key])\n\n# Clean whitespace and lower strings\nfor col in df.select_dtypes(include=\"object\"):\n df[col] = df[col].str.strip().str.lower()\n\n# Connect to Snowflake\nimport snowflake.connector\nconn = snowflake.connector.connect(\n user='USER', password='PASSWORD', account='ACCOUNT'\n)\ncur = conn.cursor()\n\n# Create the table\ncur.execute(\"CREATE OR REPLACE TABLE etl_table_92 (col1 VARCHAR, col2 VARCHAR, col3 VARCHAR, col4 VARCHAR)\")\n\n# Insert the data\nfor _, row in df.iterrows():\n cur.execute(\n \"INSERT INTO etl_table_92 (col1, col2, col3, col4) VALUES (%s, %s, %s, %s)\",\n tuple(row)\n )\n\nconn.commit()\nconn.close()\n```" } ]
[ { "from": "human", "value": "Write an ETL pipeline in Python to load `data_93.csv` into Snowflake. The pipeline should:\n- Load the `CSV` file\n- Automatically detect the primary key\n- Clean whitespace and nulls\n- Normalize data\n- Load the cleaned data into a Snowflake table named `etl_table_93`" }, { "from": "gpt", "value": "```python\nimport pandas as pd\n\n# Load the file\ndf = pd.read_json(\"data_93.json\")\n\n# Assume the first column is the primary key\nprimary_key = df.columns[0]\n\n# Drop rows with null PKs\ndf = df.dropna(subset=[primary_key])\n\n# Clean whitespace and lower strings\nfor col in df.select_dtypes(include=\"object\"):\n df[col] = df[col].str.strip().str.lower()\n\n# Connect to Snowflake\nimport snowflake.connector\nconn = snowflake.connector.connect(\n user='USER', password='PASSWORD', account='ACCOUNT'\n)\ncur = conn.cursor()\n\n# Create the table\ncur.execute(\"CREATE OR REPLACE TABLE etl_table_93 (col1 VARCHAR, col2 VARCHAR, col3 VARCHAR, col4 VARCHAR)\")\n\n# Insert the data\nfor _, row in df.iterrows():\n cur.execute(\n \"INSERT INTO etl_table_93 (col1, col2, col3, col4) VALUES (%s, %s, %s, %s)\",\n tuple(row)\n )\n\nconn.commit()\nconn.close()\n```" } ]
[ { "from": "human", "value": "Write an ETL pipeline in Python to load `data_94.json` into Snowflake. The pipeline should:\n- Load the `JSON` file\n- Automatically detect the primary key\n- Clean whitespace and nulls\n- Normalize data\n- Load the cleaned data into a Snowflake table named `etl_table_94`" }, { "from": "gpt", "value": "```python\nimport pandas as pd\n\n# Load the file\ndf = pd.read_json(\"data_94.json\")\n\n# Assume the first column is the primary key\nprimary_key = df.columns[0]\n\n# Drop rows with null PKs\ndf = df.dropna(subset=[primary_key])\n\n# Clean whitespace and lower strings\nfor col in df.select_dtypes(include=\"object\"):\n df[col] = df[col].str.strip().str.lower()\n\n# Connect to Snowflake\nimport snowflake.connector\nconn = snowflake.connector.connect(\n user='USER', password='PASSWORD', account='ACCOUNT'\n)\ncur = conn.cursor()\n\n# Create the table\ncur.execute(\"CREATE OR REPLACE TABLE etl_table_94 (col1 VARCHAR, col2 VARCHAR, col3 VARCHAR, col4 VARCHAR)\")\n\n# Insert the data\nfor _, row in df.iterrows():\n cur.execute(\n \"INSERT INTO etl_table_94 (col1, col2, col3, col4) VALUES (%s, %s, %s, %s)\",\n tuple(row)\n )\n\nconn.commit()\nconn.close()\n```" } ]
[ { "from": "human", "value": "Write an ETL pipeline in Python to load `data_95.json` into Snowflake. The pipeline should:\n- Load the `JSON` file\n- Automatically detect the primary key\n- Clean whitespace and nulls\n- Normalize data\n- Load the cleaned data into a Snowflake table named `etl_table_95`" }, { "from": "gpt", "value": "```python\nimport pandas as pd\n\n# Load the file\ndf = pd.read_json(\"data_95.json\")\n\n# Assume the first column is the primary key\nprimary_key = df.columns[0]\n\n# Drop rows with null PKs\ndf = df.dropna(subset=[primary_key])\n\n# Clean whitespace and lower strings\nfor col in df.select_dtypes(include=\"object\"):\n df[col] = df[col].str.strip().str.lower()\n\n# Connect to Snowflake\nimport snowflake.connector\nconn = snowflake.connector.connect(\n user='USER', password='PASSWORD', account='ACCOUNT'\n)\ncur = conn.cursor()\n\n# Create the table\ncur.execute(\"CREATE OR REPLACE TABLE etl_table_95 (col1 VARCHAR, col2 VARCHAR, col3 VARCHAR, col4 VARCHAR)\")\n\n# Insert the data\nfor _, row in df.iterrows():\n cur.execute(\n \"INSERT INTO etl_table_95 (col1, col2, col3, col4) VALUES (%s, %s, %s, %s)\",\n tuple(row)\n )\n\nconn.commit()\nconn.close()\n```" } ]
[ { "from": "human", "value": "Write an ETL pipeline in Python to load `data_96.csv` into Snowflake. The pipeline should:\n- Load the `CSV` file\n- Automatically detect the primary key\n- Clean whitespace and nulls\n- Normalize data\n- Load the cleaned data into a Snowflake table named `etl_table_96`" }, { "from": "gpt", "value": "```python\nimport pandas as pd\n\n# Load the file\ndf = pd.read_csv(\"data_96.csv\")\n\n# Assume the first column is the primary key\nprimary_key = df.columns[0]\n\n# Drop rows with null PKs\ndf = df.dropna(subset=[primary_key])\n\n# Clean whitespace and lower strings\nfor col in df.select_dtypes(include=\"object\"):\n df[col] = df[col].str.strip().str.lower()\n\n# Connect to Snowflake\nimport snowflake.connector\nconn = snowflake.connector.connect(\n user='USER', password='PASSWORD', account='ACCOUNT'\n)\ncur = conn.cursor()\n\n# Create the table\ncur.execute(\"CREATE OR REPLACE TABLE etl_table_96 (col1 VARCHAR, col2 VARCHAR, col3 VARCHAR, col4 VARCHAR)\")\n\n# Insert the data\nfor _, row in df.iterrows():\n cur.execute(\n \"INSERT INTO etl_table_96 (col1, col2, col3, col4) VALUES (%s, %s, %s, %s)\",\n tuple(row)\n )\n\nconn.commit()\nconn.close()\n```" } ]
[ { "from": "human", "value": "Write an ETL pipeline in Python to load `data_97.json` into Snowflake. The pipeline should:\n- Load the `JSON` file\n- Automatically detect the primary key\n- Clean whitespace and nulls\n- Normalize data\n- Load the cleaned data into a Snowflake table named `etl_table_97`" }, { "from": "gpt", "value": "```python\nimport pandas as pd\n\n# Load the file\ndf = pd.read_json(\"data_97.json\")\n\n# Assume the first column is the primary key\nprimary_key = df.columns[0]\n\n# Drop rows with null PKs\ndf = df.dropna(subset=[primary_key])\n\n# Clean whitespace and lower strings\nfor col in df.select_dtypes(include=\"object\"):\n df[col] = df[col].str.strip().str.lower()\n\n# Connect to Snowflake\nimport snowflake.connector\nconn = snowflake.connector.connect(\n user='USER', password='PASSWORD', account='ACCOUNT'\n)\ncur = conn.cursor()\n\n# Create the table\ncur.execute(\"CREATE OR REPLACE TABLE etl_table_97 (col1 VARCHAR, col2 VARCHAR, col3 VARCHAR, col4 VARCHAR)\")\n\n# Insert the data\nfor _, row in df.iterrows():\n cur.execute(\n \"INSERT INTO etl_table_97 (col1, col2, col3, col4) VALUES (%s, %s, %s, %s)\",\n tuple(row)\n )\n\nconn.commit()\nconn.close()\n```" } ]
[ { "from": "human", "value": "Write an ETL pipeline in Python to load `data_98.csv` into Snowflake. The pipeline should:\n- Load the `CSV` file\n- Automatically detect the primary key\n- Clean whitespace and nulls\n- Normalize data\n- Load the cleaned data into a Snowflake table named `etl_table_98`" }, { "from": "gpt", "value": "```python\nimport pandas as pd\n\n# Load the file\ndf = pd.read_json(\"data_98.json\")\n\n# Assume the first column is the primary key\nprimary_key = df.columns[0]\n\n# Drop rows with null PKs\ndf = df.dropna(subset=[primary_key])\n\n# Clean whitespace and lower strings\nfor col in df.select_dtypes(include=\"object\"):\n df[col] = df[col].str.strip().str.lower()\n\n# Connect to Snowflake\nimport snowflake.connector\nconn = snowflake.connector.connect(\n user='USER', password='PASSWORD', account='ACCOUNT'\n)\ncur = conn.cursor()\n\n# Create the table\ncur.execute(\"CREATE OR REPLACE TABLE etl_table_98 (col1 VARCHAR, col2 VARCHAR, col3 VARCHAR, col4 VARCHAR)\")\n\n# Insert the data\nfor _, row in df.iterrows():\n cur.execute(\n \"INSERT INTO etl_table_98 (col1, col2, col3, col4) VALUES (%s, %s, %s, %s)\",\n tuple(row)\n )\n\nconn.commit()\nconn.close()\n```" } ]
[ { "from": "human", "value": "Write an ETL pipeline in Python to load `data_99.csv` into Snowflake. The pipeline should:\n- Load the `CSV` file\n- Automatically detect the primary key\n- Clean whitespace and nulls\n- Normalize data\n- Load the cleaned data into a Snowflake table named `etl_table_99`" }, { "from": "gpt", "value": "```python\nimport pandas as pd\n\n# Load the file\ndf = pd.read_csv(\"data_99.csv\")\n\n# Assume the first column is the primary key\nprimary_key = df.columns[0]\n\n# Drop rows with null PKs\ndf = df.dropna(subset=[primary_key])\n\n# Clean whitespace and lower strings\nfor col in df.select_dtypes(include=\"object\"):\n df[col] = df[col].str.strip().str.lower()\n\n# Connect to Snowflake\nimport snowflake.connector\nconn = snowflake.connector.connect(\n user='USER', password='PASSWORD', account='ACCOUNT'\n)\ncur = conn.cursor()\n\n# Create the table\ncur.execute(\"CREATE OR REPLACE TABLE etl_table_99 (col1 VARCHAR, col2 VARCHAR, col3 VARCHAR, col4 VARCHAR)\")\n\n# Insert the data\nfor _, row in df.iterrows():\n cur.execute(\n \"INSERT INTO etl_table_99 (col1, col2, col3, col4) VALUES (%s, %s, %s, %s)\",\n tuple(row)\n )\n\nconn.commit()\nconn.close()\n```" } ]

No dataset card yet

Downloads last month
4

Models trained or fine-tuned on PavanKumarn05030/etl-sharegpt-100