                 table.appendRows(data)
                 doneCallback()
             error: (err) ->
-                console.error "Rows Error:", err
+                console.error "Error while loading rows from `#{connectionUrl}`:", err
         $.ajax xhr_params

            tableau.submit()

    columns: (connection_data, schemaCallback) ->
        connectionUrl = "#{PROXY_SERVER_CONFIG.protocol}://#{window.location.host}:#{PROXY_SERVER_CONFIG.port}/sap/tabledefinitions"
        config = JSON.parse(tableau.password)
        config.wsdl = connection_data.wsdl
        config.table = connection_data.table

        when 'DATE' then tableau.dataTypeEnum.date
        else tableau.dataTypeEnum.string


# Attempts to convert a list of fields to a table schema compatible
# with tableau
toTableauSchema = (fields)->
    fields.map (field)-> {id: sanitizeId(field.name), dataType: transformType(field.type) }


#  Replaces any non-id characters with an underscore
sanitizeId = (name)->
  name.replace(/[^a-zA-Z0-9_]/g, '_')

wdc_base.make_tableau_connector
    steps:
