Created 03-28-2018 06:44 PM
I'm able to connect to Hortonworks Hive Server and I have the latest ODBC Driver installed. I'm able to load data from the table in the database in "Data Source" window. But when I go to "Sheet1" window and drag a field to plot a graph, Tableau throws this error to me. Can anyone please help?
Created 03-28-2018 06:47 PM
Adding some more info, I looked at the "Show Query" and I saw the table name being entered twice by default.
For Eg:
SELECT `stb_headers_v6`.`day` AS `day`
FROM `pde_gold`.`stb_headers_v6` `stb_headers_v6` <-- Table name twice here
GROUP BY `stb_headers_v6`.`day`
I have used the custom query and still getting an error.
Created 03-28-2018 08:40 PM
Can you paste here the code you are running the below SQL doesn't look correct. Is the table you are querying stb_headers_v6 then the FROM part should be replaced with FROM stb_headers_v6 it shouldn't be qualified with "pde_gold`.`stb_headers_v6`" like below
SELECT `stb_headers_v6`.`day` AS `day` FROM `pde_gold`.`stb_headers_v6` `stb_headers_v6` <-- Table name twice here GROUP BY `stb_headers_v6`.`day`
Hope that helps
Created 03-29-2018 12:13 AM
Hi Geoffrey, I'm using Tableau and this query is generated by Tableau itself when I drag and drop stuff in worksheets
Created 03-29-2018 12:33 AM
If you have been getting this duplicate table name error try the below solution
Solution:
Check for and delete the existing extract BEFORE using the dataextract.Extract() method.
So my original code was this:
############BAD############
# #create the extract# try: # #try to create the extract file # tdefile = tde.Extract(dataFolder+'DataExtract.tde') # except:# #if the file already exists, delete it # os.remove(dataFolder+'DataExtract.tde') # #create the file now # tdefile = tde.Extract(dataFolder+'DataExtract.tde')
My new, working code does this:
############GOOD############
#if the extract already exists, delete it. if os.path.isfile(dataFolder+'DataExtract.tde'): os.remove(dataFolder+'DataExtract.tde') #now create a new one tdefile = tde.Extract(dataFolder+'DataExtract.tde')
Hopefully this helps!