Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Schema not propagating correctly (Postgres) #325

Closed
scrimshander opened this issue Apr 11, 2016 · 6 comments
Closed

Schema not propagating correctly (Postgres) #325

scrimshander opened this issue Apr 11, 2016 · 6 comments
Labels
!deprecated-label:bug Deprecated label - Use #bug instead

Comments

@scrimshander
Copy link

I have been able to successfully connect to a Postgres db, in a non-public schema, and configure a table. However, when I create a slice or browse the table I get the following error, which appears to be an issue with explicit SQL not bringing along the schema name. The FROM statement should reference schemaname.tablename and is only referencing tablename. I am using the metadata_params JSON to indicate the schema.

ProgrammingError: (psycopg2.ProgrammingError) relation "tablename" does not exist LINE 2: FROM tablename ^ [SQL: "SELECT fieldname AS fieldname, COUNT(*) AS count \nFROM tablename \nWHERE date_as_of >= '2015-04-11 12:30:48.000000' AND date_as_of <= '2016-04-11 12:30:48.000000' GROUP BY fieldname ORDER BY COUNT(*) DESC \n LIMIT 50000"]

@alanmcruickshank
Copy link
Contributor

I can confirm I'm getting the same behaviour. Appears to be raising the error at:
payload = obj.get_json()
of method:
def explore(self, datasource_type, datasource_id):
in class:
class Caravel(BaseView):
of
views.py

I'm likewise using metadata_params JSON to indicate schema.

@mistercrunch mistercrunch added the !deprecated-label:bug Deprecated label - Use #bug instead label Apr 11, 2016
@mistercrunch
Copy link
Member

Ok, seems like I'll have to install a postgres install to get to the bottom of this. In the meantime, I think the workaround is to connect with a user that matches the schema name. Please confirm that this works, though it should be a temporary workaround only as we'll address the issue.

@mistercrunch
Copy link
Member

Anybody interested in testing this branch? This should address all the issues.
#330

@scrimshander
Copy link
Author

Will do so now.

@scrimshander
Copy link
Author

I'm a newbie to caravel entirely, and may just be running into issues with trying to test a new branch, but I am seeing references to static/assets/javascripts/dist where no /dist exists, causing 404s when I am trying to test /explore/table/...

@deniszgonjanin deniszgonjanin mentioned this issue Apr 13, 2016
@xrmx
Copy link
Contributor

xrmx commented Aug 8, 2016

Looks like this has been fixed in #330 and #360. Closing.

@xrmx xrmx closed this as completed Aug 8, 2016
zhaoyongjie pushed a commit to zhaoyongjie/incubator-superset that referenced this issue Nov 17, 2021
zhaoyongjie pushed a commit to zhaoyongjie/incubator-superset that referenced this issue Nov 24, 2021
zhaoyongjie pushed a commit to zhaoyongjie/incubator-superset that referenced this issue Nov 25, 2021
zhaoyongjie pushed a commit to zhaoyongjie/incubator-superset that referenced this issue Nov 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
!deprecated-label:bug Deprecated label - Use #bug instead
Projects
None yet
Development

No branches or pull requests

4 participants