An installed Generative Data Pack plugin automatically expands the data sent for ingestion.
This GDP plugin detects the execution ID of a Data Job running, and decorates your data product with it. So that, it is now possible to correlate a data record with a particular ingestion Data Job execution ID.
Each ingested dataset gets automatically expanded with a Data Job execution ID micro-dimension. For example:
{
"product_name": "name1",
"product_description": "description1"
}
After installing vdk-gdp-execution-id, one additional field gets automatically appended to your payloads that are
sent for ingestion:
{
"product_name": "name1",
"product_description": "description1",
"gdp_execution_id": "product-ingestion-data-job-1628151700498"
}
The newly-added dimension name is configurable.
Usage
Run
pip install vdk-gdp-execution-id
Create a Data Job and add to its requirements.txt file:
# Python jobs can specify extra library dependencies in requirements.txt file.
# See https://pip.readthedocs.io/en/stable/user_guide/#requirements-files
# The file is optional and can be deleted if no extra library dependencies are necessary.
vdk-gdp-execution-id
Reconfigure the ingestion pre-processing sequence to add the plugin name. For example:
export VDK_INGEST_PAYLOAD_PREPROCESS_SEQUENCE="vdk-gdp-execution-id"
# or
export VDK_INGEST_PAYLOAD_PREPROCESS_SEQUENCE="[...,]vdk-gdp-execution-id"
Note: The recommendation is to add this plugin last (at end-of-sequence), due prior plugins may add new data records. For more info on configurations, see projects/vdk-core/src/vdk/internal/core/config.py.
Example ingestion Data Job 10_python_step.py:
def run(job_input: IJobInput):
# object
job_input.send_object_for_ingestion(
payload={"product_name": "name1", "product_description": "description1"},
destination_table="product")
# tabular data
job_input.send_tabular_data_for_ingestion(
rows=[["name2", "description2"], ["name3", "description3"]],
column_names=["product_name", "product_description"],
destination_table="product")
In case the VDK_INGEST_METHOD_DEFAULT was a relational database,
then you can query the dataset and filter:
# A processing Data Job then filters the ingested dataset by `vdk_gdp_execution_id` column
def run(job_input: IJobInput):
execution_ids = job_input.execute_query("SELECT DISTINCT vdk_gdp_execution_id FROM product")
print(execution_ids)
Configuration
Run vdk config-help - search for those prefixed with "GDP_EXECUTION_ID_" to see what configuration options are available.
Testing
Testing this plugin locally requires installing the dependencies listed in vdk-plugins/vdk-gdp-execution-id/requirements.txt
Run
pip install -r requirements.txt
Example
Find an example data job using vdk-gdp-execution-id plugin in examples/gdp-execution-id-example/.
Metadata
Release files for vdk-gdp-execution-id 0.0.1073094274
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| vdk-gdp-execution-id-0.0.1073094274.tar.gz | 3.8 kB | Without provenance | Details for vdk-gdp-execution-id-0.0.1073094274.tar.gz |
Release files / vdk-gdp-execution-id-0.0.1073094274.tar.gz
| Download URL | vdk-gdp-execution-id-0.0.1073094274.tar.gz |
|---|---|
| Size | 3.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
afe5038c639c4c5c051bb8a52c0c1a5172d5976bc1307d117ddaa4b8768806f8
|
|
BLAKE2b-256 checksum How to use checksums |
0026cc910510cddbf0d108d6b117b546c0441fe1939169a0fdf1f5959777af57
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.13
|
Security for vdk-gdp-execution-id 0.0.1073094274
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.