ODBC data source metadata handling (manually increasing column length)

ZappySys ODBC Package: Do the metadata values come from source api or are these created in ZappySYS during import? I do have mismatches in metadata string length definitions and results. If the results values are bigger than metadata definitions, export to SQL Server fails.

Hi @JoeRiese and welcome to the ZappySys Community!

What is the actual error are you getting?

Regarding your metadata question, it depends on several things, e.g. which ZappySys ODBC driver you are using and the query itself:

  • If you are using the ZappySys API Driver and an API Connector, then only one call - the actual one - is made to retrieve the data, because metadata is embedded into the API Connector.
  • If you are using non-API Driver like JSON Driver or XML Driver then the driver makes a call to the source API to detect the metadata and corresponding data types (and lengths) and then it makes a second, the actual call, to the source API to get the data.

However, even using ZappySys JSON/XML/CSV Driver you can have complete control over metadata by manually specifying it in the query itself (then only one call will be made to the API):

select * from value WITH( meta='col1: int32; col2: string(10); col3: boolean; col4: datetime; col5: int64;col6: double' )

You can find more info in this article:

The error message is ‘One row cannot be retrieved from the OLE DB provider “SQLNCLI11” for the linkedserver “DEV_BDKAT_GATEWAY”.’

I found out the reason: One Column “Description” is much bigger than what metadata shows, 756 charakters, while metadata says 516 charakters.

But many thanks for your info, I will study this article!

Problem is solved, thx.
“Description about View / Edit Metadata stored in DSN Storage” screenshot in Article,

Glad to hear you found the answer, @JoeRiese!

Yes, you can do it via UI too. Have in mind, that in production environment you will have replicate the ODBC data source settings to include this metadata change.

You could also achieve the same result directly in the SQL query by increasing the Description column length to 1000, like this:

select * from value WITH (meta='Description: string(1000);YourOtherColumn: int32')