Skip to content

feat: [sc-71453] Retrieve "Append instead of overwrite" parameter and use it in the Sharepoint List custom dataset #62

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## [Version 1.1.5](https://github.com/dataiku/dss-plugin-sharepoint-online/releases/tag/v1.1.5) - Feature release - 2024-10-15

- Enables the "Append instead of overwrite" checkbox in sync recipes for SharePoint lists

## [Version 1.1.4](https://github.com/dataiku/dss-plugin-sharepoint-online/releases/tag/v1.1.4) - Feature release - 2024-07-16

- Fix writing when using presets with no root folder defined
Expand Down
2 changes: 1 addition & 1 deletion plugin.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"id": "sharepoint-online",
"version": "1.1.4",
"version": "1.1.5",
"meta": {
"label": "SharePoint Online",
"description": "Read and write data from/to your SharePoint Online account",
Expand Down
3 changes: 2 additions & 1 deletion python-connectors/sharepoint-online_lists/connector.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
"icon": "icon-cloud"
},
"readable": true,
"writable": false,
"writable": true,
"supportAppend": true,
"params": [
{
"name": "auth_type",
Expand Down
7 changes: 4 additions & 3 deletions python-connectors/sharepoint-online_lists/connector.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ def __init__(self, config, plugin_config):
self.expand_lookup = config.get("expand_lookup", False)
self.metadata_to_retrieve = config.get("metadata_to_retrieve", [])
advanced_parameters = config.get("advanced_parameters", False)
self.write_mode = "create"
if not advanced_parameters:
self.max_workers = 1 # no multithread per default
self.batch_size = 100
Expand Down Expand Up @@ -112,9 +111,11 @@ def format_row(self, row):
return row

def get_writer(self, dataset_schema=None, dataset_partitioning=None,
partition_id=None):
partition_id=None, write_mode="OVERWRITE"):
assert_list_title(self.sharepoint_list_title)
return self.client.get_writer(dataset_schema, dataset_partitioning, partition_id, self.max_workers, self.batch_size, self.write_mode)
if write_mode != "APPEND":
write_mode = SharePointConstants.WRITE_MODE_CREATE
return self.client.get_writer(dataset_schema, dataset_partitioning, partition_id, self.max_workers, self.batch_size, write_mode)

def get_partitioning(self):
logger.info('get_partitioning')
Expand Down
2 changes: 1 addition & 1 deletion python-lib/dss_constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class DSSConstants(object):
"sharepoint_oauth": "The access token is missing"
}
PATH = 'path'
PLUGIN_VERSION = "1.1.4"
PLUGIN_VERSION = "1.1.5"
SECRET_PARAMETERS_KEYS = ["Authorization", "sharepoint_username", "sharepoint_password", "client_secret", "client_certificate", "passphrase"]
SITE_APP_DETAILS = {
"sharepoint_tenant": "The tenant name is missing",
Expand Down