rs_workflows/catalog_flow.md
Catalog flow implementation
catalog_search(env, catalog_cql2, error_if_empty=False, collections=None)
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
|
collections
|
list[str] | None
|
list of collection names to search in |
None
|
Source code in docs/rs-client-libraries/rs_workflows/catalog_flow.py
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 69 70 71 72 73 74 75 76 77 78 79 80 | |
catalog_search_task(*args, **kwargs)
async
See: search
Source code in docs/rs-client-libraries/rs_workflows/catalog_flow.py
193 194 195 196 | |
check_and_create_collection(flow_env, collection_name)
async
Check if a collection exists, and create it if it doesn't.
Source code in docs/rs-client-libraries/rs_workflows/catalog_flow.py
273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 | |
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
199 200 201 202 203 204 205 206 207 208 209 210 | |
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
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 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 | |
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
213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 | |