we have the below (screenshot) calendar identifier in AIMMS and are writing data indexed over iWeek (elements of the form "w44-2024") to Parquet files using DEX. Now, whenever DEX does this for us, these elements are written to the Parquet file as "2024-10-28 01:00:00" instead, looking like a datetime object being the first time instant of this week. Similarly, for months, a datetime object is written being the first time instant of this month. However, when reading in these Parquet files again using DEX, with the same mapping, these month elements are read in correctly while the week elements are not. I.e., the element "2024-10-28 01:00:00" above cannot be mapped back again to "w44-2024".
We would be interested to hear any best practices regarding reading and writing calendar elements using DEX and if we are overlooking something here.
Thanks!
Page 1 / 1
Dear @danileidelmeijer
I tried reproducing your issue, but was not successful.
Created a calendar with weeks and a simple data parameter and a data filler procedure
Created an export procedure to Parquet
Created an import procedure from Parquet
I can run the export and get a parquet file that look like this:
Then, when I import it back in, after emptying the p_data parameter, the data is correctly imported into the weeks as expected:
Maybe you can tweak the attached project to reproduce your issue.
@danileidelmeijer
What would you expect? Do you have a preference to have the literal week names from the model being used rather than a date?
@luispinto thanks for your help! I tried tweaking your attached project to reproduce the issue but was unsuccessful.
Would it be an idea if I shared through some safe way our project folder including a .data file and our .parquet file? This project contains a test procedure I’ve included with which the problem can be reproduced.
@MarcelRoelofs for me personally it makes sense this way but I am mostly interested in the data being read in correctly the way we’ve also written the data to parquet using DEX.
Reply
Sign up
Already have an account? Login Please use your business or academic e-mail address to register