All Forums Analytics
zakyw 11 posts Joined 07/16
21 Jul 2016
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 
 

M.Saeed Khurram 544 posts Joined 09/12
21 Jul 2016

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

Khurram

zakyw 11 posts Joined 07/16
21 Jul 2016

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

zakyw 11 posts Joined 07/16
21 Jul 2016

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 

zakyw 11 posts Joined 07/16
21 Jul 2016

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 

 
'

M.Saeed Khurram 544 posts Joined 09/12
24 Jul 2016

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

zakyw 11 posts Joined 07/16
25 Jul 2016

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 

M.Saeed Khurram 544 posts Joined 09/12
27 Jul 2016

Go through this article to get started with Aster:
http://developer.teradata.com/aster/articles/using-aster-express-act-1

Khurram

zakyw 11 posts Joined 07/16
27 Jul 2016

Thanks a lot saeed :) 

zakyw 11 posts Joined 07/16
10 Aug 2016

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 

You must sign in to leave a comment.