How to write a table using Python notebook when using TDV as JDBC data source?

How to write a table using Python notebook when using TDV as JDBC data source?

book

Article ID: KB0072640

calendar_today

Updated On:

Products Versions
Spotfire Data Science Team Studio 6.6

Description

This article explains the syntax for writing Tables on TIBCO Data Virtualization virtual database from a python notebook.

Issue/Introduction

This article explains the syntax for writing Tables on TIBCO Data Virtualization virtual database from a python notebook.

Environment

Unix based for TIBCO Data Science Team Studio and Windows/Unix for TIBCO Data Virtualization

Resolution

Users can use following syntax for writing tables to TDV by using python notebook:

cc.write_output_table(data_frame=dfName, 
                      schema_name='',
                      table_name='nameOfTable',
                      database_name='nameOfVirtualSchema', 
                      drop_if_exitsts=True,
                      use_output_substitution=True,
                      execution_label="2"
                     )
where, 
- data_frame => Python data frame we want to write as a table.
- table_name => user-defined name for a table.
- database_name => Name of Virtual schema of TIBCO Data Virtualization.
- execution_lable => Should be distinct and exclusively one of the following strings: 1, 2 or 3.
- use_output_substitution= This argument can be set to True if users want to make notebook available for use with Python execute operator.