Once you've successfully installed Tenup on your system, you can start uploading data to 1010data. There are just a few simple components to a basic Tenup command. Here's what the atnatomy of a basic query in Tenup looks like:
$ tenup64 -u [USERNAME] -p [PASSWORD] -C [CONNSTR] [PATH_TO_NEW_TABLE] [QUERY]
$ tenup64 --help
|How the Tenup program is invoked. All Tenup commands begin with this.|
|-u tells Tenup you are providing a username to send to 1010data. After the -u, simply type a space and then your 1010data username.|
|-p tells Tenup you are providing a password to send to 1010data. After the -p, simply type a space and then your 1010data password.|
|The DSN (Data Source Name) Connection String for the ODBC compliant database
you're extracting data from. Connection strings often contain a username and
password that are specific to your account on the ODBC compliant database. The
most basic form of a connection string simply contains the name of the data source
you're extracting from, i.e., :
However, most connections strings contain authentication information in addition to the DSN:
Note: Above is a simple connection string. Many connection strings also pass configuration information to the ODBC driver/database. If you're not sure what information must be in the connection string, contact your database administrator.
|The name of the new 1010data table you're creating. 1010data tables are
expressed as follows:
training.retail.itemWhere training is a top-level parent folder, retail is a subfolder of training, and item is the name of the table.
Note: You must have permission to write to the folder where you will save your new 1010data table.
|A query that will retrieve data from your ODBC compliant database. The most
common form of query is SQL. The simplest SQL query looks like
"SELECT * FROM [TABLE_NAME];"You can either write a query yourself or acquire one from your IT department. Keep in mind, SQL databases are not the only ODBC compliant databases. The above is used strictly as an example.
tenup64 -u [USERNAME] -C [CONNSTR] [PATH_TO_NEW_TABLE] @"[PATH_TO_QUERY_FILE]"
Whenever you extract data from a data source outside of 1010data you will need to save that data in the 1010data system. You will need to provide a full path to the new table being created. If you are appending to an existing table, you will need to provide the path to that table. If you're familiar with the file browser in the 1010data web interface it's easy to find the location where you want to save your table. Each folder has a name, and subfolders and tables are denoted by a . character. Here's an example of a folder name at the highest level:
Notice that the name of the folder, training is a single word with no capital letters or spaces. Next, we'll look at the name of the retail subfolder:
In this example the Retail folder is highlighted in the browser. The name of the folder is actually, training.retail because it is a subfolder of the Training Examples folder. When you load data with Tenup, you will provide the command with a folder location and the name of the new table you are creating.
$ tenup64 -u [USERNAME] -C [CONNSTR] training.retail.newtablename [QUERY]
$ isql -v mysql_odbcwhere mysql_odbc is the DSN (data source name) used for this command. For the purposes of this guide we will use the same sample SQL dataset for most examples. To start, we'll run a very basic SQL query using iSQL:
SELECT * FROM testtable;which will return all the data from a table named testtable. The results of the query in iSQL appear below:
$ tenup64 -u myusername -C "DSN=datasourcename;UID=username;PWD=myPa$$w0rd!" training.retail.mygamedata -t "WoW Guild Roster" 'select * from testtable;'
After running the Tenup command, assuming no errors were returned, you can login to 1010data and see the newly created table, as shown below:
To use the command for this extract and load you can't be logged in to 1010data already. The options for killing or possessing an existing section are detailed in the Managing Connectivity section of this guide.
When you log in to 1010data, whether it's via Tenup or the web GUI, by default you will automatically be logged in to the version of 1010data that your organization has been provisioned to use. This is the default behavior and no action on your part is required. However, there are some situations in which you may want to use a different version of 1010data than your default version. For instance, our beta environment is often used by 1010data users who want to see what features and improvements are on the horizon. Furthermore, some of our clients use custom URLs for 1010data access. This means that instead of going to the standard http://www2.1010data.com URL for access, they have some custom corporate URL such as: www.analyticsplayground.com.
In either instance (e.g., you want to use a specific version of 1010data you're not provisioned for, or your company uses a custom corporate gateway) you will need to specify your gateway to Tenup. The following two examples show the syntax for each circumstance you may encounter when you need to specify a gateway. In both cases you will use the -g option. To specify a specific version of 1010data, you only need to specify the version, as follows:
$ tenup64 -u [USERNAME] -g beta-8.03 -C [CONNSTR] [PATH_TO_NEW_TABLE] [QUERY]
The example above tells Tenup not to use the standard gateway logic but to instead create a session in 1010data version 8.03. The current beta versions of 1010data begin at version 8.01.
$ tenup64 -u [USERNAME] -g https://www.analyticsplayground.com/cgi-bin/gw.k -C [CONNSTR] [PATH_TO_NEW_TABLE] [QUERY]
$ tenup64 -u [USERNAME] -g https://www.analyticsplayground.com/cgi-bin/beta-8.01/gw.k -C [CONNSTR] [PATH_TO_NEW_TABLE] [QUERY]
$ tenup64 -D -u [1010data_USERNAME] -C [CONNSTR] [PATH_TO_NEW_TABLE] "SELECT * FROM [TABLE_NAME];"The command above will validate that the connection information you provided works for both the data source and 1010data, but the command will not actually extract and load any data.