madd0 / azurestoragedriver Goto Github PK
View Code? Open in Web Editor NEWA LINQPad driver to perform queries against Azure Table Storage.
License: MIT License
A LINQPad driver to perform queries against Azure Table Storage.
License: MIT License
When you create a connection, by default it sets UseHttps to false. It then stores the connection info in the connections.xml file and does not serialize UseHttps since it's a default value.
Then when you attempt to deserialize UseHttps, you get an empty string which throws a format exception when you try to convert it to a bool. By manually adding false to the connections file, or setting UseHttps to true in the UI, you can get around this error.
Update StorageAccountProperties.UseHttps to pull out the XElement value, and then manually call Bool.TryParse on it to avoid this problem.
When running LINQPad 6 (have tried both 6.5.5 and 6.6.1) with .NET Core 3.1 installed, I get an error when attempting to interact with connections that use the Azure Storage Driver:
Error: Cannot compile typed context: Assuming assembly reference 'System.Runtime, Version=4.2.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' used by 'Madd0.AzureStorageDriver' matches identity 'System.Runtime, Version=4.2.2.0, Culture=neu
(the tooltip is truncated at that point)
If only netcore3.0 is installed, everything works fine.
If netcore3.1 and netcore3.0 are both installed, it fails. If only netcore3.1 is installed, it fails.
When trying to connect to Azure TableStorage from LinqPad6 (using nuget driver) I recieve an error:
Error: Can not compile typed context: Assembly 'Madd0.AzureStorageDriver' with identity 'Madd0.AzureStorageDriver, Version 2.1.0.0, Culture=neutral, PublicKeyToken=null' uses 'System.Runtime, Version 4.2.2.0, Culture=neutral, ...
In LinqPad5 the same connection is working and I am able to connect using TableStorage driver.
Are there some prerequisites needed? LinqPad is working by itself. And able to connect to SQL.
I saw closed ticked, but the problem seems not solved... Driver version 2.1.0.0
Azure storage explorer limits the results to 2000, it would be nice to use continuation tokekens, get all the data back into a collection, then use the full linq syntax
The specific warning is :
Warning: LINQPad has identified the following vulnerabilties in NuGet package Newtonsoft.Json 10.0.2:
Level 2 (High): https://github.com/advisories/GHSA-5crp-9r3c-p9vr
Try updating NuGet packages to latest. You can suppress this warning in Edit | Preferences > Advanced > Execution.
I've tried pulling the code and updating newtonsoft to version 13, but, i have no idea how to build / publish / test this :(
There's a newer version of the Microsoft.Azure.Cosmos.Table
(1.0.8) , which it fails to install (doubt it'll fix the issue though, as that vulnerability was fixed in the newtosoft v 13, which was released in Mach '21, and the 1.0.8 was done in august '20).
The whole Microsoft.Azure.Cosmos.Table
is deprecated as well ...
not sure if it's an easy fix, or worth fixing, but figured i'll post it in case you do want to give it a go .
(oh, and cheers for you work BTW, regardless ๐ )
Cheers, for any suggestion.
We may need to look at a console app if it can't.
I've added a new LinqPad connection and i can see the tables i've got stored. But when I try to fetch some data, for example:
data.Take (100)
I get the following exception:
NotSupportedException: Fluent methods may not be invoked on a Query created via CloudTable.CreateQuery
After creating a connection with this driver, the connection appears in red in the connection list with this identifier:
(Error: String was not recognized as a valid Boolean.)
It doesn't matter if I provider correct credentials or fake values.
I'm using LinqPad 4.45.05. I don't know how to see the AzureStorageDriver version, but I installed it yesterday from within LinqPad.
I am quite new to linqpad, and this driver seems terribly useful to me.
Getting "Bad Request" when using the following LINQ query:
from t in TestTable
where t.PartitionKey == "Date Test" && t.TestDate < t.Timestamp
select t
Resulting query is: (PartitionKey eq 'Date Test') and (() lt ())
While the LINQ query is valid, OData only supports a subset of criteria and therefore cannot be translated.
Could an exception should be raised in those instances?
Please, add proxy support. On my work I am forced to use corporate proxy.
I get an exception indicating failure in initialization code on line 171 in AzureDriver.cs. I guess the environment in lprun.exe is not the same as running under LINQPad.exe.
NullReferenceException: Object reference not set to an instance of an object.
at Madd0.AzureStorageDriver.AzureDriver.<>c__DisplayClass1.b__0(Object sender, SendingRequestEventArgs e) in d:\Projec
ts\GitHub\AzureStorageDriver\Madd0.AzureStorageDriver\AzureDriver.cs:line 171
at System.EventHandler1.Invoke(Object sender, TEventArgs e) at System.Data.Services.Client.DataServiceContext.CreateRequest(Uri requestUri, String method, Boolean allowAnyType, String contentType, Version requestVersion, Boolean sendChunked) at System.Data.Services.Client.DataServiceRequest.CreateResult(Object source, DataServiceContext context, AsyncCallback callback, Object state) at System.Data.Services.Client.DataServiceRequest.Execute[TElement](DataServiceContext context, QueryComponents queryComponents) at System.Data.Services.Client.DataServiceQuery
1.Execute()
at System.Data.Services.Client.DataServiceQuery1.GetEnumerator() at System.Linq.Buffer
1..ctor(IEnumerable1 source) at System.Linq.Enumerable.ToArray[TSource](IEnumerable
1 source)
at UserQuery in c:\Users\erl\Documents\LINQPad Queries\PSS\Tempser.linq:line 29
Because the code is only reading the first row of a table, the schema is incompleted. So to have the full schema is necessary to read all the values of the table.
In the SchemaBuilder class the GetModel method has the following statement, that can show what i'm saying.
// Read the first entity to determine the table's schema
var firstRow = dataContext.CreateQuery(table.Name).Take(1).FirstOrDefault();
from e in ErrorInfo
where e.StatusMessage.Contains("Timeout")
select e
This fails, the inner exception just says not implemented.
I recently added new properties to an Azure Table. i.e. Old table entries had EventId, EventValue. I added Platform and ContentId values to new rows.
When I run a Linq query in linqpad, it doesn't show the new values. I was able to verify that they are there using Visual Studio. Is there something being cached that is preventing the new data from showing up in the query?
Here's an example query i'm using.
from c in ContentConsumptionEventLog
where c.EventTimestamp > DateTime.Parse("04-25-2018 13:00")
select c
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.