How to keep snowflake function as is without converting to a string in a component?

I have the following default values in the create table component

 

For the last 4 rows, the default values corresponds to a function but the SQL that is generated and ran sees it as a string text instead

0694G00000RrLdtQAF_0D54G00009HIdZhSAL

 

Is there a way to work around this?

 

Matillion ETL version: 1.61.6

Hi Brane,

 

SQL will interpret anything passed between single quotes as value directly. That is why you are getting it as string.

 

Try this one I have tested it:

TO_TIMESTAMP(CONVERT_TIMEZONE('EST',CURRENT_TIMESTAMP()))

Bumping this. Still looking for a solution to this

Yep, in a previous version, it was able to interpret that string as a function rather than a text value, was wondering if there's a way to still interpreting it as a function.

 

0694G00000RrNCGQA3_0D74G000008ypXpSAI

 

I tried what you suggested, it’s still seeing it as a text value rather than a function

Hi Brane, A screenshot would be helpful to understand for both query and output.

Create table component

 

Error message when running component

 

SQL query generated from component

0694G00000RrfToQAJ_0D74G000008yqCJSAY

Default value in create table components adds single quotes on the value so function will not work, you will have to use SQL Script component to create table, I am adding sample here:

 

CREATE TABLE "DB"."SCHEMA"."TABLE_NAME" (

"COLUMN_NAME" TIMESTAMP DEFAULT TO_TIMESTAMP(CONVERT_TIMEZONE('EST',CURRENT_TIMESTAMP()))

)

 

Thanks, that's what I'm currently doing as well.

 

However, this was working in a previous matillion version (job was running before with the correct default value but then after version upgrade, this no longer works).

Got you, Try matillion support chat to check on this on https://www.matillion.com/ --> Right bottom.