original_docstring: Returns TableDefinition object from parsed metadata-records
  
          The method uses Tableau Extract module to create Table Definition
          object from parsed column information.
  
          Parameters
          ----------
          tds_reader: TDSReader
              containing parsed information from a tableau datasource file
          collation: Collation
              collation to be used for all columns of the table
  
          Returns
          -------
          TableDefinition
              tableau definition object from parsed tableau datasource file
  
          Note
          ----
          If the column type information is not available, it will use default
          column type as Type.UNICODE_STRING
  
          Raises
          ------
          TableauException
              when Tableau SDK fails to add column in table definition
          WriterException
              * when parent_name is None in column_definition
              * when local_name is None in column_definition
              * when a KeyError is occurred while fetching data
          
docstring: Returns TableDefinition object from parsed metadata-records
  The method uses Tableau Extract module to create Table Definition
  object from parsed column information.
  
  Parameters
  
  TDSReader
  containing parsed information from a tableau datasource file
  collation: Collation
  collation to be used for all columns of the table
  
  Returns
  
  TableDefinition
  tableau definition object from parsed tableau datasource file
  
  Note
  
  If the column type information is not available, it will use default
  column type as Type.UNICODE_STRING
  
  Raises
  
  TableauException
  when Tableau SDK fails to add column in table definition
  WriterException
  when parent_name is None in column_definition
  when local_name is None in column_definition
  when a KeyError is occurred while fetching data
docstring_tokens: Returns TableDefinition object from parsed metadata - records The method uses Tableau Extract module to create Table Definition object from parsed column information . Parameters TDSReader containing parsed information from a tableau datasource file collation : Collation collation to be used for all columns of the table Returns TableDefinition tableau definition object from parsed tableau datasource file Note If the column type information is not available it will use default column type as Type . UNICODE_STRING Raises TableauException when Tableau SDK fails to add column in table definition WriterException when parent_name is None in column_definition when local_name is None in column_definition when a KeyError is occurred while fetching data
code: def _define_table(self, tds_reader, collation):
          """Returns TableDefinition object from parsed metadata-records
  
          The method uses Tableau Extract module to create Table Definition
          object from parsed column information.
  
          Parameters
          ----------
          tds_reader: TDSReader
              containing parsed information from a tableau datasource file
          collation: Collation
              collation to be used for all columns of the table
  
          Returns
          -------
          TableDefinition
              tableau definition object from parsed tableau datasource file
  
          Note
          ----
          If the column type information is not available, it will use default
          column type as Type.UNICODE_STRING
  
          Raises
          ------
          TableauException
              when Tableau SDK fails to add column in table definition
          WriterException
              * when parent_name is None in column_definition
              * when local_name is None in column_definition
              * when a KeyError is occurred while fetching data
          """
  
          table_definition = TableDefinition()
          column_definitions = tds_reader.get_datasource_column_defs()
  
          table_definition.setDefaultCollation(collation)
  
          for i, col_def in enumerate(column_definitions, start=1):
              try:
                  [parent_name, local_name, local_type] = [
                      col_def.get(TDSContentHandler.K_COL_DEF_PARENT_NAME),
                      col_def.get(TDSContentHandler.K_COL_DEF_LOCAL_NAME),
                      col_def.get(TDSContentHandler.K_COL_DEF_LOCAL_TYPE),
                  ]
  
                  if parent_name is None:
                      raise UnexpectedNoneValue(
                          TDSContentHandler.K_COL_DEF_PARENT_NAME
                      )
  
                  if local_name is None:
                      raise UnexpectedNoneValue(
                          TDSContentHandler.K_COL_DEF_LOCAL_NAME
                      )
  
                  column_name = '{}.{}'.format(parent_name, local_name)
                  column_type = self._type_map.get(
                      local_type,
                      self._type_map['unicode_string']
                  )
  
                  table_definition.addColumn(column_name, column_type)
              except (UnexpectedNoneValue, KeyError) as err:
                  err.args += (i, col_def)
                  raise_with_traceback(WriterException(err))
  
          return table_definition
code_tokens: def _define_table ( self , tds_reader , collation ) : table_definition = TableDefinition ( ) column_definitions = tds_reader . get_datasource_column_defs ( ) table_definition . setDefaultCollation ( collation ) for i , col_def in enumerate ( column_definitions , start = 1 ) : try : [ parent_name , local_name , local_type ] = [ col_def . get ( TDSContentHandler . K_COL_DEF_PARENT_NAME ) , col_def . get ( TDSContentHandler . K_COL_DEF_LOCAL_NAME ) , col_def . get ( TDSContentHandler . K_COL_DEF_LOCAL_TYPE ) , ] if parent_name is None : raise UnexpectedNoneValue ( TDSContentHandler . K_COL_DEF_PARENT_NAME ) if local_name is None : raise UnexpectedNoneValue ( TDSContentHandler . K_COL_DEF_LOCAL_NAME ) column_name = '{}.{}' . format ( parent_name , local_name ) column_type = self . _type_map . get ( local_type , self . _type_map [ 'unicode_string' ] ) table_definition . addColumn ( column_name , column_type ) except ( UnexpectedNoneValue , KeyError ) as err : err . args += ( i , col_def ) raise_with_traceback ( WriterException ( err ) ) return table_definition
short_docstring: Returns TableDefinition object from parsed metadata-records
  The method uses Tableau Extract module to create Table Definition
  object from parsed column information.
short_docstring_tokens: Returns TableDefinition object from parsed metadata - records The method uses Tableau Extract module to create Table Definition object from parsed column information .
comment: """Returns TableDefinition object from parsed metadata-records
  
          The method uses Tableau Extract module to create Table Definition
          object from parsed column information.
  
          Parameters
          ----------
          tds_reader: TDSReader
              containing parsed information from a tableau datasource file
          collation: Collation
              collation to be used for all columns of the table
  
          Returns
          -------
          TableDefinition
              tableau definition object from parsed tableau datasource file
  
          Note
          ----
          If the column type information is not available, it will use default
          column type as Type.UNICODE_STRING
  
          Raises
          ------
          TableauException
              when Tableau SDK fails to add column in table definition
          WriterException
              * when parent_name is None in column_definition
              * when local_name is None in column_definition
              * when a KeyError is occurred while fetching data
          """