fsprojects / AzureStorageTypeProvider

An F# Azure Type Provider which can be used to explore Blob, Table and Queue Azure Storage assets and easily apply CRUD operations on them.
http://fsprojects.github.io/AzureStorageTypeProvider/
The Unlicense
84 stars 34 forks source link

Explicit Table schema #98

Closed isaacabraham closed 7 years ago

isaacabraham commented 7 years ago

Add the ability to explicitly identify a table schema through a static file.

isaacabraham commented 7 years ago

@mathias-brandewinder what do you think of a schema like this: -


{
    "tables": [
        {
            "table": "myTable",
            "columns": [
                {
                    "Column": "ColumnA",
                    "Type": "String",
                    "Optional": true
                },
                {
                    "Column": "ColumnB",
                    "Type": "DateTime",
                    "Optional": true
                },
                {
                    "Column": "ColumnC",
                    "Type": "Int64"
                }
            ]
        }
    ]
}```
isaacabraham commented 7 years ago

@mathias-brandewinder would you be interested in testing this out? If you check out the latest commit in the static-table-schema branch, run build.cmd and then copy over the AzureStorageTypeProvider dll (in the bin folder) to wherever you're referencing the current version, you should be able to pass in another parameter, tableSchema, which points to the file that must look as per the above. This appears to work for me locally (at least, at a cursory glance / test).

mathias-brandewinder commented 7 years ago

That looks reasonable. Can't promise how quickly I can test this out, but I'll try my best - at the very least, I'll give the approach some thought :)

isaacabraham commented 7 years ago

Fixed by #99 .