cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Errors when trying to import a csv file into a model

Alex_Unige_2024
Explorer
0 Likes
60

The aim is to import 2 csv files into a model (one with prod and the other one with test data), with same columns, and compare the values for one column, against the other columns.

First I want to import one the 2 files, and right after the import step I can see 2 errors, maybe linked :

1) for some lines imported, the date value of the column "Date de début" (= begin date) is highlighted in red by SAC. However, the date format for the file and the one for the imported data are always OK

- file date format = dd.mm.yyyy, and imported data format = mm/dd/yyyy
- for the highlighted cells, the error message returned is "Invalid Date Format"

2) the same column "Date de début" has been generated by default as a Date dimension with hierarchical levels (Year, Quarter, month, Day) and it seems to be impossible to turn this column into a standard Generic dimension, 
as all other columns has been generated into. For the comparison step (with the 2nd file imported), I need to have all the columns as Generic dimensions, with the amount column as the only measure.

I send you some printscreens for help (attached file)

Could you please explain to me how to resolve these 2 errors ?

Thanks in advance

Accepted Solutions (0)

Answers (1)

Answers (1)

N1kh1l
Active Contributor
0 Likes

@Alex_Unige_2024 

The reason you see errors is because your date format in file and date format in wrangler cannot be different. Initially SAC checks only 2000 rows of data for validation. You cannot have a mix format in the same date column so select the date format as per the date column in file which is MMDDYYYY.

 

You can also change the type of field on the right pane in the wrangler. So from Date you can change to string.

N1kh1l_0-1778253278878.png

 

 

Hope this helps !

Nikhil

 

Alex_Unige_2024
Explorer
0 Likes
Thanks for your answer, but I do not understand the meaning of what you wrote. Maybe my request was not clear enough. Could you please make your answer clearer ? Thanks a lot
Alex_Unige_2024
Explorer
0 Likes
What do you mean with the "wrangler" ?
Alex_Unige_2024
Explorer
0 Likes
I cannot convert the column "Date de début" from Date dimension to Generic dimension, I didn't find how to do it
N1kh1l
Active Contributor
0 Likes
Are you loading the files into an existing model ? If yes then the model would already have its dimension pre defined. If you created the model with file itself then you would have to recreate it and while creating the model you need to choose which dimension acts as a date dimension for the model. You can also have 2 date dimensions in the model. Kindly explain your steps so that its clear to understand your issue.