Understanding Tableau File Types better - tableau-api

I have done a lot of research on the file types of tableau but I would still like to know more about some file extensions
What is the relation between twbx and tdsx?
Is twbx file : twb + tde file OR twb+tde+tds file ?
What would be the main difference between tds and tdsx file ?
How to use a tps(preferences) file in tableau workbook?
can all the file extensions be used on server or only some ?

twbx contains the workbook including a copy of all the data that you connected your workbook to, while a tdsx contains connection information to remote data sources (Server IPs, tables, etc) as well as any local data that somebody else wouldn't have access to otherwise (eg. an Excel file on your computer). No dashboards are involved. https://onlinehelp.tableau.com/current/pro/desktop/en-us/export_connection.html
A twbx is a twb with a tde file if you want. Remote and local data is stored within your workbook so that other people can access it https://onlinehelp.tableau.com/current/pro/desktop/en-us/save_savework_packagedworkbooks.html
a tds only includes references to data sources but no actual data, so if you connect to a local excel file and it is not accessible via a network, a colleague of yours won't be able to use this file to get the data. A tdsx includes these datasets so you can share it. https://onlinehelp.tableau.com/current/pro/desktop/en-us/export_connection.html
A tps contains custom colour palettes, how you can use it can be found here: https://onlinehelp.tableau.com/current/pro/desktop/en-us/formatting_create_custom_colors.html
Generally all files that you can connect to with Tableau Desktop can be accessed via the server (assuming that the server can access them, ie. the files or sources are on the network). You might however be required to install additional drivers on the server to access for example SAP BW. These drivers are not contained in the default installation.

Related

Export a CSV file from AS400 to my pc through Cl program

I want to export a database file that is created through a query, from the AS400 machine to my pc in the form of a csv file.
Is there a way to create that connection of the AS400 and my pc through a cl program?
An idea of what I want to do can be derived from the following code:
CLRPFM DTABASENAME
RUNQRY QRY(QRYTEST1)
CHGVAR VAR(&PATH) VALUE('C:\TESTS')
CHGVAR VAR(&PATH1) VALUE('C:\TESTS')
CHGVAR VAR(&CMD) VALUE(%TRIM(&PATH) *CAT '/DTABASENAME.CSV' !> &PATH !> &PATH1)
STRPCO PCTA(*YES)
STRPCCMD PCCMD(&CMD) PAUSE(*YES)
where I somehow get my database file, give the path that I want it to be saved in, in my pc , and lastly run the pc command accordingly
Take a look at
Copy From Query File (CPYFRMQRYF)
Which will allow you to create a database physical file from the query.
You may also want to look at
Copy To Import File (CPYTOIMPF)
Which will copy data from a database physical file to an Integrated File System (IFS) stream file (such as .CSV); which are the type of files you'd find on a PC.
ex:
CPYTOIMPF FROMFILE(MYLIB/MYPF) TOSTMF('/home/myuser/DTABASENAME.CSV') RCDDLM(*CRLF) DTAFMT(*DLM) STRDLM(*DBLQUOTE) STRESCCHR(*STRDLM) RMVBLANK(*TRAILING)
FLDDLM(',')
However, there's no single command to transfer data to your PC. Well technically, I suppose that's not true. If you configure a (SMB or NFS) file share on your PC and configure the IBM SMB or NFS client; you could in fact CPYTOIMPF directly to that file share or use the Copy Object (CPY) command to copy from the IFS to the network share.
If your PC has an FTP server available, you could send the data via the IBM i's FTP client. Similarly, if you have a SSH server on your PC, OpenSSL is available via PASE and SFTP or SCP could be used. You could also email the file from the i.
Instead of trying to send the file to your PC from the i. An easier solution would be to kick off a process on the PC that runs the download. My preference would be a Access Client Solution (ACS) data transfer.
You configure and save (as a .dtfx file) the transfer
Then you can kick it off with a
STRPCCMD cmd('java -jar C:\ACS\acsbundle.jar /plugin=download C:\testacs.dtfx')
More detailed information can be found in the Automating ACS Data Transfer document
The ACS download compoent is SQL based, so you could probably remove the need to use Query/400 at all
Assuming that you have your IFS QNTC mapped to your network domain. You could use the command CPYTOIMPF to copy the data directly from an IBMI DB2 file to a network directory.
This sample would result in a CSV file.
CPYTOIMPF FROMFILE(file) TOSTMF('//QNTC/servername or ip/path/filename.csv') STMFCCSID(*PCASCII) RCDDLM(*CRLF) STRDLM(*NONE)
Use the FLDDLM(';') option in addition to make semicolon separated values, omit it to use comma as value separator.

How to give File access to Tableau server?

