Giter VIP home page Giter VIP logo

Comments (5)

frsyuki avatar frsyuki commented on August 16, 2024

Why is that confusing? What do you think better?
"session_time" has concept of years, days, hours, etc. as numbers. They're important because workflow often uses timestamp formatted in text. Therefore digdag CLI shouldn't convert it to local time.
Next run time is different. Formatting means nothing for machines. It's OK to use local time for humans.

from digdag.

danielnorberg avatar danielnorberg commented on August 16, 2024

Maybe it's just that I'm confused about session vs run time.

from digdag.

danielnorberg avatar danielnorberg commented on August 16, 2024

Are there any docs/material where I can read up on the significance of session vs run time?

from digdag.

frsyuki avatar frsyuki commented on August 16, 2024

That is extremely very important concept but no documents!!

Well, for example, you have a workflow that runs every day. It puts results to a table on TD with date's suffix like result_20160412. You'll use create_table: [result_${last_session_date_compact}] option with td> operator.
Query will be like this:

select count(*) from data
where TD_TIME_RANGE(time, '2016-04-12 00:00:00 -0700', '2016-04-13 00:00:00 -0700')

which will be written in workflow definition as following:

select count(*) from data
where TD_TIME_RANGE(time, '${last_session_time}', '${session_time}')

But you noticed that you can't run the workflow at 00:00:00 because data is not ready at 00:00:00. You need to delay the start time for 3 hours. In this case, session_time should be 2016-04-13 00:00:00 -0700, but run time should be 2016-04-13 03:00:00 -0700.

This also happens when you retry the workflow. If you retry it 1 week later, run time is 1 week later but session_time should be consistently 2016-04-13 00:00:00 -0700.

from digdag.

danielnorberg avatar danielnorberg commented on August 16, 2024

Ok, that makes sense, thanks for explaining! =)

from digdag.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.