Hi Aishwarya, Is the date coming from Oracle coming out with a timezone? It sounds to me like the issue is a case of mismatched timezones and we just have to sort that out. — C
> On May 27, 2021, at 9:43 AM, luoc <l...@apache.org> wrote: > > > Hi Aishwarya, > Could you please post the query text for your 6th attempt? > >> 在 2021年5月27日,11:59,arul....@wipro.com.invalid 写道: >> >> Hello, >> >> Problem Statement: >> I have a requirement where I need to compare data from oracle and snowflake >> tables. I am using Apache Drill 1.17.0 for this. >> My tables have DATE column and the value from snowflake table is showing >> previous day’s date. For example, if my actual value is ‘2021-05-20’, Apache >> Drill returns ‘2021-05-19’ from snowflake. >> >> Fixes tried: >> · CONVERT_TO(date_column,’UTF8’) – Gives previous date >> · CAST(date_column AS VARCHAR(10)) - Gives previous date >> · TO_CHAR(date_column) - Gives previous date >> · Converting to different timezone or UTC format doesn’t work in >> Apache Drill. Workaround given in Apache Drill documentation for this >> timezone limitation did not make difference. Reference - >> http://drill.apache.org/docs/data-type-conversion/#time-zone-limitation >> · Altered timezone of snowflake and then inserted data into table, >> still Apache Drill gives previous date >> · CAST(date_column AS TIMESTAMP) – Gives correct date when queried >> separately on snowflake table, but gives previous date when I join this >> table to my corresponding oracle table for validation >> >> Please help me out with solution for this issue and revert if any more >> details required. Thanks in advance! >> >> >> >> Regards, >> Aishwarya >> 'The information contained in this electronic message and any attachments to >> this message are intended for the exclusive use of the addressee(s) and may >> contain proprietary, confidential or privileged information. If you are not >> the intended recipient, you should not disseminate, distribute or copy this >> e-mail. Please notify the sender immediately and destroy all copies of this >> message and any attachments. WARNING: Computer viruses can be transmitted >> via email. The recipient should check this email and any attachments for the >> presence of viruses. The company accepts no liability for any damage caused >> by any virus transmitted by this email. www.wipro.com'