Is there a way to override the 'upload date' of a document?

Hi Squirro Team,

I am currently working on a project where I am building a squirro dashboard for a custumer. The custumer asked me if it would be possible to use the origin date as value for ‘sort by date’, instead of using the documents upload date. Is that theoretically possible?

Best regards!


Thank you for your question. Yes, it is possible, but this depends if the origin date or created_at date is available in your data or not.

Setting the Date in the Data Loader
While there are a number of possibilities of data types and sources, if an original date field exits within your dataset, it may look like something like the screenshot below. Here we are in the process of adding a data source. The original date is found within the data’s created_at field. This may be named different field for your dataset under “Source Field”, so please have a look.

Please note the date time format, as a different format may cause issues in completing the data run. The strftime format here is %Y-%m-%dT%H:%M:%S.

Setting the Date through Pipelet
If the date is not available in the step above, you would have to determine if the original date can be retrieved somehow from the data, and then resolve if this date be extracted programmatically (for example: using regex to look for date patterns, etc.). If so, a pipelet can be built to determine the desired date and map the date to item["created_at"]. Please have a look at the structure of a Squirro item here.

If required, there is a Squirro Academy course on Pipelets available that can help guide you through the process of building one. Remember that once built and placed within the pipeline, the data must be rerun through the pipeline.

You will likely have more questions as you sort out the specifics to this request. Without knowing the datasource you are using and how it is set up, we can only provide a general view of what can be done. But I hope this information points you in the direction or inspires some ideas. Feel free to reach us with any more questions if you need further help.

Best regards,
Hubert Shon, Solutions Engineer

1 Like