https://slingdata.io logo
Hi! 👋 I'm trialing the CLI pro and
# sling-help
m
Hi! 👋 I'm trialing the CLI pro and running into some issues getting the token to recognize when running in dagster-sling / dagster-embedded-elt. Will add some details this thread - assuming i'm missing a step somewhere
I have the token set as an env var but it didn't seem to catch it there. I've also tried passing it through the config file as well like this:
Copy code
yml
source: product__prod_us
target: snowflake__prod
defaults:
  mode: incremental
  object: sling__product__prod_us.{stream_table}
  primary_key:
    - id
  update_key: updatedAt

streams:
  public.comments:
    source_options:
      batch_size: 500000
      chunk_size: 14d # 14 days
    target_options:
      batch_limit: 500000
    select:
      - col1
      - col2
      - col3
      - col4
      - col5

env:
  SLING_CLI_TOKEN: ${SLING_CLI_TOKEN}
Here's the error I'm getting back in the dagster UI:
Copy code
sh
Exception: {"lvl":"info","time":"2025-08-11T17:33:24Z","msg":"Sling CLI | https://slingdata.io"}
{"lvl":"warn","time":"2025-08-11T17:33:24Z","msg":"error validating cli token: illegal base64 data at input byte 8"}

fatal:
~ could not generate chunk ranges: public.comments
invalid or missing token. Please see https://docs.slingdata.io/sling-cli/cli-pro to enable chunking
Sling command failed
Currently running on
1.4.16
f
hey, interesting, your token works fine when running with the CLI, correct? Just to make sure.
m
Will try that locally now 👀
Sorry for the delay, it appears to be working - did I pass the chunk_size arg in correctly?
Copy code
zsh
sling run \
  --src-conn product__360_stage_us \
  --src-stream "public.comments" \
  --tgt-conn ARTICULATE_ANALYTICS_SNOWFLAKE_DEV \
  --tgt-object "sling__product__360_stage_us.comments" \
  --mode full-refresh \
  --primary-key id \
  --update-key createdAt \
  --select "id,createdAt" \
  --batch-size 50000 \
  --max-rows 100000 \
  --chunk-size 7d
3:37PM WRN could not load connection DUCKDB:
Property value not provided: instance
3:37PM INF Sling CLI | https://slingdata.io
3:37PM INF connecting to source database (postgres)
3:37PM INF connecting to target database (snowflake)
3:37PM INF reading from source database
3:37PM INF writing to target database [mode: full-refresh]
3:37PM INF created table "SLING__PRODUCT__360_STAGE_US"."COMMENTS_TMP"
3:37PM INF streaming data
8s 70,995 10458 r/s 4.8 MB
3:37PM INF created table "SLING__PRODUCT__360_STAGE_US"."COMMENTS"
3:37PM INF inserted 70995 rows into "SLING__PRODUCT__360_STAGE_US"."COMMENTS" in 16 secs [4,192 r/s] [4.8 MB]
3:37PM INF execution succeeded
f
hmm, well no,
--batch-size
,
--chunk-size
and
--max-rows
are not compatible flags, you'd have to do
--src-options '{ batch_size: 50000, chunk_size: 14d }'
. You can actually just save your replication file and do
sling run -r /path/to/file.yaml -d
m
That succeeded as well ✅ not sure if you see the token used on your end now
f
do you see
CLI Pro token validated
?
it should have split the stream into multiple streams
f
ah sling version says
1.4.4
, could you upgrade and try again?
sling update
m
ah whoops, haven't updated my local in a while - updating now!
That worked! ✅
f
cool 👍
m
So likely a my env var getting lost in the dagster env context or version issue?
f
so back to dagster, something is not being transmitted correctly
the
dagster-sling
package is managed by the Dagster team
try setting a env var
SLING_CLI_TOKEN
machine wide?
or, process wide?
not sure if you're using dagster self-hosted or not, you could also see the env.yaml, and put the
variables
section, see https://docs.slingdata.io/concepts/replication/runtime-variables#definition
like
SLING_CLI_TOKEN
under
variables
, this should be picked up by sling
m
self hosted. it should be set globally but i'll retrace my steps. i'll give the
variables
section a try too 👀 thank you @flarco ! 🙏