QUERY IN ASTER

Analytics
Enthusiast

QUERY IN ASTER

Hi Guys 

I'm Zaky 

In here , i've a problem with query in aster , because this the first moment for me , 

so , my question is , can you give me references or tell me how to example type of query in the aster ? 

thanks a lot , sorry if my english are less 

9 REPLIES
Enthusiast

Re: QUERY IN ASTER

Before running a query, you must have a running instance of Aster. have you configured the Aster VM?

Khurram
Enthusiast

Re: QUERY IN ASTER

Ya , i have account aster and the configure has been completed but , i confused about the query because is different with query in teradata for example function LIKE. , maybe you have references for this case ?

Thanks in advice
Enthusiast

Re: QUERY IN ASTER

for example 

this query have me create in the aster , whether for the statement is correct or not ? 

CREATE TABLE sb7.zw_cc_payment_mon_201607 DISTRIBUTE BY HASH(msisdn) AS ( 

SELECT begin_date , msisdn , protocol_type , COUNT(0) total_hit  FROM   tablename 

WHERE begin_date  between '20160701' and '20160719' -- CHANGE ME

and protocol_type ~* '3dsecure|visa|veritrans|finpay|doku|fastpay|ipaymu|ipay88|nicepay|unionpay|payexpress|firstpay|securepay|speedcash|safekey|digicert.*\bL\b'

group by 1,2,3 

)  

thanks for advice 

Enthusiast

Re: QUERY IN ASTER

BTW , one more master sorry 

for the statement \bl\b' , 

what's the meaning of the statement above ? 

please for your explaination TD Master 

thank you 

'

Enthusiast

Re: QUERY IN ASTER

Hi,

Use the below format to create table:

CREATE FACT TABLE users_young_northamerica (
userid INT,
name VARCHAR,
email VARCHAR,
age SMALLINT,
favorite_color CHAR(5),
region_id INT
)
DISTRIBUTE BY HASH( userid )
AS SELECT
u.userid,
u.name,
u.email,
u.age,
u.favorite_color,
u.region_id
FROM users u, regions r
WHERE u.region_id=r.region_id
AND u.age<=25 and r.region_name=’North America’;
Khurram
Enthusiast

Re: QUERY IN ASTER

Hi saeed 

thanks for answer , before, what is the difference of create table by me with create table by you  ? 

and do you have example query with the function LIKE in Aster saeed ? 

thanks for advice 

Enthusiast

Re: QUERY IN ASTER

Go through this article to get started with Aster:

http://developer.teradata.com/aster/articles/using-aster-express-act-1

Khurram
Enthusiast

Re: QUERY IN ASTER

Thanks a lot saeed :) 

Enthusiast

Re: QUERY IN ASTER

Hy guys

i want to ask you something about error in aster 

i've a problem with the query extract load from teradata to aster , but any something wrong with this query , 

-- query for example : 

INSERT INTO SB7.ASP_OVERCHARGE_SUBS

SELECT * FROM load_from_teradata (ON mr_driver

     tdpid('edw2')USERNAME('anggis')PASSWORD('Marvel93')

     QUERY ('SELECT DISTINCT SUBSCRIBER_NO, MSISDN_SUBS from XL_DATA_POSTPAID.ASP_OVERCHARGE_ANALYSIS')

)

but the error is 'mailman setup' so, please help to fix about this problem ya guys ?

thanks a lot