Question

Hi i have a database with 500+ tables, and i want to create a sample of each table. The sample should be the top 10 rows in each table, and i'll write them to a flat file format like CSV.


Badge

I can create a list of schemas and tables, using a SQLCreator

select schema_name(t.schema_id) as schema_name, t.name as table_name
from sys.tables t

and then i can use that in an SQLExecutor

select top 10 *
from [@Value(schema_name)].[@Value(table_name)]

and this is where i get stuck, as each table will have different attributes to expose.

 

I have also tried using a dynamic reader & writer combination, but couldn't workout how to stop it reading all the records in each table (which would take way too long to run). 

 

i'd appreciate any help you can offer. 

 

 

 


0 replies

Be the first to reply!

Reply