Function: WebGetTableMetadata

This is primarily intended to be an internal function used by xSkrape Script Generator, as described in the fundamentals white-paper. It describes the characteristics of the source data table so that code generation can construct a strongly-typed wrapper for the corresponding tabular data.

Usage

  • SQL Server
    WebGetTable(@serviceUrl nvarchar(1000)
    , @parseUrl nvarchar(MAX)
    , @tableCriteriaQuery nvarchar(MAX)
    , @additionalConfig nvarchar(2000))

Parameters

  • SQL Server
    • @serviceUrl
      A URL reference to your SQL-Hero application server services. Typically this would be "http://servername:46837" where "servername" matches the server on which you installed the SQL-Hero services, with port 46837 being the default port number used by the SQL-Hero installer program.
    • @parseUrl
      A reference to the source data to be queried. Can be a reference that is HTTP, HTTPS or FILE based. Can optionally be an expression that supports loading data across multiple requests, as described here.
    • @tableCriteriaQuery
      A query specification to isolate a specific table from the raw source data. Details about the query syntax are covered here. If there are multiple tables that meet the given criteria, the first table is used.
    • @additionalConfig
      An optional list of configuration parameters that control how the query is issued. Details about the configuration parameters syntax are covered here. Provide an empty string or NULL if there are no configuration parameters needed (i.e. default behavior).

Return Value(s)

  • SQL Server
    • As a table-valued UDF, returns a fixed table of the format:
      (ColumnName nvarchar(1000)
      , ColumnNumber int
      , NetDataType nvarchar(1000))
    • ColumnName and NetDataType provide details about the nature of the corresponding ColumnNumber. The implied primary key is (ColumnNumber).

Remarks

This function is intended for use by the script generator / template engine to create strongly-typed SQL wrappers for tabular data sources, and has limited benefit being called directly - therefore no examples will be provided.