Quantcast
Channel: Data Preparation & Blending discussions
Viewing all 4999 articles
Browse latest View live

REGEX and padding

$
0
0

I'm trying to learn REGEX and I was wondering its usefulness with dates.

 

I have some hypothetical dates I want to convert to Alteryx's Date format.  Currently I'm using this formula:

 

REGEX_replace([Field1],'(.*?)/(.*?)/(.*)','20$3-$1-$2')

 

I don't know how to pad the left of the day and month portions.  Is there a way?

 

 Starting Date Current Conversion  Desired Conversion 
 2/3/16 2016-2-3 2016-02-03
 2/13/16 2016-2-13 2016-02-13
 12/3/16 2016-12-3 2016-12-03
 12/13/16 2016-12-13 2016-12-13

 

I'm sure that there are some great macros that convert dates, but i am only doing this to teach myself the how i can better use REGEX.


Block Until Done: Internal Error: AddRecord() - MetaInfo must be successfully set before

$
0
0

Hello everyone,

 

I am quite new to Alteryx and am currently working on a workflow that writes several sheets in a single Excel file. Therefore, I made use of the Block Until Done Tool to unparallelize the run-through of workflows. However, after adjusting some things in the model, I now get an 'Internal Error Message': Block Until Done (xx) Internal Error: AddRecord() - MetaInfo must be successfully set before adding records.

 

I've compared it to a previous version where the run worked withough error message but I can't figure out what the problem might be...any ideas on how to solve this issue?


Thank you very much in advance,

Isa

 

Capture.PNG

Columns getting Invalid after closing the workflow

$
0
0

Hi Folks,

 

I have created a workflow and it works fine .I am facing a peculiar issue where in once I close the workflow  and open it and click on any transformation(Filter,select,join) within it , the columns turns yellow showing missing but when I run the workflow,it runs fine and the columns turns normal again .The issue happens with every closure and opening of the workflow.

PFA a screenshot of the issue .Could someone help me understand the issue ?

Json file is Parsed and Transpose - Transpose loses the order of the field

$
0
0

Hi,

 

I am doing a POC on Json file and Parsing capabilities of Alteryx . I have built a Json file and i parsed it and Crosstab it immeditely. When i cross checked the input and the Crosstab output, i could see the order in which field are got in Crosstab is not in correct order. Please help me to solve this issue of how to Parse a Json file and get the same order as input json.

 

 

Transforming a column to a row

$
0
0

Hi, 

I have a simple question on transforming the data. This is the input format. 

Customer ID DateProduct 
111/16/2015A
111/16/2015B
111/16/2015C
111/16/2015D
111/16/2015E
111/16/2015E
111/16/2015F

 

And I want to transform/transpose SKU from a column to a row, which will look like this. 

Customer DateProduct 1Product 2Product 3Product 4Product 5Product 6
111/16/2015ABCDEF

 

I am not so familiar with transpose functions so any help is much appreciated. 

 

Thanks, 

 

Cross Tab Json File after Parsing

$
0
0

Hi Friends,

 

I parse a Json File and Apply CrossTab Tool on it. The Resultant value order is getting distorted and i get a order of fields in alphabetical order ( i need the fields in the same order as in json file) . Please help me to solve this issue.

Converting character to a unique number

$
0
0

Hello,

 

I need to convert strings (in my case countries) into unique code number.

I tried the function CharToInt, but it gives me identical numbers for different countries (for example 65 for australia, azerbaidjan, austria, argentina etc.).

Can someone explain me why ? Is there a solution to convert a string into a unique code ? 

 

Thank you

Looping in workflow to create calculated columns

$
0
0

Hi,

I need to create 12 new columns in existing sheet based on Months, i have another column named XXX (Date field).

For example:

if the XXX column has the value "August 2016" then i need to populate the value 1 in all new column from JAN to AUG

if the XXX column has the value "September 2017" then i need to populate value 1 in all new column from JAN to DEC

if XXX has "September 2016" then data value 1 from JAN to SEP should br populated.

 

Please help me with this issue.


Insert to MySQL table with unique index

$
0
0

Hi,
I am trying to insert data in a MySQL database table which has a unique index on one of the columns.
Alteryx errors out because its trying to insert a duplicate value.

Update: Insert if new (Alteryx ) also does not seem to work.

Is there a way I can use the MySQL command 'replace into' or 'insert ignore into'.

I do not think the Pre / Post SQL statements can be used here.

thank you

Control Characters

Parsing Unstructured Addresses

$
0
0

So I've been given a pretty unorganized data set with a bunch of address info all in one column. I figured out how to parse out zip and state using ReverseString then a Text to Column. I having a much harder time getting the City and Address because as you can see the info is all over the place some having customer info and some having PO Boxes. 

 

I'm wondering if there is anyway I can parse out "city" by looking for patterns like parsing everything left of an two uppercase letters and right of everyword like "AVE, ST, LN, RD etc." Possible similar thing for address with parsing between "RD, ST etc" and a set of digits.

 

