Alteryx Server Discussions

Find answers, ask questions, and share expertise about Alteryx Server.

Date field becomes string field via scheduler

jackie_liu
8 - Asteroid

Hi,

 

Context

I have a workflow that outputs a Tableau Data Extract and there is one field that is of the DATE type. This field isn't being converted to a date format in the workflow. It is simply in the data source as a date type as confirmed by a SELECT tool prior to the Tableau Data Extract creation.

 

Issue

If I run the workflow manually via Alteryx Desktop, that date field will show up as a DATE type in Tableau. However, if the workflow runs via Alteryx Scheduler, that date field will show up as a STRING type in Tableau. My Tableau dashboard applies a filter on the "previous week" based on this date field which doesn't work when it comes across as a STRING.

 

Any ideas on why this might be happening or how I can resolve it?

 

Thanks!

Jackie

8 REPLIES 8
Matt_Curtis
9 - Comet

Is your Scheduler set up to read the most recent version of the workflow?  I haven't used the Scheduler in about a year, but I remember it used to work a bit like the Server, where you "package" a workflow up to be scheduled, or you can have the option to run off of a local file every time.  Not sure what your config is, but that'd be the first place I look.

jackie_liu
8 - Asteroid

Thanks for the suggestion -- I actually wasn't sure if the scheduler had the most recent version. I ended up removing what was there and uploaded the latest to be sure.

 

Unfortunately, the date field (mm/dd/yyyy) still somehow gets converted to string format.

 

I'll keep working at this and post the solution if/when I figure it out :(

Matt_Curtis
9 - Comet

My next thought would be to use a datetimeformat function to force the date into a 'YYYY-MM-DD' format.  From all my experience with Alteryx, Tableau, SQL, etc., that always seems to be the date format that all systems recognize easily.  Could be the source of what you're seeing, but doesn't necessarily explain why you can run it successfully manually vs. the saved, scheduled version not working.

SophiaF
Alteryx
Alteryx

Hi @jackie_liu - are you running this by publishing to a Server, or are you running this with the Scheduler on your local machine? Easiest way to know is if you schedule from your machine and check the name of the Schedule Location. If it says 'My Computer' it's the Scheduler on your machine. Otherwise it's a computer name/IP address and that would be a server. If you are scheduling via the Gallery, that's also on the server.

 

2eQ44wW

Sophia Fraticelli
Principal Support Engineer
Alteryx, Inc.
jackie_liu
8 - Asteroid

@Matt_Curtis many thanks for the suggestion (and sorry for my delayed response)! This is a workflow that I run monthly so kind of fell off my radar.

 

Forcing the field into the 'YYYY-MM-DD' format did not work but it gave me another idea to try which ended up working:

 

I converted the date field into a string format via the DateTime tool under Parsing. Then I converted the output of that back to a date format via a second DateTime tool.

 

Sounds silly and unnecessary but it worked. I was not able to identify the cause of the issue.

jackie_liu
8 - Asteroid

@SophiaF I am running this workflow by publishing to a server.

I got the same issue. When I push the data to Tableau I need my date version to be a "date" buy Alteryx is transforming the results into a string.

 

The final solution that is working in the monthly basis for me was to input a select tool to manually force the field to be a string first, then a Parse tool to transform back into a Data, and finally another select tool that changes the name of the new field to the previous original field.

 

Hahaha, weird solution but had worked for months now. lol

Voska
8 - Asteroid

I am also seeing this issue.  

 

Resolved by using a formula tool after the input and creating a new field out of the old one and having data type be date.