Hi all,
I have a query below
FROM (
SELECT h.*
FROM (
-- Pull from the access_log
SELECT ip,
-- Reformat the time from the access log
time, dt,
--method, resource, protocol, status, length, referer, agent,
-- Extract the product_id for the hit from the URL
cast( regexp_extract(resource,'\&q=([^\&]+)', 1) AS STRING) AS
product_name
FROM a_log
) h
)hit
-- Insert the hit data into a seperate search table
INSERT OVERWRITE TABLE search
SELECT ip, time, dt,
product_name
WHERE product_name IS NOT NULL;
it suppose to populate the search table with only if product_name is present
but i get all of it..
any help would be appreciated
thanks
prakash sejwani
econify infotech
mumbai