Error while connecting to IBM DB2 with Tableau Desktop? - linux

I'm trying to connect to a IBM DB2(v10.5) database with Tableau Desktop v10. When i enter the credentials and try to login, it shows the below error:
[Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified
The DB2 database is available in a Linux machine(rhel 6.5).What are the prerequisites and odbc drivers i need to install to resolve this issue.

You need to download and install the IBM DB2 driver from Tableau's website at https://www.tableau.com/support/drivers.
Tableau's online help includes a page for setting up a connection to DB2. I am abbreviating them here.
Start Tableau and under Connect, select IBM DB2. For a complete list of data connections, select More under To a Server. Then do the following:
Enter the name of the server that hosts the database and the name of the database that you want to connect to.
Enter your user name and password.
If Tableau can't make the connection, verify that your credentials are correct. If you still can't connect, your computer is having trouble locating the server. Contact your network administrator or database administrator. -
Select Sign In.
On the data source page, do the following:
(Optional) Select the default data source name at the top of the page, and then enter a unique data source name for use in Tableau. For example, use a data source naming convention that helps other users of the data source figure out which data source to connect to.
From the Schema drop-down list, select a schema or use the text box to search for a schema by name.
Under Table, select a table or use the text box to search for a table by name.
Drag a table to the canvas, and then select the sheet tab to start your analysis.

Related

Excel Office 365 VBA to add a new PowerQuery "Data Source"

I already have vba that modifies queries on existing data sources. But for adding new data sources (what I would call a new DB connection), I am stumped. When I try to record a macro that adds a new data source, the macro is created but there is no code generated - just an empty sub routine.
The steps I am trying to simulate are:
Click Data
Get Data From Database
[In my case, I choose Oracle, but I suppose all options are working with the same underlying VBA class of object?]
From there, you enter the server. In my case, what works is
HostName:Port/OracleUniverse
If the server is new to the machine, then it prompts you for credentials. Otherwise, it uses cached credentials.
I've attached a picture indicating where the new data source needs to appear:
Note:
I would happily switch to a traditional Windows ODBC User DSN but Oracle drivers are not available on my machine (I work for government and cannot add them).

Refreshable pivot table connected to an external source

I am planning to deploy an Excel file where the users would only need to refresh to see the updated data. I can currently do this by sending out a new Excel file every time.
What I have:
Office 365
MariaDB on Digital Ocean
What I want:
Create a pivot table/data model connected to the database and have the data updated real time upon refresh.
I can do this on my own via ODBC but when sharing the file, it asks for the credentials which is saved on my ODBC file. Ideally, I don't want to share the credentials even though it's read-only.
Is there an alternative to ODBC so I can easily share the refreshable pivot table?

Changing the Power query SQL Server database settings when moving an Excel workbook

I'm working on creating an excel report that collects data from a local copy of a SQL Server database on my maschine, where I use Power Query to retrieve the data. These are then loaded into a PowerPivot data model. Now I'm finished with the development and on my way to put this into production on another server on the customer's server. The Excel workbook must change database settings using sql server database user Connection (not integrated). I had hoped that I could change the database Connection Properties at the Data tab, but there are not any easy way to change the connection string to the new server. Now I can't see any option that going through every Power Query query and change them manually. I have great hope that you Power Query experts have a Nice explaination and an example how I can solve this.
Hope to hear from you soon
Regards Geir F
There isn't a great solution for bulk server rename today, but we're very aware of the customer demand! (I can't promise anything about upcoming features, but at some point in the past I heard the dev team discuss this feature.) I'd recommend showing your support for this feature at https://excel.uservoice.com/
If you need to solve this soon, manually opening each query and editting the server string is what you need to do, sorry :\
(If you're building new reports again, Power BI Desktop lets you parameterize the server name to a top-level query, which would allow for quick rename operations!)
Do you only need to change the server name? If you go to the Data Source Settings window, you can select the SQL Server source you are using and click on the "Change Source..." button. If you change the server name in that dialog, it will change the server name in all of the queries that use that source (assuming it's the first step in the query).

Self-updating spreadsheet

Is it possible to create a spreadsheet that updates itself on a regular basis (daily, bi-weekly or monthly)? We use PostgreSQL. The content of the sheet is going to be based off a query I wrote.
What's the easiest way to connect an Excel spreadsheet to Postgres?
So far I have looked at:
A Microsoft product: https://support.office.com/en-us/article/Connect-to-a-PostgreSQL-database-Power-Query-bf941e52-066f-4911-a41f-2493c39e69e4
PostgreSQL's ODBC: https://odbc.postgresql.org/
However I can't find a clear explanation of how I am practically going to set up the spreadsheet.
A quick high-level explanation to connect excel to a database:
You can connect to a ODBC enabled DBMS's view or table using Excel's Get External Data buttons. Specifically in the Data tab, the From other Sources button.
To use this, you need to create a new DSN for your connection. Start>>"Search Box">>ODBC and use the 64-bit ODBC administrator to create a new System DSN. The DSN is the thing that will hold your ODBC connection's information, like the server address, username, password, etc...
Back in Excel you click the From Other Sources button in the Data tab and pick that DSN you just made. Then you can find the View you generated in Postgres and tell it which range you want to dump the data. That range then will hold the connection information so you can refresh any time you want.
Then, when you open the workbook you can just refresh the connection and pick up new data lickety-split.
There's other ways to connect Excel to ODBC and OLEDB enabled databases like using ADODB in VBA, but that's more complicated and probably overkill for you needs.

SSAS require special privileges to create/edit a named query?

I am trying to make modifications to a named query in a cube and the data source view (.dsv) won't allow me to make edits or create a new named query. It gives me a login error even though I can successfully do a test connection in the data source dialog and can login successfully with SSMS.
The error is: "Login failed for user "
If I instead use the Windows authentication I am able to do everything; however, I would like to use the SQL Server Authentication option.
Are there privileges that need to be set for this? I'm pretty sure I've tried giving this user everything from db_owner etc in my local environment and still no luck.
I was wondering if maybe SSAS requires a specific role to allow SQL Server Authentication to be used for editing/creating named queries in the data source view.
Please refer to the following steps to slove this issue:
In the SSDT development interface, double-click on your data source.
In the Data Source Desginer dialog, please click "Edit".
Please select "SqlClient Data Provider", and then use your SQL Account for the data source.
Follow this link
(https://social.msdn.microsoft.com/Forums/sqlserver/en-US/b5f05388-42e0-4fb6-92a9-d7d3e08aa98c/ssdt-2012-named-query-problem?forum=sqlanalysisservices)

Resources