Alteryx designer Discussions

Find answers, ask questions, and share expertise about Alteryx Designer.
Check out our powerful new search update! You can read more here. Please let us know if you have any feedback by creating a topic here.

Writing Data to Pre-Existing Table in SQL Server DB

Highlighted
Alteryx Partner

This is my first post in the community, so please forgive me if I'm overlooking any etiquette.

 

I've designed a flow that is ultimately supposed to output data into a table stored in a SQL Server database, but I receive a conversion error when I run the flow (see Output_Error image). This error only appeared when I tried to write data to the table that already exists in the database. I never got data to load into the table with the Output tool configured this way, so I re-configured the tool to create a new table on the Alteryx side and then load this table into the database.

 

What I discovered from configuring the tool this way is that Alteryx does not appear to have datatypes that map exactly to the data types in SQL Server. When comparing the datatypes in Alteryx against the datatypes in the SQL database after I run the flow, the database has no problem converting the datatypes from Alteryx (see DataTypesComparison image). Can you all help me understand how to configure the Output tool so that I'm able to write data to a table that already exists in my database?

 

I also want to be able to add new records with each run of my flow, so I've selected the "Update; insert if new" record option. Is this the correct option that should be selected? (see Output_Configuration image)

 

Any and all suggestions are welcome and appreciated! Thanks in advance!

 

Highlighted
Alteryx
Alteryx

@dallen

 

I took a look at the case (00211775) you opened with Alteryx Support. 

 

SQL Server is expecting format YYYY-MM-DD and if your TRXTimestamp field has anything other than what they are looking for you will receive the "Invalid character value for cast specification" error. If you verified the date format is not the issue here, feel free to reach out to us again so we can take a second look at the issue.

Eddie Wong
Customer Support Engineer
Alteryx
Labels