1
votes

I have an simple Azure Data Factory project aiming to copy data from an external service (Service Now) to an Azure Table Storage.

To keep things simple, consider source dataset only as an id and a creation Date:

ID, CreationDate
1 , 2020-05-02T10:00:00
2 , 2020-05-02T11:00:00

I want to copy it to the Azure Table with the same structure/columns, but I want to extract date from datetime column to use as Partition Key, and use the ID as Row Key (if possible, still maintaining the original ID column).

I think I need to use some expression to get the column values mapped to Partition/RowKey, but I didnĀ“t found any expression that help me.

@formatDateTime(????source.CreationDate????, 'yyyy-MM-dd')

Thanks in advance for any help with the correct expression for this scenario.

Regards,

1

1 Answers

0
votes

Based on test, the source column can't be referred in the dynamic content in Copy Activity.

You could try to add a column in the source dataset which extracts date from CreationDate column like this:

ID, CreationDate,ShortDate
1 , 2020-05-02T10:00:00,2020-05-02
2 , 2020-05-02T11:00:00,2020-05-02

then use ShortDate as Partition Key.