Search code examples
u-sql

Use references in views


I thinking of putting a logical layer on top of all raw files that comes in to data lake store.

I would like to have a view that combines all files that are the same "type" but are divided into date folders. I was thinking of doing this with a view and a dynamic folder path.

The problem that I have is that the files are avro and json file and for this I need assemblies. Is there a way that I can refrence the the asseblies in the views?

Or is it possible to do in an other way? suc as using table value functions etc?


Solution

  • The query expression inside the USQL View at the moment do not allow any User Defined Objects and you cannot REFERENCE any assemblies within a USQL View definition.

    You may be better with parametrized view (i.e. Table value functions) - you don't have to necessarily have a parameter. TVF provides great flexibility, for example if you want get just a Month or year worth of data - you could use USQL filesets and pass in parameters.