Write a copy into command to load data from external stage to snowflake table.
Asked in the Technical round 1 stage. Because the target database is PostgreSQL, use the provided staging table as the external-stage representation and load valid rows into the target table.
project_id, client_name, service_line, project_date, billed_amount, and project_status for rows loaded by the statement.project_id.project_id ascending.| Column | Type | Description |
|---|---|---|
| project_id | VARCHAR(20) | Project identifier received from the external source |
| client_name | VARCHAR(100) | Client name from the source file |
| service_line | VARCHAR(80) | Advisory service line |
| project_date | VARCHAR(10) | Project date represented as YYYY-MM-DD text |
| billed_amount | VARCHAR(30) | Billed amount represented as text |
| project_status | VARCHAR(30) | Project lifecycle status |
| Column | Type | Description |
|---|---|---|
| project_idPK | INTEGER | Unique project identifier |
| client_name | VARCHAR(100) | Client name |
| service_line | VARCHAR(80) | Advisory service line |
| project_date | DATE | Project date |
| billed_amount | NUMERIC(12,2) | Amount billed for the project |
| project_status | VARCHAR(30) | Project lifecycle status |