Date error when importing JSON file

Hi there, I am having an issue with the importer.

I am loading a file manually (a JSON). The date labels work correctly for other files. This particular file however does not index any of the items and in the logs, produces the below error.

MainThread squirro.dataloader.incremental 2022-08-22 12:21:06,378 ERROR There is no entry in the control database for this query, cannot get the incremental max value

Can anyone help me understand a bit more as to what is happening here?

Thanks

1 Like

Hi @bdx
can you confirm on which Squirro version you are testing this?
Can you also share more details about the connector configuration you are using (fields mapping, other relevant settings) and an example of json you’re trying to upload?

2 Likes

Hi Chiara, thank you for your response!

I am using 3.6.2.

Is there a way for me to share the JSON file and/or the squirro project export file with you? I can’t in this chat. Also, the png is a bit of a collage as I can only upload one file as a new forum member.

Thanks

Barrie

1 Like

Hi Barrie,

I think the relevant error is a different one:

ValueError: Value '2022-08-02T09:00:00.005' does not appear to be a datetime field according to the format string '%Y-%m-%dT%H:%M:%S'. Specify a custom datetime format to handle this value.

It looks like different datetime formats are used across the json objects you’re trying to load, it’s ok if the format is the squirro default one (%Y-%m-%dT%H:%M:%S) but throw an error when a different format is found.

Easiest solution is to adjust / preprocess the json file to make sure all items use the same format.
Also note that the dateformat you specify when you define the label is only used for display purposes. To specify the date format used for the data import you have to use the optional “Time Format” column in the Labels mapping screen.

See more details about it on this documentation page: Working with non-standard input date formats

Note that it should be possible to specify different datetime formats to try (list of strings in the “Time Format” entry), but there’s currently a bug with it and therefore not working. So for the time being you should go back to one consistent format (or split the data into 2 json based on the time format that is used).

P.S. when looking at the documentation, be aware that Facets and Labels are the same thing. Not all documentation has been already updated to the new terminology.

2 Likes

Hi Chiara, many thanks for this!

Is there a log in Squirro that is accessible to me that I can check for these errors?

Thanks
Barrie

Hi Barrie,

yes, that was in the datasource.log

Cheers,
Chiara

Hi Barrie,

If you check our Squirro A-Z in the academy, there is a cheat sheet around logging and monitoring too, as well as a video tutorial - this may be a good quick reference to understand our logging. :star2: Here is the link

Thanks,
Lauren