# Create metadata from Database does not populate String lens

**URL:** <https://forum.cloverdx.com/t/create-metadata-from-database-does-not-populate-string-lens/678>\
**Category:** CloverDX Platform\
**Created:** [March 21, 2010, 12:00am UTC](https://forum.cloverdx.com/t/create-metadata-from-database-does-not-populate-string-lens/678 "2010-03-21T00:00:00Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![marcd](https://avatars.discourse-cdn.com/v4/letter/m/e99b99/32.png) [@marcd](https://forum.cloverdx.com/u/marcd)\
**Post date:** [March 21, 2010, 12:00am UTC](https://forum.cloverdx.com/t/create-metadata-from-database-does-not-populate-string-lens/678/1 "2010-03-21T00:00:00Z")

</div>

Try creating metadata from a database table. Then take that same metadata and create a different database table in same database.

The tables are VERY different. For some reason Clover is putting default varchar(80) lengths for strings etc. I have not checked out every other data type but I assume there are other ‘default’ problems.

This is horrible for large tables where char(2) is VERY different from varchar(80) with 1 million rows. Does anyone know how to get the ‘create metadata from table’ wizard to correctly populate metadata and keep string lengths etc?

Or is this a ‘feature’?? :evil: Thanks.

---

<div class="post-metadata">

**Author:** ![dpavlis](https://avatars.discourse-cdn.com/v4/letter/d/90ced4/32.png) [@dpavlis](https://forum.cloverdx.com/u/dpavlis)\
**Post date:** [March 22, 2010, 8:43am UTC](https://forum.cloverdx.com/t/create-metadata-from-database-does-not-populate-string-lens/678/2 "2010-03-22T08:43:55Z")

</div>

Hi,

This is currently sort of a feature. Clover stores all data as variable-length - especially strings. When it extracts metadata from database, it does not store the original length constraint (again, especially for strings/varchars). Therefore when you take existing Clover metdata and try to use it for creating/generating table in DB, Clover has no information as to what should be the exact DB field definition. Thus, it defaults it to 80 characters.

Said that, I am creating a feature request in our bug tracking system to improve this situation. Hopefully it will make it into upcoming 2.10 release. Here is the corresponding issue, so you can track it: [http://bug.cloveretl.com/view.php?id=3938](http://bug.cloveretl.com/view.php?id=3938)

David.
