Issue with adding table with Columns in caravel with Redshift
I have successfully added Redshift DB as datasource using SQLAlchemy URI( "redshift+psycopg2://hadoop:XXXXXXXXXX@
public.testtable Table doesn't seem to exist in the specified database, couldn't fetch column information
Addition info: public schema is in search path in Redshift and testtable exists in DB with data. Also, I am using default sqlite DB for storing caravel metadata info. Below is the entry in config.py(/usr/local/lib/python2.7/dist-packages/caravel/config.py):
The SQLAlchemy connection string.
SQLALCHEMY_DATABASE_URI = 'sqlite:////opt/caravel/caravel.db'
Can someone please help if I am doing any mistake in adding table from Redshift? Thanks.
Do you have more logs in the caravel log? Is the table in the public schema?
The schema field in the table form is important for Postgres/Redshift databases. Double check the schema and make sure you specify it in the form.
Yes, I have checked again - table is in public schema and also I have mentioned this in the Web UI while adding table as shown below:
Schema public
It just gives error on UI - "Table doesn't seem to exist in the specified database, couldn't fetch column information"
However, I am able to fetch data from the same table using SQL editor available on the web UI - its so weird. Also, I dont see any error in the log as well.
Few more observation: To validate my caravel server setup, I tested this pointing to postgres DB from Web UI and this works fine. I am able to create Slices and dashboard using that. With AWS Redshift also, I am able to add Redhshift as Database and 'Test connection' also seems OK - it also listing all tables below save button after successful connection testing. However, its failing when I try to add tables with column details - its not fetching column information.
I am not sure what additional steps are required to explore Redshift DB apart from whatever I am trying now?
Also, I am facing one more issue with password authentication and this happens when I go to 'Edit Database' and do the TEST CONNECTION again - password authentication fails in this case. However, it works fine when edit SQLAlchemy URI and give the password in clear text.
Has anyone faced the same issue with password authentication apart from the Redshift issue that I have mentioned above?
@randhirkr for the test connection not working after save it's already been reported here #596, anyway it's just an annoyance and unrelated to your issue
Yes..thats right. Main issue I am facing with table addition with columns in the Web UI as I have mentioned above.
As I have mentioned earlier that I am not able to add tables with column information because it gives below error in the UI:
Table doesn't seem to exist in the specified database, couldn't fetch column information
However, I am not able to see corresponding errors in the backend log file. Its populating error, but only in the UI at this moment - so its quite difficult to debug this further. is there any way to see these kind of error details with full trace in the log as well(in the backend)?
Currently, caravel is already running in the debug mode. I am running below command to start the server:
nohup caravel runserver -d >>caravel.log 2>&1 &
Note: I am able to fetch data using SQL query from the same table mentioned above using SQL Editor available in the Tables page in Web UI.
Just putting below log as well if it helps, but there is no error in this log the way I am getting error in the UI as mentioned above. This log gets generated when hit save buttong while adding table in the Web UI.
2016-06-29 13:05:41,319:INFO:werkzeug: - - [29/Jun/2016 13:05:41] "GET /tablemodelview/add HTTP/1.1" 200 -
2016-06-29 13:06:20,150:INFO:werkzeug: - - [29/Jun/2016 13:06:20] "POST /tablemodelview/add HTTP/1.1" 302 -
2016-06-29 13:06:20,565:INFO:werkzeug: - - [29/Jun/2016 13:06:20] "GET /tablemodelview/list/ HTTP/1.1" 200 -
As per caravel documentation(http://airbnb.io/caravel/tutorial.html), it should have populated column names details as well when I hit the save button while adding table. Its so strange that in the same page, if I go to SQL Editor - its fetching all tables with columns details.
Hello guys, is there any update on this? Also, can you please let me know why status of this issue is in "waiting_for_validation" state for such a long time? Please let me know, if further input is required from my side. Thanks in advance.
Thanks @mistercrunch for validating this and putting this as a bug. Any idea, when will it get fixed so that I can try this again?
I changed the password to the X's it's converted to for now xD
I have the same problem, we can't add tables for redshift, because he can't find the schema anymore even if the schema is public. If I can do anything to get this fixed, I'm happy to help. Would be nice to get a fix
@tclass sure, you can debug the issue and open a pull request, just the first part alone would be great :)
+1
Has anyone found a way around this?
Try creating a view of the table you're adding. It works eventually.
On Tue, 20 Sep 2016, 02:43 birbbit, [email protected] wrote:
Has anyone found a way around this?
— You are receiving this because you commented.
Reply to this email directly, view it on GitHub https://github.com/airbnb/caravel/issues/682#issuecomment-248128644, or mute the thread https://github.com/notifications/unsubscribe-auth/ACQILBMoMffBWsryPI_vNg-HKTWFaQhwks5qrvsMgaJpZM4I_Uzx .
@kingo55 - will it not work without creating view on the DB? As per our requirement we do not have that much leeway to create view on the DB.
Seems fix is still in progress for this.
I failed to get it working even with views. I keep getting the same error no matter what I try. Guess I will wait for the fix.
Are you making your own build or on the latest pypi release?
Im also seeing this same issue