Not sure if thats possible but my goal was to eventually use the Alteryx geocoding app. Thanks for the help!

 

 Sample Address data

Word count

$
0
0

Hi,

 

I have a table like this

 

Client     Text

1            I like the product a lot

2            The product is expensive

...           ....

 

Now, I want to count the number of words for each row. So, I want to produce a new column like that:

 

Client     Text                                          Wordcount

1            I like the product a lot               6

2            The product is expensive         4

...           ....

 

Any idea how to do this?

Thanks a lot,

Best,

cb2loac

Syntax for empty

$
0
0

What is the syntax to custom filter a field for all of the values that are empty (blank)? I tried ISEMPTY([GROUP_ID]), but it didn't work. 

 

 

FindString for "<"

$
0
0

I have string values in my excel data input [E-mail] like below, and i am trying to parse the name "Kkkkk,·Ersal" from it by finding the "<" in the string. 

 

Kkkkk,·Ersal·<Ersal.Kkkkk@Test.com>

 

However the FindString function FindString("<",[E-mail]) only returns -1

 

Any suggestions?

 

Thanks!

pivot only a defined set of columns

$
0
0

Hi!

 

I have an tabel,or csv file an I want pivot a defined set of columns.

My Example:

testdata.JPG

 

And I want as result:

testdata_afterpivot.JPG

 

Is that possible with the Cross tab tool or the Transpose tool in Alteryx? But how?

 

Best regards

Mathias

 

 

 

 


Row to column

$
0
0

Looking for some help with a basic?

 

I have output from an execl pivot with two columns: Time and a number

In thh Time column there is a random date row to which all the time below it belongs. So would like Alteryx to look for random dates, create a new column, and transpose the file to a Date, Time, Number, format with times asigned to there propoer date:

So:

 

Time            Number

24;00:00      12

24:00:01      15

25/06/2016

06:00:00      56

06:00:01      10

.

.

Becomes:

 

Date               Time           Number

25/06/2016     06:00:00    56

25/06/2016     06:00:01    10

.

.

All Help appreciated!

How do I override the truncation that the XML Parse Tool performs?

$
0
0

Hi,

 

I'm trying to build a workflow to audit my TWB files and am running into an issue where the Calculation strings for some fields are being truncated without any apparent reason and I am unable to prevent it from happening.

 

Here's an example:

 

The XML contains the entire Calculation string...

 

xml 1.png

 

When I connect the XML Parse tool to the Input Tool, the calculation_formula field is read in as a V_String with a size of 900.

 

xml 2.png

 

I can change this to a V_WString and increase the Size, but that doesn't seem to do anything.  The values in certain fields are simply truncated.

 

xml 3.png

 

I have to imagine that there is a way to ensure the entire string gets read in, but I am at a loss as to what that might be.

Is it possible to do a multiline Regex match with Alteryx Regular expressions?

$
0
0

I trying to match the following multi-line text in one of my Alteryx scripts:

 

R Yw
R R

Here is how I have configured the regular expression tool:

 

Regex Tool Configuration

 

I confirmed that my regular expression worked at Regex101.com. See Working Regular Expression Here

 

Can anyone tell me what I'm doing wrong?

 

 

Reading XML files into table while maintaining relations

$
0
0

I want to read the tags marked with text from XML files that follow this pattern:

 XML_Alteryx.PNG

I have created a Talend Open Studio job that does this very well. However I obviously can't use the XPath-structure in Alteryx. I tried a few things, but nothing seems to work.

My biggest concern is that at the lowest level of AAAAB and AAAAC the field types can vary, so AAAAB has field 1 and field 2 types, but AAAAC has field 1 and field 3 types. These can't mix, I need to know exactly which field 1 is aligned with field 2 or field 3.

And I can't depict that relation in Alteryx.

 

My first try was this, where every parser reads a single child element. It keeps all the fields I want, unfortunately it creates lots of duplicates and no correct relations. Not to mention that it is inredibly slow because of the duplicates.

XML_Alteryx2.PNG

My second try was to parse every field individually, but I can't join these correctly, because I have no key fields with which to join the records. Matching by record order doesn't work because of the field 1/2 separation at the lowest level.

XML_Alteryx3.PNG

 

I hope my problem is understandable. I feel like I'm tackling this whole issue from the wrong perspective.

 

Convert a delimited file to SQL

$
0
0

Working on my first workflow on Alteryx 10.5 which is processing a ";" delimited file and exporting the file
into a SQL 2012 database.  I am applying a formula to add a date processed field and change 2 fields to date and one

 currency field to a double. I have the process running and loading the proper table but my totals are
off and I see an workflow message of error ConvError: Select (4): Field_9: 1,261.97 stopped converting
at a comma on the currency field.

 

 

Viewing all 4999 articles
Browse latest View live