Giter Club home page Giter Club logo

Comments (5)

mrn3 avatar mrn3 commented on May 29, 2024

yeah, this might not be in a totally workable state. it might work for mysql, but not so much for postgresql, or vice versa. I haven't actively been working on this for a while, so I am not sure I can help much more, but if you want to help dig into the code, I think we can resolve your issue.

from data-ace.

kylegrieder avatar kylegrieder commented on May 29, 2024

from data-ace.

mrn3 avatar mrn3 commented on May 29, 2024

Okay, yeah, I used it with Redshift too, but I hadn't sorted everything out. It is tricky because Redshift/Postgres has databases, schemas, and tables, but MySQL only has databases and tables, so there is another level of hierarchy with Redshift.

from data-ace.

kylegrieder avatar kylegrieder commented on May 29, 2024

I found an issue, but I'm not sure how to solve it completely.

In lib\data-managers\redshift-manager.js, in getDatabaseNames(), there is an if statement in place for building the query to retrieve databases. It seems to have something to do with being a super-user for the database. I removed the if statement and simply replaced the whole thing with

let query = 'SELECT datname FROM pg_database WHERE datistemplate = false ORDER BY datname;'

I realize its not ideal, but for my purposes it seems to work. Now, when connecting via the New Connection modal, databases are retrieved and when I select a database, the various schemas are retrieved.

This is where I'm running into trouble though. Autocomplete still isn't working, and I noticed that it seems like there should be a tree view of the associated tables and columns once a schema is selected, but that doesn't show up either. I looked at lib\views\details-view.js, at the buildTableList() function. I noticed on line 97 that you're calling this.DBManager.getTables(database), however in redshift-manager.js, the getTables() function expects 2 parameters - database, and schemaName. I believe this might be why tables aren't being retrieved, and therefore no table tree view is appearing.

This is where I kind of got lost. I'm also at work right now and can't spend any more time on it, but I wanted to update you on what I found so far. I'm not super familiar with javascript, and I'm only a junior developer anyway, so I'm not sure it would be an efficient use of my time to delve into this further, at least not while I'm working.

I'll continue to look at it sometime tonight when I get home, but I wanted to update you on my progress. Thanks for your time.

from data-ace.

mrn3 avatar mrn3 commented on May 29, 2024

yeah, thanks for looking into that. this sounds like the issues I was trying to fix with the hierarchy being different on postgres/redshift than mysql. I ended up mostly abandoning the project as I have moved on and don't really use this anymore. So, I am not sure I will actively be fixing this issue, but if you want to take over the project or just do a pull request to fix this, I am open to it.

from data-ace.

Related Issues (7)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.