I copy data from sql server to parquet file now I’m query the parquet file using pyspark
Entry:
enter image description here
Result should be POS_TRANSACTION_HOUR:
record1 => 0000
record2 => 2300
%%
sql
select
RIGHT(CONCAT(‘0′, DATEPART(HOUR, END_DATETIME)), 2) + ’00’ AS POS_TRANSACTION_HOUR
from TRANS_Table
I don’t know why the function DATEPART doesn’t work in sql
I appreciated your help
Thanks!
Javier
Result should be POS_TRANSACTION_HOUR:
record1 => 0000
record2 => 2300
Javier Guzmán is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.