MS SQL

The Turboline.NLQ2SQL.MSSQL package allows developers to convert natural language queries into SQL for Microsoft SQL Server databases. It integrates easily with .NET applications, enabling users to query databases without needing SQL knowledge. The package provides features for authentication, API integration, and customization through app settings, simplifying the process of interacting with SQL databases using natural language. It is especially useful for creating AI-driven query tools and dashboards.

Download Nuget Package

Download your package here.

Objective

To integrate MSSQL Turboline Packages into your application efficiently and effectively.

Key Steps

  1. Create a blank project using the ASP.NET web app model view controller.
  2. Choose .NET 8.0 for the project.
  3. Select individual accounts for authentication.
  4. Install the MSSQL package from NuGet packages. dotnet add package Turboline.NLQ2SQL.MSSQL
  5. Add code in the program.cs file:
    • Add namespace using Turboline.NLQ2SQL.MSSQL;.
    • Add builder.Services.EnableTurbolineDashboard(builder.Configuration).ActivateMSSQL();.
    • Add app.UseTurbolineDashboard().UseMSSQL(); after the controller route.
  6. Update the application settings with the following configurations (code example below):
    • Set MSSQL as the database type.
    • Provide the connection string for the database.
    • Add an API key obtained from the plan subscription from https://platform.turboline.ai.
    • Set an app name and logo URL.

"NLQ2SQLSettings": {
  "MSSQL": {
    "ConnectionString": "<Connectionstring>"
  },
  "APIKey": "YourAPIKeyHere",
  "AppName": "Amtev Data Studio, Powered by Turboline",
  "Logo": "https://cdn.turboline.ai/cdn/adminlte/dist/img/TLLogo.png",
  "Timeout": 30,
  "IsActive": true,
  "Version": 1.0,
  "LastAccess": null
}

  1. Run the project to complete the setup.
  2. To access the Turboline NLQ to MSSQL, navigate /Turboline/mssql.

Cautionary Notes

  • Ensure correct installation of the MSSQL package from NuGet.
  • Double-check the code additions in the program.cs file for accuracy.
  • Securely store and manage the API key obtained from the subscription plan.

Tips for Efficiency

  • Follow the steps sequentially to avoid missing any crucial configurations.
  • Keep all necessary information and URLs handy for quick reference during setup.
  • Test the integration thoroughly after completion to ensure functionality.

By following these steps, you can seamlessly integrate MSSQL Turboline Packages into your application within a few minutes.


Tutorial: Generate API Keys


Tutorial: Integrate Turboline Packages in Your .NET Application