https://slingdata.io logo
Hi, Is there a way to provide for a
# sling-help
m
Hi, Is there a way to provide for a stream display name that can be used later on in query hook?
f
hey @MarikT94 , in post query under that stream, you can use
{ stream.name }
m
but stream name can be a little bit be messy when using wildcards for files.. so the question is if I can define the dipslay name of the stream also and get it via hook?
thanks for fast response!
f
hmm, not really. There is
description
, but you can't use that in hook. I'll add that for next release.
m
Perfect. In addition to that, I is there also stream_id or any identifier for streams? This and the other related fields are important for our monitoring process, but they are currently missing on our side.
f
the best way is to use
execution.id
+
stream.name
as PK
m
This is per run.. I though about common id for same stream. Also I forgot to mentioned the replication level. I noticed there is also no identification and/or name. Is there something that we can get from hook based on replication? I saw the full file path but i need aomething clean.. may be i missing something?
f
ah ok, in next version, a few fixes:
execution.file_path
and
execution.file_name
are added. there will be also function
slugify
, which will remove any special chars (like slash, dots, etc). so you'll be able to do
{ slugify(execution.file_path) }
. Or hash if you prefer with
{ hash(execution.file_path, "md5") }
m
Perfect, Thanks!