question

BharatThatipally-7682 avatar image
0 Votes"
BharatThatipally-7682 asked BharatThatipally-7682 commented

Does ADF copy acitivity allow to format date using polybase.

I have a bunch of files for which i can use copy activity from azure portal using polybase, but i have a date value coming as string which i am unable to convert to date format.
I have tried other options like data flow task which take more time compared to polybase. Any help in converting incoming string to date using polybase from adf portal?

azure-data-factory
· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi @BharatThatipally-7682 ,

Welcome to Microsoft Q&A Portal. Thank you for posting your query.

Could you please share below details in order to provide detailed solution.

  • What is your Source datastore in Azure? and What is the format of file?

  • What is your Destination datastore type?

0 Votes 0 ·

Hi Maheer, Thank you for responding.

Below are the details.
Source: Azure data lake
file type: csv
Target: synapse table.



let me know for any other details required.

0 Votes 0 ·

1 Answer

ShaikMaheer-MSFT avatar image
0 Votes"
ShaikMaheer-MSFT answered BharatThatipally-7682 commented

Hi @BharatThatipally-7682 ,

Welcome to Microsoft Q&A Platform. Thank you for posting your Query.
To format Date values from source, use Copy activity Mappings tab and select Type as DateTime and define source format in it. Please check below screenshot for same.

107062-copyactivitydateformat.png

Hope this helps.


  • Please accept an answer if correct. Original posters help the community find answers faster by identifying the correct answer. Here is how.

  • Want a reminder to come back and check responses? Here is how to subscribe to a email-notifications


· 4
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

@ShaikMaheer-MSFT thank you for the solution provided. it worked.

I have one more query on the same lines.

using the same data copy activity while adding custom columns i want to add a string column (example: 20191231 in YYYYMMDD format) and map it to a date column in Target table.

Here the query is when we add custom columns in the source it is not giving the drop down to select the data type as date time with input format in the mapping tab. ( please let me know if you want me to post this as a separate query.)

0 Votes 0 ·

Hi @BharatThatipally-7682 ,

Happy to know that above solution worked for you. Could you please accept above answer so that community will get benefit from it.

Regarding follow up query, Could you please share screenshot of mappings to understand issue better. Feel free to raise new thread if that is okay. Thank you.

0 Votes 0 ·

Hi Maheer I have accepted the answer, thank you.. I will be raising a query on with screenshots for the second one.

0 Votes 0 ·

Hi @BharatThatipally-7682 ,

Thank you for accepting answer.

0 Votes 0 ·