atlan-application-sdk 0.1.1rc59__py3-none-any.whl → 0.1.1rc61__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- application_sdk/constants.py +11 -5
- application_sdk/observability/observability.py +7 -22
- application_sdk/outputs/__init__.py +1 -0
- application_sdk/outputs/parquet.py +2 -1
- application_sdk/version.py +1 -1
- {atlan_application_sdk-0.1.1rc59.dist-info → atlan_application_sdk-0.1.1rc61.dist-info}/METADATA +2 -2
- {atlan_application_sdk-0.1.1rc59.dist-info → atlan_application_sdk-0.1.1rc61.dist-info}/RECORD +10 -10
- {atlan_application_sdk-0.1.1rc59.dist-info → atlan_application_sdk-0.1.1rc61.dist-info}/WHEEL +0 -0
- {atlan_application_sdk-0.1.1rc59.dist-info → atlan_application_sdk-0.1.1rc61.dist-info}/licenses/LICENSE +0 -0
- {atlan_application_sdk-0.1.1rc59.dist-info → atlan_application_sdk-0.1.1rc61.dist-info}/licenses/NOTICE +0 -0
application_sdk/constants.py
CHANGED
|
@@ -51,7 +51,9 @@ SQL_SERVER_MIN_VERSION = os.getenv("ATLAN_SQL_SERVER_MIN_VERSION")
|
|
|
51
51
|
SQL_QUERIES_PATH = os.getenv("ATLAN_SQL_QUERIES_PATH", "app/sql")
|
|
52
52
|
|
|
53
53
|
# Output Path Constants
|
|
54
|
-
#: Output path format for workflows
|
|
54
|
+
#: Output path format for workflows.
|
|
55
|
+
#:
|
|
56
|
+
#: Example: objectstore://bucket/artifacts/apps/{application_name}/workflows/{workflow_id}/{workflow_run_id}
|
|
55
57
|
WORKFLOW_OUTPUT_PATH_TEMPLATE = (
|
|
56
58
|
"artifacts/apps/{application_name}/workflows/{workflow_id}/{run_id}"
|
|
57
59
|
)
|
|
@@ -68,7 +70,9 @@ CLEANUP_BASE_PATHS = [
|
|
|
68
70
|
]
|
|
69
71
|
|
|
70
72
|
# State Store Constants
|
|
71
|
-
#: Path template for state store files
|
|
73
|
+
#: Path template for state store files.
|
|
74
|
+
#:
|
|
75
|
+
#: Example: objectstore://bucket/persistent-artifacts/apps/{application_name}/{state_type}/{id}/config.json
|
|
72
76
|
STATE_STORE_PATH_TEMPLATE = (
|
|
73
77
|
"persistent-artifacts/apps/{application_name}/{state_type}/{id}/config.json"
|
|
74
78
|
)
|
|
@@ -147,7 +151,9 @@ WORKER_START_EVENT_VERSION = "v1"
|
|
|
147
151
|
#: Whether to enable Atlan storage upload
|
|
148
152
|
ENABLE_ATLAN_UPLOAD = os.getenv("ENABLE_ATLAN_UPLOAD", "false").lower() == "true"
|
|
149
153
|
# Dapr Client Configuration
|
|
150
|
-
#: Maximum gRPC message length in bytes for Dapr client
|
|
154
|
+
#: Maximum gRPC message length in bytes for Dapr client.
|
|
155
|
+
#:
|
|
156
|
+
#: Default: 100MB
|
|
151
157
|
DAPR_MAX_GRPC_MESSAGE_LENGTH = int(
|
|
152
158
|
os.getenv("DAPR_MAX_GRPC_MESSAGE_LENGTH", "104857600")
|
|
153
159
|
)
|
|
@@ -250,9 +256,9 @@ REDIS_HOST = os.getenv("REDIS_HOST", "")
|
|
|
250
256
|
REDIS_PORT = os.getenv("REDIS_PORT", "")
|
|
251
257
|
#: Redis password (required for authenticated Redis instances)
|
|
252
258
|
REDIS_PASSWORD = os.getenv("REDIS_PASSWORD")
|
|
253
|
-
#: Redis Sentinel service name
|
|
259
|
+
#: Redis Sentinel service name. Default: mymaster
|
|
254
260
|
REDIS_SENTINEL_SERVICE_NAME = os.getenv("REDIS_SENTINEL_SERVICE_NAME", "mymaster")
|
|
255
|
-
#: Redis Sentinel hosts
|
|
261
|
+
#: Redis Sentinel hosts as comma-separated host:port pairs
|
|
256
262
|
REDIS_SENTINEL_HOSTS = os.getenv("REDIS_SENTINEL_HOSTS", "")
|
|
257
263
|
#: Whether to enable strict locking
|
|
258
264
|
IS_LOCKING_DISABLED = os.getenv("IS_LOCKING_DISABLED", "true").lower() == "true"
|
|
@@ -10,7 +10,6 @@ from pathlib import Path
|
|
|
10
10
|
from time import time
|
|
11
11
|
from typing import Any, Dict, Generic, List, TypeVar
|
|
12
12
|
|
|
13
|
-
import daft
|
|
14
13
|
import duckdb
|
|
15
14
|
import pandas as pd
|
|
16
15
|
from dapr.clients import DaprClient
|
|
@@ -422,28 +421,14 @@ class AtlanObservability(Generic[T], ABC):
|
|
|
422
421
|
# Lazy import and instantiation of ParquetOutput
|
|
423
422
|
from application_sdk.outputs.parquet import ParquetOutput
|
|
424
423
|
|
|
425
|
-
parquet_output = ParquetOutput(
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
# Use write_daft_dataframe with the DataFrame we have
|
|
431
|
-
from application_sdk.outputs.parquet import WriteMode
|
|
432
|
-
|
|
433
|
-
daft_df = daft.from_pandas(df)
|
|
434
|
-
await parquet_output.write_daft_dataframe(
|
|
435
|
-
dataframe=daft_df,
|
|
436
|
-
write_mode=WriteMode.APPEND, # Append mode to merge with existing data
|
|
437
|
-
)
|
|
438
|
-
|
|
439
|
-
logging.info(
|
|
440
|
-
f"Successfully wrote {len(df)} records to partition: {partition_path}"
|
|
441
|
-
)
|
|
442
|
-
|
|
443
|
-
except Exception as partition_error:
|
|
444
|
-
logging.error(
|
|
445
|
-
f"Error processing partition {partition_path}: {str(partition_error)}"
|
|
424
|
+
parquet_output = ParquetOutput(
|
|
425
|
+
output_path=partition_path,
|
|
426
|
+
chunk_start=0,
|
|
427
|
+
chunk_part=int(time()),
|
|
446
428
|
)
|
|
429
|
+
await parquet_output.write_dataframe(dataframe=df)
|
|
430
|
+
except Exception as e:
|
|
431
|
+
print(f"Error writing records to partition: {str(e)}")
|
|
447
432
|
|
|
448
433
|
# Clean up old records if enabled
|
|
449
434
|
if self._cleanup_enabled:
|
|
@@ -65,6 +65,7 @@ class ParquetOutput(Output):
|
|
|
65
65
|
buffer_size: int = 5000,
|
|
66
66
|
total_record_count: int = 0,
|
|
67
67
|
chunk_count: int = 0,
|
|
68
|
+
chunk_part: int = 0,
|
|
68
69
|
chunk_start: Optional[int] = None,
|
|
69
70
|
start_marker: Optional[str] = None,
|
|
70
71
|
end_marker: Optional[str] = None,
|
|
@@ -105,7 +106,7 @@ class ParquetOutput(Output):
|
|
|
105
106
|
DAPR_MAX_GRPC_MESSAGE_LENGTH * 0.75
|
|
106
107
|
) # 75% of DAPR limit as safety buffer
|
|
107
108
|
self.chunk_start = chunk_start
|
|
108
|
-
self.chunk_part =
|
|
109
|
+
self.chunk_part = chunk_part
|
|
109
110
|
self.start_marker = start_marker
|
|
110
111
|
self.end_marker = end_marker
|
|
111
112
|
self.partitions = []
|
application_sdk/version.py
CHANGED
{atlan_application_sdk-0.1.1rc59.dist-info → atlan_application_sdk-0.1.1rc61.dist-info}/METADATA
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: atlan-application-sdk
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.1rc61
|
|
4
4
|
Summary: Atlan Application SDK is a Python library for developing applications on the Atlan Platform
|
|
5
5
|
Project-URL: Repository, https://github.com/atlanhq/application-sdk
|
|
6
6
|
Project-URL: Documentation, https://github.com/atlanhq/application-sdk/README.md
|
|
@@ -22,7 +22,7 @@ Requires-Python: >=3.11
|
|
|
22
22
|
Requires-Dist: aiohttp>=3.10.0
|
|
23
23
|
Requires-Dist: duckdb-engine>=0.17.0
|
|
24
24
|
Requires-Dist: duckdb>=1.1.3
|
|
25
|
-
Requires-Dist: fastapi[standard]
|
|
25
|
+
Requires-Dist: fastapi[standard]==0.120.2
|
|
26
26
|
Requires-Dist: loguru>=0.7.3
|
|
27
27
|
Requires-Dist: opentelemetry-exporter-otlp>=1.27.0
|
|
28
28
|
Requires-Dist: psutil>=7.0.0
|
{atlan_application_sdk-0.1.1rc59.dist-info → atlan_application_sdk-0.1.1rc61.dist-info}/RECORD
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
application_sdk/__init__.py,sha256=2e2mvmLJ5dxmJGPELtb33xwP-j6JMdoIuqKycEn7hjg,151
|
|
2
|
-
application_sdk/constants.py,sha256=
|
|
3
|
-
application_sdk/version.py,sha256=
|
|
2
|
+
application_sdk/constants.py,sha256=XCRJRiug2GXgeeVZu3Mp1QavRw54bWtzxIZ2l1bIkkA,11028
|
|
3
|
+
application_sdk/version.py,sha256=CEakpB1d62-VZEzrOEEq4LSV4f0w3c23I9GOWtTnui8,88
|
|
4
4
|
application_sdk/worker.py,sha256=i5f0AeKI39IfsLO05QkwC6uMz0zDPSJqP7B2byri1VI,7489
|
|
5
5
|
application_sdk/activities/__init__.py,sha256=L5WXkTwOwGtjWAlXrUJRCKGwyIyp3z8fBv8BZVCRFQI,11175
|
|
6
6
|
application_sdk/activities/lock_management.py,sha256=6Wdf3jMKitoarHQP91PIJOoGFz4aaOLS_40c7n1yAOA,3902
|
|
@@ -73,14 +73,14 @@ application_sdk/interceptors/.cursor/BUGBOT.md,sha256=pxmUF2c7dtaXAX8yAa1-LBa6FC
|
|
|
73
73
|
application_sdk/observability/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
74
74
|
application_sdk/observability/logger_adaptor.py,sha256=00c0F7maDkp1xrHttW6VQbWFDGr6NkXeDPjmf97ojlY,29989
|
|
75
75
|
application_sdk/observability/metrics_adaptor.py,sha256=5Oz02lUED60duryoVDF9mbD11fpxhbXi7P1609n_15Y,16446
|
|
76
|
-
application_sdk/observability/observability.py,sha256=
|
|
76
|
+
application_sdk/observability/observability.py,sha256=MGxNFPx6pOdpWrpNXZp44NPk3SG4xjA9cKrTeZ1ENK8,23681
|
|
77
77
|
application_sdk/observability/traces_adaptor.py,sha256=0eQJPN-tYA_dV8D3uEa5ZiX9g12NDuLnPaFuQMVDdL0,18242
|
|
78
78
|
application_sdk/observability/utils.py,sha256=JoHEA68cjkXTnAXHzgiULYOzRTk8rG4kPZRvFYah3aU,2505
|
|
79
79
|
application_sdk/observability/decorators/observability_decorator.py,sha256=yd6qfrg1MmH5KcZ5Ydzb0RaBzmxx5FrmiI9qwvZx3EU,8963
|
|
80
|
-
application_sdk/outputs/__init__.py,sha256=
|
|
80
|
+
application_sdk/outputs/__init__.py,sha256=dekaEqJEVAmXQYSy_AohXOHNNI56OXG3Xn27FFRmoPQ,15926
|
|
81
81
|
application_sdk/outputs/iceberg.py,sha256=TdppOMEMfojMhGyBmhWeu1AJQexRyHM-huAYeJmhjdY,5533
|
|
82
82
|
application_sdk/outputs/json.py,sha256=gYDDNOVb8EFxxeOkb6zKWZWjTEVgZLoapFM97_roK4A,10883
|
|
83
|
-
application_sdk/outputs/parquet.py,sha256=
|
|
83
|
+
application_sdk/outputs/parquet.py,sha256=DxcKh1IXPdiXNQJS1HIn6-JRdLkmN4At8uF1zppiZX0,20762
|
|
84
84
|
application_sdk/outputs/.cursor/BUGBOT.md,sha256=KxEC3CIyRSK1YftZou5BgKc6PRXT3qQmBNFJp-HSyYE,11496
|
|
85
85
|
application_sdk/server/__init__.py,sha256=KTqE1YPw_3WDVMWatJUuf9OOiobLM2K5SMaBrI62sCo,1568
|
|
86
86
|
application_sdk/server/.cursor/BUGBOT.md,sha256=p_MMoWUW5G1894WfOKYReZKWCuyJT_OJz3rL5g21NbI,16566
|
|
@@ -157,8 +157,8 @@ application_sdk/workflows/metadata_extraction/__init__.py,sha256=jHUe_ZBQ66jx8bg
|
|
|
157
157
|
application_sdk/workflows/metadata_extraction/sql.py,sha256=6ZaVt84n-8U2ZvR9GR7uIJKv5v8CuyQjhlnoRJvDszc,12435
|
|
158
158
|
application_sdk/workflows/query_extraction/__init__.py,sha256=n066_CX5RpJz6DIxGMkKS3eGSRg03ilaCtsqfJWQb7Q,117
|
|
159
159
|
application_sdk/workflows/query_extraction/sql.py,sha256=kT_JQkLCRZ44ZpaC4QvPL6DxnRIIVh8gYHLqRbMI-hA,4826
|
|
160
|
-
atlan_application_sdk-0.1.
|
|
161
|
-
atlan_application_sdk-0.1.
|
|
162
|
-
atlan_application_sdk-0.1.
|
|
163
|
-
atlan_application_sdk-0.1.
|
|
164
|
-
atlan_application_sdk-0.1.
|
|
160
|
+
atlan_application_sdk-0.1.1rc61.dist-info/METADATA,sha256=sRo4wQ9dNcScMKLwS0nqbceTkr-pbE5rr8voxSMRoqo,5730
|
|
161
|
+
atlan_application_sdk-0.1.1rc61.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
162
|
+
atlan_application_sdk-0.1.1rc61.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
|
163
|
+
atlan_application_sdk-0.1.1rc61.dist-info/licenses/NOTICE,sha256=A-XVVGt3KOYuuMmvSMIFkg534F1vHiCggEBp4Ez3wGk,1041
|
|
164
|
+
atlan_application_sdk-0.1.1rc61.dist-info/RECORD,,
|
{atlan_application_sdk-0.1.1rc59.dist-info → atlan_application_sdk-0.1.1rc61.dist-info}/WHEEL
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|