I have a .twb file created using the excel data source that is located in some network file path.
On publishing to server I get this error.
How to resolve this?
I need to provide some access for "Run as user" in my server machine,how could I do that ?
Ensure that when the workbook is created, a connection to the Excel file is created using the full UNC path
Ensure that the Tableau Server Run As user is able to access that file using the UNC path specified in the workbook. An easy way to test this would be to open Windows Explorer as the Run As user, then paste in the UNC path. If the Excel file opens, then you're good to go.
If you still have issues, test access to the file while logged into the Tableau server to make sure there is no firewall or port blocking access from that host. Often Excel isn't installed on servers for security reasons, so the test is not whether Excel opens the file, but whether you can view the contents from the server as the Run As User, even just using the type command at the console.
If you can't get your network access fixed, an alternative is to build and publish extracts to the server. There are multiple ways to accomplish that

Crystal Reports Server 2013 - RPT file location

I have my Crystal Reports server configured against an Oracle data source, but now I need to switch it to be configured against a SQL Server data source, on a different server. This server has no way to communicate with the original server to use the import tool.
I was looking into how to import the data myself. Looking at the tables, I see that it stores binary fields in the database. Are the reports stored as binary data inside the data source, or does each RPT file has a copy somewhere on the disk? If it is on the disk where? If it's inside the data source binary field, does importing the data to a new server will still work?
The CCM (Central Configuration Manager) – not to be confused with the CMS – has the ability to migrate your database repository from one database to another, even if the database vendor differs (i.e. Oracle vs. Microsoft).
Have a look at the administrator guide, the procedure is described in chapter 11, Managing Central Management Server (CMS) Databases, section 4 Copying data from one CMS system database to another.
A small excerpt:
You can use the Central Configuration Manager (CCM) or cmsdbsetup.sh
to copy system data from one database server into another database
server. For example, if you want to replace the database with another
database because you are upgrading the database or are moving from one
database type to another, you can copy the contents of the existing
database into the new database before decommissioning the existing
database.
Regarding the reports themselves, they are not stored in the database, but in the file repository. However, you need to view the database and file repository as one: the first contains the metadata while the latter contains the actual files. However, they can not function separately.
In other words, you cannot just copy the RPT files from the file repository to another server and expect them to work, as the information that is contained in the metadata (such as authorisations) will be missing. On the other hand, if you just copy the database repository but omit the file repository, you'll end up with all the information regarding your reports, but you won't be able to open or run them.

Publishing Reports on tableau via tabcmd

I wanted to publish tableau reports via tab cmd commands and was able to do it successfully, one concern I have is "Connecting the twbx file to a data source' via tabcmd commands.
Following are the commands which I used to :
Login to tableau server :
tabcmd.exe login --server http://serverName --user "userName" --password "password" --site ""
Publishing Tableau reports to the Tableau server :
publish -c "E:\Tableau\ActualReportName.twbx" -n "new Report name.twbx" --project ProjectName --db-user "DBuserName" --db-password "DBpassword"
Although I have given my db credentials while publishing reports, I have nowhere mentioned the DB server Name and DB Name for that matter from which the twbx files would fetch the data.
I have multiple DB's using the same credentials, is there any way in TabCmd to specify the Db server Name and DB name from which reports would fetch data from?
Any help in this would be great!
Unless you have a pressing reason, I'd publish a .twb file instead of a .twbx file
The first thing I'd look into is Tableau servers support for publishing data sources that your published workbook can connect to via the Tableau server. That will allow you to embed your credentials in the shared data source and to update the workbooks and the connections in separate steps. That is especially useful if the data connection and the workbooks change at different tempos.
The unsupported hack is to have your script update the twb file before publishing. It's just an XML file and the info you want to change should be with the data connection details. If you go this route, standard disclaimers apply. Save backups. Don't modify the original, generate a revised version, expect to have to tweak your script when Tableau versions change, etc. still it's not too hard to make sense of their XML. You could probably do it with just a few lines of XSLT, but even a simple string replacement might be good enough.
Still I'd go with a shared data source over hacking the TWB internals in almost all cases.

Restore full external ESENT backup

I've wrote the code that creates full backups of my ESENT database, using JetBeginExternalBackup API.
Following the MSDN guidelines, I backed up every file returned by JetGetAttachInfo and JetGetLogInfo.
I've made the backup, erased old database, and copied the backup data to the database folder.
The DB engine was unable to start, the JetInit error code is "JET_errMissingLogFile".
I've checked the backup, it only contains the database file, and "<inst>XXXXX.log" log files. It lacks the current log file (I'm using circular logging, BTW).
Is there any way to restore such backup?
I don't want to use JetExternalRestore API because it's too complex: I don't need to restore to another location, I don't understand why there're 3 input folders not 2, and I don't know the values to supply in genLow and genHigh arguments.
I do need external backups: the ESENT database is used by ASP.NET on a remote server, and I'm backing it up over the Internet.
Or, maybe there's a way to retrieve the name of the current log file, and I should just add it to the backup?
Thanks in advance!
P.S. I've got no permissions to span processes on my web server, so using eseutil.exe is not an option.
Unpack all backed up files to a single folder.
Take the name of your main database file. Replace extension to .pat. Create zero-length file with that name, e.g. database.pat.
After this simple step, call JetRestoreInstance API, it will restore the backup from that folder.