How can I live Explore/Query a MS SQL DB

Can I write SQL code for Data Connector “Explore source”?

I would like to query a database on a more generic way. In this example I am looking to get any tables with references to BLOBs and ideally find out if there are any BLOBs that are actually store in the database and if there are any references to BLOBs in a external BLOB Storage.

Using the “Explore source” I currently have to manually go through each table and and look for table names etc. Is there a smarter/faster way to do it?

Background

  • I can’t get access to any database documentation.
  • I have a Data Connector (Microsoft SQL Server) to a database which has hundreds of tables with very undescriptive names.

There used to be a first class way (for good reasons!) to write custom SQL Query but for some odd reasons that was removed.

We have raised it as a FR to add it back.

1 Like

I think I have a way forward.

Basically pulling in the “sys” tables for “types” ("sys.“types”) and then filtering to image and varbinary which are the SQL was of storing BLOBs in SQL dbs.

And then I get the sys tables for “sys”.“all_columns” and tables so I can get all the tables with columns that are BLOB types.

Will update on progres…

You can preview any SQL statement by creating a Sync and writing SQL there and seeing what is displayed in the preview at the bottom of the screen. Or are you referring to something else ?

I have a solution.

What I first wanted to do is to explore the whole DB using SQL. I know you can do SQL for a specific dataset (cool!).

I ingested the sys tables and from that could get tables that contain columns of types image or varbinary which are attachments. So solved!