Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLUCIONADO

How to avoid Data Truncation

nimit_b19
Meteoro

I have data coming in through an API in JSON format. I want to store this data in a SQL server in a crosstab format.

 

Following is the flow I have created to achieve this:

 

a1.png

 

I am able to successfully write the data in the required format to the SQL Tables.

 

However, some of the data is getting truncated in the process.

 

I have a field called 'Time Left' which ideally should be in seconds (float) format but the API is sending it in " xx Hours yy Minutes zz Seconds " format. I tried to change this to float, I get only the first number and the rest of the data is lost. I tried converting it to date time and still did not get the desired output.

 

This is what the API is sending:

 

a2.png

 

 

This is what happens after 'Select' tool:

 

a3.png

 

 

Is there a way I can convert the incoming data to seconds in Alteryx and store it in float format?

  • API
13 RESPOSTAS 13

Hi @nimit_b19 ,

I guess you need to apply formula to convert hours and minutes into seconds first.

 

Sapna Gupta
nimit_b19
Meteoro

Yes, the initial type is String but I want to convert it to seconds (float) to later process the data in Tableau.

Hi @nimit_b19 ,

Please find the solution.

Thanks.

 

EDIT: this workflow is for date format like 3 Hours and 45 Minutes in other case we need to parse the digits from the string and then calculate them with the formula mentioned in the workflow.

Sapna Gupta
nimit_b19
Meteoro

Thanks for the solution! However, I'm not able to open this in my copy of Alteryx since you're on a newer version than me. I can't update since I'm on an Enterprise license.

@nimit_b19  no problem I will attach the image of the workflow along with this post.timeleft.PNG

Sapna Gupta
nimit_b19
Meteoro

Thanks for the screenshot!

 

Can you possibly also paste the screenshots for each configuration?

 

Many thanks in advance.

danilang
19 - Altair
19 - Altair

Hi @nimit_b19 

 

You can change the version @grazitti_sapna's  workflow by opening the .yxmd in notepad and changing the 2019.2 in second line to match which ever version of alteryx you're using.  Look in Help->About to find your version

 

<?xml version="1.0"?>
<AlteryxDocument yxmdVer="2019.2">

 

Dan

nimit_b19
Meteoro

Hi Dan,

 

I tried what you suggested but this is what I see when I open the file using notepad:

 

a4.png

danilang
19 - Altair
19 - Altair

hi @nimit_b19 

 

You opened the .yxzp package which is renamed zip file.  Find the timeleft.yxmd workflow that was extracted.  It should be in a subdirectory call "timeleft" 

 

Dan

Rótulos