usql icon indicating copy to clipboard operation
usql copied to clipboard

How to describe/Show table in U-SQL?

Open HermeetB opened this issue 7 years ago • 5 comments

I have a requirement to pull the table schema information using U-SQL. Like the columns in table and datatype. How can I achieve this?

HermeetB avatar Apr 06 '18 06:04 HermeetB

U-SQL has a full set of catalog views, e.g., usql.tables etc. The documentation on http://aka.ms/usql_reference contains examples etc.

MikeRys avatar Apr 07 '18 03:04 MikeRys

The requirement has changed a bit. Instead of table we need Views. So finally we want columns and datatypes of a view not table. Can you please help to achieve this?

HermeetB avatar Apr 09 '18 10:04 HermeetB

Views is a bit harder since we currently only track their names and definition in the catalog views. The schema is inferred from the query at compile time, since the view is bound late during inlining and compilation and is not guaranteed to be the same as when the view was defined. Can you please file a feature request at http://aka.ms/adlfeedback for supporting at least the option?

MikeRys avatar Apr 09 '18 18:04 MikeRys

Thanks a lot for your help Mike. I will file a request in the above shared link.

HermeetB avatar Apr 10 '18 04:04 HermeetB

Thanks... Please close the issue once you filed or upvoted the request.

MikeRys avatar Apr 10 '18 18:04 MikeRys