Works with v1.0+
Use the SharePoint Data Connector to query documents stored in SharePoint from Spice.
- Spice CLI installed.
- Access to a SharePoint instance, and know the associated tenant ID.
- (Optional) Upload relevant documents to the user's root sharepoint directory
Step 1. Clone this sample
git clone https://github.com/spiceai/cookbook.git
cd cookbook/sharepointStep 2. Login in Sharepoint via Spice CLI.
export TENANT_ID=<YOUR_TENANT_ID>
spice login sharepoint --tenant-id $TENANT_ID --client-id f2b3116e-b4c4-464f-80ec-73cd9d9886b4Step 3. Start the Spice runtime.
spice runConfirm in the terminal output that the important_documents dataset has been loaded:
Spice.ai runtime starting...
2024-09-16T12:34:56.789012Z INFO spiced: Metrics listening on 127.0.0.1:9090
2024-09-16T12:34:56.789012Z INFO runtime: Loaded dataset: important_documentsStep 4. Run queries against the dataset using the Spice SQL REPL.
In a new terminal, start the Spice SQL REPL:
spice sqlQuery the important_documents dataset.
SELECT web_url FROM important_documents;- SharePoint Data Connector Documentation.
- Spice CLI Reference for SQL queries.
- Datasets Reference for more configuration options.