Tenup also provides functionality for specifying how data is saved to the 1010data system. When you load data with Tenup, you can overwrite a table or create a new one. You can control metadata about the table, such as the name, title and subtitle. You can also control who has permission to view the new table. This section will cover Tenup operations that control server-side data.
In addition to creating a brand new table, you can overwrite an existing table on 1010data with Tenup. To overwrite a table, use the -y option. Here's an example:
$ tenup64 -u [USERNAME] -C [CONNSTR] [PATH_TO_EXISTING_TABLE] @[QUERYFILE] -y
This command will overwrite an existing 1010data table with the results of the query provided. If you do not use the -y option, and the name of the table you're trying to write already exists, Tenup will return an error.
Tenup also has an option for appending new data to an existing table (as opposed to creating a new table or overwriting and existing table). An append operation is performed with the -a option:
$ tenup64 -u [USERNAME] -p [PASSWORD] -C [CONNSTR] [PATH_TO_EXISTING_TABLE] [QUERY] -a
You can also control the access permissions to the new tables you create with Tenup interactions. By default, all new tables you save are private and can only be seen by you.
You can change the permissions of your new table with the -Y option. To set the permission of a table to those of its parent folder, use the -Y command followed by the dot character (.), as follows:
$ tenup64 -u -[USERNAME] -C [CONNSTR] [PATH_TO_NEW_TABLENAME] [QUERY] -Y .
$ tenup64 -u [USERNAME] -C [CONNSTR] [PATH_TO_NEW_TABLENAME] [QUERY] -Y [USER_1,USER_2,USER_3...USER_n]This command grants permission to view the table only to the users specified in the command. The usernames should be separated by commas (, ) with no spaces between each comma and the next username. Notice that as the owner of the table, you do not need to specify yourself.