Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.

Atlanta, GA

Welcome to the Atlanta User Group

Click in the JOIN GROUP button to follow our news and attend our events!

SOLVED

Error Using In_database -

JoseFinger
6 - Meteoroid

I'm a beginner at alteryx, so forgive me if the question is inconsistent.

My environment:

1) Desktop i3 4 MB of Memoria - Windows 10 - alteryx Designer 64.

2)Database : IBM DB2 - Linux (64)

I can connect to DB and do the querys without major problems but if I try to use the tools IN_Database - Browser-IN

I'm noting an error.

The query is simple:
============================================================
"SELECT
EMPNO,
FIRSTNME,
MIDINIT,
LASTNAME,
WORKDEPT,
HIREDATE,
JOB
SEX
BIRTHDATE
TIMESTAMPDIFF(256, CAST(CURRENT_TIMESTAMP-CAST(BIRTHDATE AS TIMESTAMP)
AS CHAR(22))) AS AGE
FROM EMPLOYEE ;"
========================================================

With return of 42 rows.
It returns the following error to me.
Start: Designer x64: Started running at 05/20/2022 12:49:08
Error: Browse In-DB (2): Error opening "WITH "Tool1_28e4" AS (SELECT
EMPNO,
FIRSTNME,
MIDINIT,
LASTNAME,
WORKDEPT,
HIREDATE,
JOB,
SEX,
BIRTHDATE
FROM EMPLOYEE ;) SELECT * FROM "Tool1_28e4" LIMIT 20": No Columns Returned.
End: Designer x64: Finished running in 0.9 seconds with 1 error

=================================================================================

+

Start: Designer x64: Started running at 05/20/2022 13:15:08
Info: Designer x64: The Designer x64 reported: Allocating requested memory would be more than available physical memory. Reverting to 737.0 MB of memory.
Info: Connect In-DB (1): ODBC Driver version: 03.51
Info: Browse In-DB (2): Running In-DB query
End: Designer x64: Finished running in 1.2 seconds with 1 error

===========================================

I ask So, How much memory would it take to run this simple query?
How to make this calculation ?
I can do this using other alteryx tools, I would just like to understand this concept....

 

Thanks in advance!

 

Regards

2 REPLIES 2
OneandOnly13
8 - Asteroid

Hi,

 

Alteryx In-DB tools actually do a select * (your query) for every In-DB tool you use. Your query has a ; after EMPLOYEE which breaks the select * its trying to wrap it in. You should be able to just remove the ; and be all set.

JoseFinger
6 - Meteoroid

Thank you @OneandOnly13 

Thank you. I changed the query, and I was able to run without error. I am now seeing salary field, which is a decimal(9,2) datatype ,but in the resultset of alteryx it comes in NULL

 

SELECT EMPLOYEE.EMPNO,
EMPLOYEE.FIRSTNME,
EMPLOYEE.MIDINIT,
EMPLOYEE.LASTNAME,
EMPLOYEE.WORKDEPT,
EMPLOYEE.PHONENO,
EMPLOYEE.HIREDATE,
EMPLOYEE.JOB,
EMPLOYEE.EDLEVEL,
EMPLOYEE.SEX,
EMPLOYEE.BIRTHDATE,
EMPLOYEE.SALARY
from EMPLOYEE

 

JoseFinger_0-1653313210160.png