Connecting to Amazon Redshift in Azure Data Studio via the Postgresql Connector - amazon-redshift

I've recently joined a company with a mixed set of databases that include a Redshift cluster and some SQL databases. I'd like to use a single IDE to access both for analytical reporting, so I don't have to switch between tools. I'm currently using workbench, which works, but it's not clicking with me.
I do like Azure Data Studio, but it's SQL Server and Postgres only. Given the similarities between Redshift and Postgres, I thought I'd see if I could connect using the Postgres driver.
I've installed the Postgres extension and can "connect" to the database. However when I try to explore the database using the tree view, I get the error message 'Cannot Expand Node'. When I run a simple query that works in workbench, e.g.
Select * from [server].[database].[table]
I get the following Error message:
Started executing query at Line 1
cursors can only be used within the transaction that created them.
Total execution time: 00:00:00.019
I know I'm trying to do something that shouldn't be done. And if I can't, I can't. But has anyone here managed to get a redshift connection going in Azure Data Studio?
FWIW, I've come across a GitHub Repository that may be a Redshift driver for data studio - but this looks like a clone of the Postgres driver, with no activity since march (not even renaming the 'Postgres' titles to Redshift)... and therefore I'm dubious.

Related

Postgresql with IBM App Connect Enterprise

I am trying to use IBM APP Connect Enterprise to connect to a Postgresql Datasource and execute Database complex queries (Complex SELECT, INSERT, UPDATE Statements)
All I can find is the loopback node which is using limited (select, insert and update) statements.
Is there any option that I can include an esql having a PASSTHRU function as the one used with ODBC (Oracle datasources)?
You could use App Connect for the interactions with Postgresql: https://www.ibm.com/docs/en/app-connect/containers_cd?topic=examples-connecting-app-connect-postgresql
You should be able to call your App Connecto flow using a Callable Flow (via the Switch Server): https://www.ibm.com/docs/en/app-connect/12.0?topic=pecf-preparing-environment-split-processing-between-app-connect-enterprise-app-connect-cloud
You should be able to add a postgresql database as an ODBC database through the UnixODBC layer (i.e. add an entry to the odbcinst.ini file), it's not directly supported though, so if you find an issue you'd need to reproduce with a supported database.
I haven't tried it myself yet, I should hopefully have time in the not too distant future.
Searching the internet for "unixodbc postgres odbcinst.ini" gave some good results, which is where I'd start.

Monitor postgres 9 queries

There is a postgres 9 with database AAA that is used by my application. I use pgadmin 4 to manage it manually.
I would like to check what queries are executed by this application on database AAA in real time.
I did a research about monitoring options in pgadmin in vain.
Is is possible to do that by using just pgadmin4? Or is it necessary to use another tool (if yes - what is he name of this tool)?
When I point pgAdmin4 at a 9.6 server, I see a dashboard by default which shows every session (done by querying pg_stat_activity). You can then drill down in a session to see the query. If a query last for less time than the monitoring interval, then you might not see it if the sample is taken at the wrong time.
If that isn't acceptable, then you should probably use a logging solution (like log_statemnt='all') or maybe the pg_stat_statements extension, rather than sample-based monitoring. pg_stat_statements doesn't integrate with the dashboard in pgAdmin4, but you can select from the view from an SQL window just like you can run any other SQL. I don't believe pgAdmin4 offers a built-in way to monitor the database server's log files, the way pgAdmin3 did.

Connecting to PostgreSQL Data Source in SQL Server Import Export Tool

I'm trying to setup an easily-replicable (or even manual and I do it once a month or so) process for moving data from a large Azure PostgreSQL database to a more manageable Azure SQL database for end users that are most familiar with SQL Server. I've successfully connected to the PostgreSQL database via PGAdmin, so I know all my connection string info.
I started by installing the latest ODBC driver from here.
I then used a connection string which was given to me from the Azure portal, filled in the proper database name and password, and attempted to use the following drivers:
PostgreSQL ODBC Driver(UNICODE)
PostgreSQL ODBC Driver(ANSI)
I am getting the following error with either of them:
ERROR [IM002] [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified
What step am I missing in this process? Or how best can I troubleshoot this?
After more research, I attempted to add the ODBC driver here:
And got the following error (I'm not sure why Tableau is relevant to this?):
Thank you.

Setting up environment for SQL queries

I know the basic syntax of queries but otherwise I'm a beginner with SQL.
I have an SQL file (.sql) and I downloaded a couple programs (pgadmin and sql workbench).
I have no idea how to get from where I am now to actually writing queries and finding information. How do I set up so I can actually import my SQL file and start writing queries?
pgAdmin is the default GUI for PostgreSQL.
SQL Workbench is a free, DBMS-independent, cross-platform SQL query tool.
Either way, you need to connect to a database to actually run queries. The DBMS can either run on your local machine or you can connect to a remote server - where you need access privileges of course.

how to connect redshift cluster using tableau 8.0 desktop

I have downloaded Tabeleau 8.0.1 desktop version. I am able to connect my local postgres database through tableau.
But when I try to connect to the redshift cluster, I am getting an error - invlaid userid /password. I already have passed userid and password correctly. FYI, I am able to connect redshift through sqlworkbench/j, command line prompt (psql) & pgadmin III. And I already have downlaoded the redshift driver as per http://www.tableausoftware.com/support/drivers.
However I am not able to connect redshift cluster through tableau.
Amazon Redshift has a direct connect with Tableau. When you start Tableau, please use the Connect to Data option and then choose Amazon Redshift on the left. You'll see the following log-in screen. You shouldn't need to worry about drivers. Also, the Tableau trial version is the full version, so there is no limiting of features.
You can read more here, and watch a video. Also technical details are here. You may want to try version 8.1, which is the most recent version (also has 64 bit)