11,677
edits
Changes
Updating to match new version of source page
With TaticView, you can automate the update of your [[Data_Sources|Data Files]].
See below the required steps to automate the data updates.
<span style="color: red;">'''Important:'''</span> * To use TVCli works with , the computer where it will be configured must have java from version <i>7.0_808</i>installed. If you use a Java minor version the message "Unsupported major. Howeverminor version 52.0" will be showed, we recommend using <em>see [[Java 8JRE install and troubleshooting]] for help.* 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: </emi> because C:\Users\<iuser>Java 7\AppData\Local\TVCli\Logs</i> is discontinued by Oracle).
=== Installing TVCli ===
For now, we have only a user friendly installer for Windows. If you need install TVCli in other platforms, please contact us at <u>[https://support.taticview.com Support]</u>. We are glad to to help you to install it in you environment.
The browser can try to block the installer download. If you can't download please enter in contact with our support.
Windows can too block the installer execution to protect the computer. In this case continue the installation choosing the advanced options.
In both situations if you need contact us to help you.
* '''Run the installation''' on the computer where the schedules will be created to run the TVCli.
TVCli works through command line. The best way to automate the execution is creating a script, after that, you can schedule it to run on the system task scheduler.<br/>
To install and execute TVCli on you computer we need Java JRE version 1.8.0_200 or newer installed.<br/>
On [[Java JRE install and troubleshooting]] we can help you in case of doubts.
=== Generating the Access TOKEN ===
An Access TOKEN is always linked to a TaticViwe TaticView user. The TOKEN works like a TaticView generated password that allows access to TVCli. The TOKEN '''[[Manage_Access#Tokens|can be revoked ]]''' at any moment, allowing you to decide who can access your TaticView account and when. It is important to remember that this access only allows the update of data files that are set to be automatically updated.
There are two ways to generate an Access TOKEN:
====Using TVCli command line====Run the command through a command line requesting the generation of an [[Manage_Access#Tokens|Access TOKEN]]. To help you on this, we wave a [[TVCli Commands|Wizard]] Command Syntax: '''Command Syntax: tvcli -cmd get_token_by_password -user <your TaticView user> -password <your TaticView password> [-token_name "<token name>"]'''
-cmd - get_token_by_password - The command responsible for requesting and storing the Access TOKEN on the TVCli settings.
-user - Your TaticView user (access e-mailemail).
-password - Your TaticView access password.
-token_name (optional) - The name you want to set to your Access TOKEN. The default name '''TaticView CLI''' will be set if you do not specify a name.
Example: '''Example: tvcli -cmd get_token_by_password -user myemail@email.com -password 123466 -token_name "TVCli Server 1" ''' ====Using TaticView's graphical interface==== Here we will show you how to generate a token whit TaticView interface.
# On the TaticiView [[Main Page Overview|home screen]], select [[User profile|My Acount]] and click on the [[Tokens|Access TOKENS]] button;
# On [[File:identificacao-novo-token+en-US.png]] inform a name to identify your Access TOKEN on the list and select '''Generate new TOKEN''';
Command Syntax: '''Syntax: tvcli -cmd store_token -user <your TaticView user name> -token <the token generated tokenon TaticView>'''
-cmd - store_token - stores token The command responsible for storing the TOKENS generated through the interfaceon TaticView. -user - Your TaticView user (access email). -token - The token generated through the interfaceon TaticView.
Example: '''Example: tvcli -cmd store_token -user meuemail@email.com -token 9bdr845gh5r4r1vd5d5'''
=== Updating your data automatically ===
Then, the ''Automatic importation'' option should be enabled. When you do this, you will see the data file code, as in the example below:
[[File:automatic-importation+en-US.pngPNG]]
Command Syntax: '''Command Syntax: tvcli -cmd import_file -user <your TaticView user> -datamart <data file identification code> -file "<file/spreadsheet address>" [-type "<type>"] [-wait [-notifyshare]] [-nonotifyerror]
'''
-cmd - import_file - Command that uploads your files and add them to the update queue.
-user - Your TaticView user (access e-mailemail).
-datamart - The identification code of the data file obtained through the properties option on the TaticView main page.
-file - The address of the text (CSV) or spreadsheet (XLSX, XLS, XLSM) data file that will be updated. You can use mapped drives (Ex.: C:\, D:\) or UNC address (Ex.: \\server\folder\file).
-notifyshare (opcional) - Command used to send a notification to the users who own shared dashboards informing that the data update finished successfully. This command only works when used with the <i>-wait</i> command.
'''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 "cC:\taticview\imp\spreadsheet.xlsx"''' '''tvcli -cmd import_file -user myemail@email.com -datamart 246 -file "cC:\taticview\imp\file.csv" -wait -notifyshare''' '''tvcli -cmd import_file -user myemail@email.com -datamart 246 -file "cC:\taticview\imp\spreadsheet.xlsx" -wait''' '''tvcli -cmd import_file -user myemail@email.com -datamart 246 -file "cC:\taticview\imp\spreadsheet.xlsx" -type clear_and_add''' '''tvcli -cmd import_file -user myemail@email.com -datamart 246 -file "cC:\taticview\imp\spreadsheet.xlsx" -type append''' '''tvcli -cmd import_file -user myemail@email.com -datamart 246 -file "cC:\taticview\imp\spreadsheet.xlsx" -type append -nonotifyerror''' '''Call "C:\Program Files\TvCli\tvcli" -cmd import_file -user myemail@email.com -datamart 246 -file "D:\taticview\imp\spreadsheet.xlsx" -wait'''
=== Running TVCli from BAT (Script) file ===
'''''Attention'''''<br>
To execute TVCli from a BAT file, you have to use the Windows [https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/call CALL] command. Ie.:
'''CALL''' C:\TaticView\tvcli -cmd import_file -user jonathan@sadig.com -file "C:\Users\jonathan\Documents\TaticView\Import Files\rh.xlsx" -datamart 673 -wait
==== Evaluating if command execution was successful ====
You can perform treatments in your automation script based on these return codes.
For this you can [https://docs.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2012-r2-and-2012/cc754335(v=ws.11) use ERROLEVEL] Windows environment variable. Ie.:
if %errorlevel% == 0 (
echo SALES updated successfully!
) else (
echo Problems updating SALES!
)
=== Questions on how generate the automation commands? = BAT (Script) example ==== Open a [https://support.taticview.com/open.php/?&lang=en_US support ticket]. In case Bellow we show you are having problems during the TVCli configuration process. It will be a pleasure script sample that imports two files to help. Also, on different DataMarts (ids 674 and 673) and test the Data Files properties screen, when clicking the link <i>help ERRORLEVEL environment variable to generate automation commands?</i>, it will display evaluate if the [[TVCli Generate Commands]] screen, where you can obtain preset TVCli commands. All you have to do is inform some required dataupdate was done successfully. === Script example ===
'''if %errorlevel% == 0 (
'''echo "SALES updated successfully!"
''') else (
'''echo "Problems updating SALES!"
''')
'''call C:\TaticView\tvcli -cmd import_file -user jonathanmy@sadigemail.com -file "C:\Users\jonathan.Sadig\Documents\TaticView\Import Files\rhhr.xlsx" -datamart 673 -wait
'''if %errorlevel% == 0 (
'''echo "RH HR updated successfully!"
''') else (
'''echo "Problems updating RHHR!"
''')'''
=== More questions on how generate the automation commands? ===
TaticView has a wizard the help you on this, on the Data Files properties screen, when clicking the link <i>help to generate automation commands?</i>, it will display the [[TVCli Commands]] screen, where you can obtain preset TVCli commands. All you have to do is inform some required data.
You can also open a [https://support.taticview.com/open.php/?&lang=en_US support ticket]. In case you are having problems during the TVCli configuration process. It will be a pleasure to help you.