我正在使用dremio查询大量的数据,它的工作非常好。它有rest来获取数据,但是唯一的限制是它可以给出500个记录。在java中,dremio社区提供了jdbc连接字符串,但是我们的项目是.net或c#,所以我们需要连接字符串来从Dremio获取大量的数据。如果C#中没有连接字符串,那么有人可以建议我们如何在C#中使用。
发布于 2019-04-25 20:08:28
Dremio和Dremio有ODBC接口,参见:https://drill.apache.org/docs/configuring-odbc/
https://docs.dremio.com/drivers/dremio-odbc-driver.html
因此,您可以设置C#项目来使用ODBC连接字符串,而不是JDBC:https://support.office.com/en-us/article/connect-to-an-odbc-source-49b0cf4d-ef78-4ad1-b224-39091c067953。
static private void InsertRow(string connectionString)
{
string queryString =
"INSERT INTO Customers (CustomerID, CompanyName) Values('NWIND', 'Northwind Traders')";
OdbcCommand command = new OdbcCommand(queryString);
using (OdbcConnection connection = new OdbcConnection(connectionString))
{
command.Connection = connection;
connection.Open();
command.ExecuteNonQuery();
// The connection is automatically closed at
// the end of the Using block.
}
}其中连接字符串示例
Driver;AdvancedProperties={HandshakeTimeout=0;QueryTimeout=0;TimestampTZDisplayTimezone=utc;ExcludedSchemas=sys,INFORMATION_SCHEMA;};Catalog=DRILL;Schema=hivestg;ConnectionType=Direct;Host=192.168.202.147;Port=31010 DRIVER=MapR钻头 Driver;AdvancedProperties={HandshakeTimeout=0;QueryTimeout=0;TimestampTZDisplayTimezone=utc;ExcludedSchemas=sys,INFORMATION_SCHEMA;};Catalog=DRILL;Schema=;ConnectionType=ZooKeeper;ZKQuorum=192.168.39.43:5181;ZKClusterID=drillbits1 DRIVER=MapR钻机
https://stackoverflow.com/questions/55785715
复制相似问题