Open main menu

TaticView β

Changes

Automate Update data

1,761 bytes added, 14:02, 7 March 2018
no edit summary
<!--T:2-->
You With TaticView, you can automate the data update of your [[Data_Sources|Data Files]].
<!--T:3-->
Some setup procedures To do so, it is necessary to adjust the settings and to use the use of command line program [[TVCli]] command line program are necessary to automate updates on TavicView.
<!--T:4-->
If you are having trouble, open a support ticket on https://support.taticview.com/open.php. We are glad See below the required steps to help youautomate the data updates.
=== Installing TVCli === <!--T:5-->
<!--T:6-->
First download Download the installer:first
* <u>[http://wiki.taticview.com/taticfiles/tvcli-windows-installer.exe Windows]</u>
 
<!--T:7-->
Then run Run the installation on the same workstation machine where the files that are going schedules will be created to be automatically imported arerun the TVCli. TVCli works through command line. After you have created the executable containing the disered command, you can schedule its running process through your disered task scheduler.
<!--T:38-->
<span style="color: red;">'''Important:'''</span> * TVCli works with any java from version after <i>7.0_80</i>. However, but we recommend recomend using <em>Java 8</em> because as Oracle no longer supports <i>Java 7</i> is discontinued by Oracle.* A notification will be displayed to the user if an error occurred during the data update.* A log with the execution details will be generated in the user's settings folder (Example: <i>C:\Usuários\<usuário>\AppData\Local\TVCli\Logs</i>).* TaticView's free subscription only allows you to automate the update of one data file. It will be necessary to set the automatic data update feature in your subscription.
=== Generating the Access TOKEN generation === <!--T:8-->
<!--T:9-->
You must have To automate the data updates through TCVli, it is necessary to own an '''[[Tokens|Access TOKEN]]''' registered created on TaticView and then register it on TVCli before you can run an automation import.  An Access TOKEN is always related with linked to a TaticView TaticViwe user. The Access TOKEN is works like a TaticView generated password generated by TaticView which that allows access to your account through TVCli. It The TOKEN can be revoked by you at any timemoment, allowing you to decide who and when can access your TaticView account on TaticViewand when. It is important to remember that this access only allows the update of data files that are set to be automatically updated.  
<!--T:10-->
You can There are two ways to generate the an Access TOKEN in two ways:
<!--T:11-->
'''Through TVCli'''
# Run the command through a command line requesting the generation of a new an Access TOKEN.
<!--T:12-->
'''Command Syntax: tvcli -cmd get_token_by_password -user <your TaticView user name> -password <user your TaticView password> [-token_name "<token name>"]'''
<!--T:13-->
-cmd - get_token_by_password - Requests The command responsible for requesting and stores storing the ACCESS Access TOKEN through command lineon the TVCli settings. (TVCli) -user - Your TaticView user(access e-mail). -password - Your TaticView access password. -token_name (optional) - The name that you want to give set to the access tokenyour Access TOKEN. Default The default name "'''TaticView CLI" ''' will be set if you do not specify a name.
<!--T:14-->
'''Example: tvcli -cmd get_token_by_password -user myemail@email.com -password 123466 -token_name "TVCli Server 1"'''
<!--T:15-->
'''Through TacticView TaticView's interface'''# Identify yourself On the TaticiView [[Main Page Overview|home screen]], select [[User profile|My Acount]] and click on TaticView and access the '''My account''' button '''[[Tokens|Access TOKENS''']] button;# On [[File:identificacao-novo-token+en-US.png]] enter inform a name to identify the your Access TOKEN on the list and then click on select '''Generate new TOKEN'''.;# An A new Access TOKEN will be generated [[File:generated-token+en-US.png]]# Run TVcli the TVCli TOKEN storing command (<i>store_token</i>), informing the last generated Access TOKEN;
<!--T:16-->
'''Command Syntax: tvcli -cmd store_token -user <your TaticView user name> -token <the token generated tokenon TaticView>'''
<!--T:17-->
-cmd - store_token - stores token The command responsible for storing the TOKENS generated through the interfaceon TaticView. -user - Your TaticView user (access e-mail). -token - The token generated through the interfaceon TaticView.
<!--T:18-->
=== Updating in an automated way your data automatically === <!--T:19-->
<!--T:20-->
You can only automate the update of data sources files that have been already created exist on TaticView, so you are going . It will be necessary to need at least one manual import your file/spreadsheet manually for the first time to create generate the necessary required structure.Then you must grant After that, it will be necessary to enable the automatic import update to the desired data file.To do this so, access the TaticView [[Main Page Overview|main page]], click on the imported file (On the TaticView interface)data files, select '''Properties'''<i>Settings</i>, and check enable the checkbox '''<i>Automatic Importation'''Update</i> option. After that, which displays it will display the identifier data files code of your data file, as you can see in on the screen. See the example below:
<!--T:21-->
<!--T:22-->
[[File:automatic-importation+en-US.png]]
 
<!--T:23-->
Once You can execute the data file is imported, granted for automatic import and you have your identification automatically using the identifier code, you can run the import through the command lineif the data file has permission to be updated automatically.
<!--T:24-->
'''Command Syntax: tvcli -cmd import_file -user <your TaticView user name> -datamart <identifierdata file identification code> -file "<file/spreadsheetaddress>" [-type "<type>"] [-wait [-[notifyshare]] [-nonotifyerror] '''
<!--T:25-->
-cmd - import_file - Command that uploads the data file your files and places it in add them to the import update queue. -user - Your TaticView user (access e-mail). -datamart - identifier The identification code of the data file obtained in through the Data file properties at option on the interfaceTaticView main page. -file - Text data file The address of the text (CSV) or spreadsheet (XLSX,XLS, XLSM) to data file that will be importedupdated. You can use mapped drives (Ex.: C:\, D:\) or UNC address (Ex.: \\server\folder\file). -type (opcional) - clear_and_add - Deletes all every data from the TaticView 's Data File and imports the new data. (This is TVCli's default)behavior. append - Adds the It adds new data at to your TaticView's data files file/spreadsheet while still keeping the end of the TaticView Data Filepreviously imported data. It is necessary 's important to make sure to be careful not to duplicate any data. -wait (opcional) - waits for Command that makes TVCli wait the end of the importyour data updates along with TaticView. It is needed 's necessary in case you want to test '''Output Status'''commands responses (ERROR_LEVEL). -nonotifyerror (opcional) - does Command used to not notify the user if in case of an error occurs occurring during the update process. -notifyshare (opcional) - sends data update Command used to send a notification to the users who have these data file own shared dashboards shared when informing that the importing process ends without errorsdata update finished successfully. Only This command only works when used with the <i>-wait</i> command.
<!--T:26-->
'''Example:'''
'''tvcli -cmd import_file -user myemail@email.com -datamart 246 -file "\\servidor\taticview\imp\myspreadsheet.xls" '''
'''tvcli -cmd import_file -user myemail@email.com -datamart 246 -file "c:\taticview\imp\spreadsheet.xlsx"'''
'''tvcli -cmd import_file -user myemail@email.com -datamart 246 -file "c:\taticview\imp\file.csv" -wait -notifyshare'''
<!--T:36-->
Shows You can run the <i>-version</i> command to see which TVCli version is installed on your computer. This command displays the TVCli version on the console and register into registers it on the TVCli log file.
<!--T:37-->
'''Command Syntax: tvcli -version'''
=== Command return Commands response test === <!--T:27-->
<!--T:28-->
The TVCli executable returns different specific codes to report inform the success or failure during of its commands. Currently, the execution process.available codes are:
<!--T:29-->
<!--T:30-->
A notification is sent to You can perform treatments in your automation script based on these return codes.  === Questions on how generate the user if an error occurs automation commands? === Open a [https://support.taticview.com/open.php/?&lang=en_US support ticket]. In case you are having problems during the import TVCli configuration process.A log with the details of the executions It will be generated in a pleasure to help. Also, on the configuration directory of Data Files properties screen, when clicking the user (example: C:\Users\link <i>help to generate automation commands?<user/i>\AppData\Local\TVcli\Logs), it will display the [[TVCli Generate Commands]] screen, where you can obtain preset TVCli commands. All you have to do is inform some required data.
'''echo "Problems updating SALES!"
''')
'''call tvcli -cmd import_file -user jonathan@sadig.com -file "C:\Users\jonathan.Sadig\Documents\TaticView\Import Files\hrrh.xlsx" -datamart 673 -wait
'''if %errorlevel% == 0 (
'''echo "HR RH updated successfully!"
''') else (
'''echo "Problems updating HRRH!"
''')'''
 
 
<!--T:33-->
<span style="color: red;">'''Important'''</span>
 
<!--T:34-->
TaticView free subscription allows only one data source to have an automated update. You need to configure the feature '''automatic data update''' in your [[Subscriptions|subscription]] to automate the imports of more data sources.
</translate>