Skip to content

Commit bab5056

Browse files
Merge pull request #297390 from Clare-Zheng82/0331-Update_script_parameter_snowflake
[New feature] Add script parameter support for Snowflake
2 parents 8f29b24 + c17e4b6 commit bab5056

File tree

1 file changed

+18
-15
lines changed

1 file changed

+18
-15
lines changed

articles/data-factory/connector-snowflake.md

Lines changed: 18 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ This Snowflake connector is supported for the following capabilities:
2929
|[Copy activity](copy-activity-overview.md) (source/sink)|① ②|
3030
|[Mapping data flow](concepts-data-flow-overview.md) (source/sink)|① |
3131
|[Lookup activity](control-flow-lookup-activity.md)|① ②|
32-
|[Script activity](transform-data-using-script.md)|① ②|
32+
|[Script activity](transform-data-using-script.md) (Apply version 1.1 (Preview) when you use the script parameter)|① ②|
3333

3434
*① Azure integration runtime ② Self-hosted integration runtime*
3535

@@ -93,6 +93,7 @@ These generic properties are supported for the Snowflake linked service:
9393
| Property | Description | Required |
9494
| :--------------- | :----------------------------------------------------------- | :------- |
9595
| type | The type property must be set to **SnowflakeV2**. | Yes |
96+
| version | The version that you specify. Recommend upgrading to the latest version to take advantage of the newest enhancements. | Yes for version 1.1 (Preview) |
9697
| accountIdentifier | The name of the account along with its organization. For example, myorg-account123. | Yes |
9798
| database | The default database used for the session after connecting. | Yes |
9899
| warehouse | The default virtual warehouse used for the session after connecting. |Yes|
@@ -684,19 +685,29 @@ By setting the pipeline Logging Level to None, we exclude the transmission of in
684685

685686
For more information about the properties, see [Lookup activity](control-flow-lookup-activity.md).
686687

687-
## <a name="upgrade-the-snowflake-linked-service"></a> Upgrade the Snowflake connector
688+
## <a name="differences-between-snowflake-and-snowflake-legacy"></a> Snowflake connector lifecycle and upgrade
688689

689-
To upgrade the Snowflake connector, you can do a side-by-side upgrade, or an in-place upgrade.
690+
The following table shows the release stage and change logs for different versions of the Snowflake connector:
690691

