> For the complete documentation index, see [llms.txt](https://developer.harness.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.harness.io/feature-management-experimentation/management-and-administration/integrations/guides/export-events.md).

# Exporting Event Records from Snowflake to FME

Learn how to export event records from Snowflake to Harness FME.

Using the Amazon S3 events integration, you can import events data into Harness FME using Parquet formatted files. Snowflake provides an easy way to export records to Parquet files which can be used in the [S3 integration](/feature-management-experimentation/management-and-administration/integrations/amazon-s3.md).

Below is an example of what data types to use, the sample Snowflake table structure should be as follows:

```sql
name type 
TRAFFICTYPEID VARCHAR(16777216)
EVENTTYPEID VARCHAR(16777216)
KEY VARCHAR(16777216)
TIMESTAMP NUMBER(38,0) / TIMESTAMP_NTZ(3) 
VALUE FLOAT
FOREIGNID VARCHAR(16777216) 
PROPERTIES VARCHAR(16777216)
ENVIRONMENTID VARCHAR(16777216)
```

The following sample INSERT SQL statement represents the event data. The timestamp value is Epoch time in milliseconds:

```sql
INSERT INTO SPLIT_DEV.S3_SPLIT_TESTING.SNOWFLAKE_TESTING
(ENVIRONMENTID, TRAFFICTYPEID, EVENTTYPEID, KEY, TIMESTAMP, VALUE, PROPERTIES, FOREIGNID)
VALUES
('029bd160-7e36-11e8-9a1c-0acd31e5aef0', 'e6910420-5c85-11e9-bbc9-12a5cc2af8fe', 's3-glossier', 'key1', 1613757288000, 3.0, '{ "location": "us", "age": "30"}', NULL);
```

To generate the Parquet file to S3, use the command below and make sure you have a stage S3 configured:

```sql
USE SPLIT_DEV.S3_SPLIT_TESTING;
copy into @S3_INTEGRATION_TESTING/test2
from (select ENVIRONMENTID AS "environmentId",
             TRAFFICTYPEID AS "trafficTypeId",
             EVENTTYPEID AS "eventTypeId",
             KEY AS "key",
             TIMESTAMP AS "timestamp",
             VALUE AS "value",
             PROPERTIES AS "properties",
             FOREIGNID AS "foreignId"
      from SPLIT_DEV.S3_SPLIT_TESTING.SNOWFLAKE_TESTING t
      )
file_format=(type=parquet)
header = true;
```

{% @harness-feedback/feedback %}
