# Usage of OneDrive Connector in ETL pipeline

To use OneDrive connector in the ETL pipeline, the file details can be provided in multiple ways both in the Reader and the Writer.

## OneDrive Connector path settings

To read data from OneDrive, users have the following options to provide details about the source file.

### **File URL (Root Folder path) and filename (if file is on root drive)**

Path of File: [https://onedrive.live.com/?id=root\&cid=5XXXXXXXXXXXX](https://onedrive.live.com/?id=root\&cid=57E4E812538D60BA)XXX

File name: testonedrive.csv

### Folder link and File name

* Path of File: folder URL&#x20;
  * Right click the folder>Share.
  * Click Copy.
  * Copy link.
* File name: name of file.

<figure><img src="https://media.langstack.com/documentation/media/images/connector/onedriveconnector/rcfsharecopylink1.png" alt=""><figcaption></figcaption></figure>

<figure><img src="https://media.langstack.com/documentation/media/images/connector/onedriveconnector/rcfsharecopylink2.png" alt=""><figcaption></figcaption></figure>

<figure><img src="https://media.langstack.com/documentation/media/images/connector/onedriveconnector/rcfsharecopylink3.png" alt=""><figcaption></figcaption></figure>

<figure><img src="https://media.langstack.com/documentation/media/images/connector/onedriveconnector/rcfsharecopylink4.png" alt=""><figcaption></figcaption></figure>

### **Folder path and File name**

* Path of File: folder path (example: folder1/folder2/folder3/)
* File name: name of file

<figure><img src="https://media.langstack.com/documentation/media/images/connector/onedriveconnector/foldpathfilename1.png" alt=""><figcaption></figcaption></figure>

### **File URL**

Path of File: File Path (File URL generated by right-click on file>select Preview)

<figure><img src="https://media.langstack.com/documentation/media/images/connector/onedriveconnector/rcfpreview1.png" alt=""><figcaption></figcaption></figure>

<figure><img src="https://media.langstack.com/documentation/media/images/connector/onedriveconnector/rcfpreview2.png" alt=""><figcaption></figcaption></figure>

<figure><img src="https://media.langstack.com/documentation/media/images/connector/onedriveconnector/rcfpreview3.png" alt=""><figcaption></figcaption></figure>

### File URL and no File name

* Path of File: file URL&#x20;
  * Right click the file>Share.
  * Click Copy.
  * Copy link.
* File name: empty.

<figure><img src="https://media.langstack.com/documentation/media/images/connector/onedriveconnector/fileurlnofn1.png" alt=""><figcaption></figcaption></figure>

<figure><img src="https://media.langstack.com/documentation/media/images/connector/onedriveconnector/fileurlnofn2.png" alt=""><figcaption></figcaption></figure>

<figure><img src="https://media.langstack.com/documentation/media/images/connector/onedriveconnector/fileurlnofn3.png" alt=""><figcaption></figcaption></figure>

<figure><img src="https://media.langstack.com/documentation/media/images/connector/onedriveconnector/fileurlnofn4.png" alt=""><figcaption></figcaption></figure>

### Folder path including File name

Path of File: file path (example: folder1/folder2/file1.csv),&#x20;

File name: empty

<figure><img src="https://media.langstack.com/documentation/media/images/connector/onedriveconnector/folderpathincfilename1.png" alt=""><figcaption></figcaption></figure>

### **Shared files**

Shared files/folders are available to the OneDrive connector.&#x20;

In order to access shared files/folders, the links, URLs, or Folder/file paths can be given as per in the earlier scenarios with the exception that when we are using paths (not URLs), the path must start with "/shared".

Note: If a user has a folder named "shared" in this root and they try to access it with the path (like /shared/...), it will not work because the connector will assume that it should be searching for shared files/folders. The way to work around this is to start the path with "my files". Therefore the path will look like "/my files/shared/...". The text 'my files' can always be used at the beginning of the path when pointing to the user's drive, however it is not necessary.

<figure><img src="https://media.langstack.com/documentation/media/images/connector/onedriveconnector/sharedpath1.png" alt=""><figcaption></figcaption></figure>

### **No preexisting destination file (connector as writer)**

In case the file path is known, however, there is no destination file, provide the file (folder) path. On running the ETL, a file will be created labelled as “temp\_(generated GUID number)”. &#x20;


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.langstack.com/welcome/in-depth-learning/connectors/onedrive-connector/usage-of-onedrive-connector-in-etl-pipeline.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
