rs_workflows/catalog_flow.md
Catalog flow implementation
catalog_search(env, catalog_cql2, error_if_empty=False)
async
Search Catalog items.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
env
|
FlowEnvArgs
|
Prefect flow environment (at least the owner_id is required) |
required |
catalog_cql2
|
dict
|
CQL2 filter. |
required |
error_if_empty
|
bool
|
Raise a ValueError if the results are empty. |
False
|
Source code in docs/rs-client-libraries/rs_workflows/catalog_flow.py
35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 | |
catalog_search_task(*args, **kwargs)
async
See: search
Source code in docs/rs-client-libraries/rs_workflows/catalog_flow.py
151 152 153 154 | |
get_item(env, target_collection, item)
async
Get a catalog item by its ID.
Source code in docs/rs-client-libraries/rs_workflows/catalog_flow.py
157 158 159 160 161 162 163 164 165 166 167 168 | |
publish(env, generated_product_to_collection_identifier, items_metadata)
async
Publish items to the catalog
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
env
|
FlowEnvArgs
|
Prefect flow environment |
required |
collection
|
Catalog collection identifier where the items are published |
required | |
items_metadata
|
list[DprProcessedItemMetadata]
|
List of DprProcessedItemMetadata containing items to publish |
required |
Source code in docs/rs-client-libraries/rs_workflows/catalog_flow.py
76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 | |
resolve_collection(item_metadata, generated_product_to_collection_identifier)
Resolve the target collection for a given product metadata.
The matching logic uses both output_product_id and product_type from the DprProcessedItemMetadata to find the corresponding FlowGeneratedProduct. Wildcards ('*') are supported for product_type in FlowGeneratedProduct.
Returns:
| Type | Description |
|---|---|
str
|
The resolved target collection name. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If the product cannot be resolved to any collection. |
Source code in docs/rs-client-libraries/rs_workflows/catalog_flow.py
171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 | |