question

PaulFinol avatar image
0 Votes"
PaulFinol asked MartinJaffer-MSFT commented

Convert date in string to datetime2 SQL type in Data Factory

I used the derived column to convert format dd-MM-yyyy HH:mm:ss to datetime format yyyy-MM-dd HH:mm:SS

toString(toTimestamp(Fecha_dep,'dd-MM-yyyy HH:mm:ss'),'yyyy-MM-dd HH:mm:SS')


84953-image.png


the result is good and now the format is the required, no I need to import this value to SQL
My pipeline copies from SFTP to Blob as text then from blob to blob as parquet and finally from blob to SQL

84925-image.png


the conversion84966-image.png is done in derived column


84981-image.png


finally the result should be taken by last copy activity to SQL

84840-image.png


Here the datetime format should recognize the format and idenitify it

84967-image.png


but i get this warning in the mapping

84968-image.png


and this error when the pipeline runs

84955-image.png




i also tried to have timestamp as final data format before exporting to SQL but the result is the same

is there an specific format required for parquet ?¿

azure-data-factory
image.png (69.4 KiB)
image.png (37.1 KiB)
image.png (103.6 KiB)
image.png (109.6 KiB)
image.png (38.7 KiB)
image.png (69.3 KiB)
image.png (10.7 KiB)
image.png (25.8 KiB)
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.

1 Answer

PaulFinol avatar image
0 Votes"
PaulFinol answered MartinJaffer-MSFT commented

I just installed this software to read parquet files, i dont know if it really works but it seems the conversion is not applied. according to the data preview should be OK

84991-image.png



image.png (60.6 KiB)
· 3
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.

Hello @PaulFinol-5436 and welcome to Microsoft Q&A.

Sometimes I see timestamps with "T" between the date and time like 2021-02028T16:56:34
Does adding T make a difference?

0 Votes 0 ·

That worked! Is not written anywhere but solved the problem
THanks

0 Votes 0 ·

Sweet. Thank you for letting us know.

0 Votes 0 ·