# How do I use variables to populate the filename to Snowflake table when loading files?

**URL:** <https://matillioncommunity.discourse.group/t/how-do-i-use-variables-to-populate-the-filename-to-snowflake-table-when-loading-files/1958>\
**Category:** Matillion ETL\
**Created:** [November 22, 2022, 2:42pm UTC](https://matillioncommunity.discourse.group/t/how-do-i-use-variables-to-populate-the-filename-to-snowflake-table-when-loading-files/1958 "2022-11-22T14:42:27Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![wayne.richard](https://avatars.discourse-cdn.com/v4/letter/w/e9c0ed/32.png) [@wayne.richard](https://matillioncommunity.discourse.group/u/wayne.richard)\
**Post date:** [November 22, 2022, 2:42pm UTC](https://matillioncommunity.discourse.group/t/how-do-i-use-variables-to-populate-the-filename-to-snowflake-table-when-loading-files/1958/1 "2022-11-22T14:42:27Z")

</div>

When I try to use the Azure BLOB Storage Load component to update a Snowflake table with a Grid variable. I get the following error:

SQL compilation error: error line 1 at position 67

invalid identifier '""'

&nbsp;

The error appears to be caused by the field list being blank. Here is the SQL that is failing:

 ![0694G00000OwYoJQAV_0D54G00008vXoBLSA0](https://us1.discourse-cdn.com/flex002/uploads/matillioncommunity/original/1X/a44685f89f670aefaf746805b75ea721f44e4629.png)

Here is a snapshot of my configuration for the component as well as how I am assigning the grid variable:

 ![0694G00000OwYqtQAF_0D54G00008vXoBLSA0](https://us1.discourse-cdn.com/flex002/uploads/matillioncommunity/original/1X/a505d3fa55a6cc333ed9e0b3fc220264391399a2.png)

Any assistance would be greatly appreciated. Thanks!

---

<div class="post-metadata">

**Author:** ![AnudeepK](https://avatars.discourse-cdn.com/v4/letter/a/e36b37/32.png) [@AnudeepK](https://matillioncommunity.discourse.group/u/AnudeepK)\
**Post date:** [December 12, 2022, 12:25am UTC](https://matillioncommunity.discourse.group/t/how-do-i-use-variables-to-populate-the-filename-to-snowflake-table-when-loading-files/1958/2 "2022-12-12T00:25:05Z")

</div>

You can use a select query for the copy command , which includes File metadata columns (metadata$filename etc) in your select command.
