Skip to content

Commit 728ecd2

Browse files
tpellissierclaude
andcommitted
Add tables.list(filter, select) usage to examples
Exercise the new filter and select params in functional_testing.py and installation_example.py to improve E2E coverage. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 6688d6e commit 728ecd2

2 files changed

Lines changed: 20 additions & 1 deletion

File tree

examples/basic/functional_testing.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,13 @@ def setup_authentication() -> DataverseClient:
6565
print("Testing connection...")
6666
tables = client.tables.list()
6767
print(f"[OK] Connection successful! Found {len(tables)} tables.")
68+
69+
# Test filtered + selected list
70+
user_owned = client.tables.list(
71+
filter="OwnershipType eq Microsoft.Dynamics.CRM.OwnershipTypes'UserOwned'",
72+
select=["LogicalName", "SchemaName", "DisplayName"],
73+
)
74+
print(f"[OK] Found {len(user_owned)} user-owned tables (filter + select).")
6875
return client
6976

7077
except Exception as e:

examples/basic/installation_example.py

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,6 +250,13 @@ def show_usage_examples():
250250
# List all tables
251251
tables = client.tables.list()
252252
print(f"Found {len(tables)} tables")
253+
254+
# List with filter and select
255+
custom_tables = client.tables.list(
256+
filter="IsCustomEntity eq true",
257+
select=["LogicalName", "SchemaName", "DisplayName"],
258+
)
259+
print(f"Found {len(custom_tables)} custom tables")
253260
```
254261
""")
255262

@@ -289,9 +296,14 @@ def interactive_test():
289296

290297
print(" Testing connection...")
291298
tables = client.tables.list()
292-
293299
print(f" [OK] Connection successful!")
294300
print(f" Found {len(tables)} tables in environment")
301+
302+
custom_tables = client.tables.list(
303+
filter="IsCustomEntity eq true",
304+
select=["LogicalName", "SchemaName"],
305+
)
306+
print(f" Found {len(custom_tables)} custom tables (filter + select)")
295307
print(f" Connected to: {org_url}")
296308

297309
print("\n Your SDK is ready for use!")

0 commit comments

Comments
 (0)