Azure Storage Type Provider: FS0039 on build, but intellisense shows the type as available

I am trying to access a type from our Azure Storage account using the Azure Storage Type Provider :

type AzAcc = AzureTypeProvider<"{our ac name}","{our key}"> type clientEntity = AzAcc.Domain.FeedLabClientsEntity 

I get intellisense for type FeedLabClientsEntity and I can continue working without red squiggly Visual Studio, but when building the second line above it gives an error

 error FS0039: The type 'FeedLabClientsEntity' is not defined 

How can I access this type?

+5
source share
1 answer

Basically, this is a β€œfunction” of TP. Unlike most other TPs that eagerly evaluate a schema and generate a type system in front, Azure TP generates types on demand, so only after navigating through blocks or tables do these types become available. This is mainly due to savings on potential IOs - if you point to a real Azure account, theoretically you can have an infinite number of tables and drops.

You can get around this by first trying to access the corresponding table using, for example, GetPartition.

+2
source

All Articles