691-
### Side-by-side upgrade
692+
| Version | Release stage | Change log |
693+
| :----------- | :------- |:------- |
694+
| Snowflake V1 | GA version available | / |
695+
| Snowflake V2 (version 1.0) | GA version available | • Add support for Key pair authentication.<br><br>• The `accountIdentifier`, `warehouse`, `database`, `schema` and `role` properties are used to establish a connection instead of `connectionstring` property.<br><br>• Add support for BigDecimal in Lookup activity. The NUMBER type, as defined in Snowflake, will be displayed as a string in Lookup activity. If you want to covert it to numeric type in V2, you can use the pipeline parameter with [int function](control-flow-expression-language-functions.md#int) or [float function](control-flow-expression-language-functions.md#float). For example, `int(activity('lookup').output.firstRow.VALUE)`, `float(activity('lookup').output.firstRow.VALUE)`<br><br>• timestamp data type in Snowflake is read as DateTimeOffset data type in Lookup and Script activity. If you still need to use the Datetime value as a parameter in your pipeline after upgrading to V2, you can convert DateTimeOffset type to DateTime type by using [formatDateTime function](control-flow-expression-language-functions.md#formatdatetime) (recommended) or [concat function](control-flow-expression-language-functions.md#concat). For example: `formatDateTime(activity('lookup').output.firstRow.DATETIMETYPE)`, `concat(substring(activity('lookup').output.firstRow.DATETIMETYPE, 0, 19), 'Z')`<br><br>• Script parameters are not supported in Script activity. As an alternative, utilize dynamic expressions for script parameters. For more information, see [Expressions and functions in Azure Data Factory and Azure Synapse Analytics](control-flow-expression-language-functions.md).<br><br>• Multiple SQL statements execution in Script activity is not supported. |
696+
| Snowflake V2 (version 1.1) | Preview version available | • Add support for script parameters.<br><br>• Add support for mutiple statement execution in Script activity. |
697+
698+
### <a name="upgrade-the-snowflake-linked-service"></a> Upgrade the Snowflake connector from V1 to V2
699+
700+
To upgrade the Snowflake connector from V1 to V2, you can do a side-by-side upgrade, or an in-place upgrade.
701+
702+
#### Side-by-side upgrade
692703

693704
To perform a side-by-side upgrade, complete the following steps:
694705

695706
1. Create a new Snowflake linked service and configure it by referring to the V2 linked service properties.
696707
1. Create a dataset based on the newly created Snowflake linked service.
697708
1. Replace the new linked service and dataset with the existing ones in the pipelines that targets the V1 objects.
698709

699-
### In-place upgrade
710+
#### In-place upgrade
700711

701712
To perform an in-place upgrade, you need to edit the existing linked service payload and update dataset to use the new linked service.
702713

@@ -756,17 +767,9 @@ To perform an in-place upgrade, you need to edit the existing linked service pay
756767

757768
1. Update dataset to use the new linked service. You can either create a new dataset based on the newly created linked service, or update an existing dataset's type property from **SnowflakeTable** to **SnowflakeV2Table**.
758769

759-
## <a name="differences-between-snowflake-and-snowflake-legacy"></a> Differences between Snowflake V2 and V1
760-
761-
The Snowflake V2 connector offers new functionalities and is compatible with most features of Snowflake V1 connector. The table below shows the feature differences between V2 and V1.
770+
### Upgrade the Snowflake V2 connector from version 1.0 to version 1.1 (Preview)
762771

763-
| Snowflake V2 | Snowflake V1 |
764-
| :----------- | :------- |
765-
| Support Basic and Key pair authentication. | Support Basic authentication. |
766-
| Script parameters are not supported in Script activity currently. As an alternative, utilize dynamic expressions for script parameters. For more information, see [Expressions and functions in Azure Data Factory and Azure Synapse Analytics](control-flow-expression-language-functions.md). | Support script parameters in Script activity. |
767-
| Support BigDecimal in Lookup activity. The NUMBER type, as defined in Snowflake, will be displayed as a string in Lookup activity. If you want to covert it to numeric type, you can use the pipeline parameter with [int function](control-flow-expression-language-functions.md#int) or [float function](control-flow-expression-language-functions.md#float). For example, `int(activity('lookup').output.firstRow.VALUE)`, `float(activity('lookup').output.firstRow.VALUE)`| BigDecimal is not supported in Lookup activity. |
768-
| The `accountIdentifier`, `warehouse`, `database`, `schema` and `role` properties are used to establish a connection. | The `connectionstring` property is used to establish a connection. |
769-
| timestamp data type in Snowflake is read as DateTimeOffset data type in Lookup and Script activity. | timestamp data type in Snowflake is read as DateTime data type in Lookup and Script activity.<br> If you still need to use the Datetime value as a parameter in your pipeline after upgrading the connector, you can convert DateTimeOffset type to DateTime type by using [formatDateTime function](control-flow-expression-language-functions.md#formatdatetime) (recommended) or [concat function](control-flow-expression-language-functions.md#concat). For example: `formatDateTime(activity('lookup').output.firstRow.DATETIMETYPE)`, `concat(substring(activity('lookup').output.firstRow.DATETIMETYPE, 0, 19), 'Z')`|
772+
In **Edit linked service** page, select 1.1 for version. For more information, see [Linked service properties](#linked-service-properties).
770773

771774
## Related content
772775

0 commit comments

Comments
 (0)