• Products
    • Observe

      Keep tabs on your world in real-time, reducing a cacophony of activity from massive amounts of raw content into orderly, easy to consume data

    • Orient

      Our low-code, composable, distributed, and event-driven predictive analytics workflow engine mines for actionable insights hidden in data at any scale

    • Dominate

      This insight interaction and decision support application takes you beyond self-service, visual exploration of piles of insights & provides auto-ML powered actionable, scenario-specific advice to achieve the goals you specify

  • Markets
    • Government

      At BigBear.ai, we take pride in providing mission-critical services and solutions to our government customers. This includes Data Analytics, Systems Engineering, and Cyber services.

    • Commercial Markets

      BigBear.ai provides innovative AI solutions to companies across commercial markets, ranging from Space to Media to Shipping and Transportation.

  • Company
    Just Announced
    Tony Barret
    Press Release
    BigBear.ai Names Former Intelligence Officer Tony Barrett as President of Cyber and Engineering Sector
    • Col – 1
      • About

        We help governments and businesses make the decisions that change markets and define outcomes

      • Investor Relations

        We operationalize artificial intelligence and machine learning at scale through our end-to-end platform

      • Partners

        We work with our technology partners to customize products for the private and public sectors

    • Col – 2
      • Team

        Our executive team brings decades of world-class experience

      • Newsroom

        News articles from our press room

  • Careers
    Apply Now
    AWS SME
    Location:

    Columbia, Maryland

    Description:

    We have an exciting opportunity for an AWS SME to work as part of a small team in a fast-paced, research, development, and data evaluation environment. We are seeking an AWS SME to join our AWS Cloud Center of Excellence. This position will be based out of Columbia, Maryland and is fully remote.

    Category: Engineering

    • Col – 1
      • Explore Jobs
        • Returning Applicant Login
        • Current Employee Login
      • Culture
      • Benefits
      • Military and Veterans
      • Product and Technology
      • Join Our Talent Community

        Sign up to receive personalized alerts and stay up to date on job openings right for you

  • Resources
    Featured
    Video
    Panel Discussion: AI/ML Applications to Support DHS
    • Col – 1
      • Blog

        See what’s new in artificial intelligence, machine learning, and data analytics

      • Resource Library

        Browse our resource library and discover more about our products and solutions

      • Newsroom

        News articles from our press room

  • Contact
BigBear.ai
  • Products
    • Observe

      Keep tabs on your world in real-time, reducing a cacophony of activity from massive amounts of raw content into orderly, easy to consume data

    • Orient

      Our low-code, composable, distributed, and event-driven predictive analytics workflow engine mines for actionable insights hidden in data at any scale

    • Dominate

      This insight interaction and decision support application takes you beyond self-service, visual exploration of piles of insights & provides auto-ML powered actionable, scenario-specific advice to achieve the goals you specify

  • Markets
    • Government

      At BigBear.ai, we take pride in providing mission-critical services and solutions to our government customers. This includes Data Analytics, Systems Engineering, and Cyber services.

    • Commercial Markets

      BigBear.ai provides innovative AI solutions to companies across commercial markets, ranging from Space to Media to Shipping and Transportation.

  • Company
    Just Announced
    Tony Barret
    Press Release
    BigBear.ai Names Former Intelligence Officer Tony Barrett as President of Cyber and Engineering Sector
    • Col – 1
      • About

        We help governments and businesses make the decisions that change markets and define outcomes

      • Investor Relations

        We operationalize artificial intelligence and machine learning at scale through our end-to-end platform

      • Partners

        We work with our technology partners to customize products for the private and public sectors

    • Col – 2
      • Team

        Our executive team brings decades of world-class experience

      • Newsroom

        News articles from our press room

  • Careers
    Apply Now
    AWS SME
    Location:

    Columbia, Maryland

    Description:

    We have an exciting opportunity for an AWS SME to work as part of a small team in a fast-paced, research, development, and data evaluation environment. We are seeking an AWS SME to join our AWS Cloud Center of Excellence. This position will be based out of Columbia, Maryland and is fully remote.

    Category: Engineering

    • Col – 1
      • Explore Jobs
        • Returning Applicant Login
        • Current Employee Login
      • Culture
      • Benefits
      • Military and Veterans
      • Product and Technology
      • Join Our Talent Community

        Sign up to receive personalized alerts and stay up to date on job openings right for you

  • Resources
    Featured
    Video
    Panel Discussion: AI/ML Applications to Support DHS
    • Col – 1
      • Blog

        See what’s new in artificial intelligence, machine learning, and data analytics

      • Resource Library

        Browse our resource library and discover more about our products and solutions

      • Newsroom

        News articles from our press room

  • Contact
Home Blog URL Tips and Tricks
Blog

URL Tips and Tricks

Kyle Eckenrode
September 7, 2019
  • Share
  • Share

URL manipulation is one of those things you may not even think about until it becomes the biggest headache of your week. Thankfully KNIME has some things we can use to make life easier. Here are some of the common situations you could encounter when working with URLs in KNIME and how to handle them.

The Workflow Needs to Run in the Any System’s KNIME Directory

Perhaps the most common issue you’ll run into, most of the time you won’t want a KNIME workflow to only run on your machine or server. You still want it to use a specific file structure beyond a certain point, but you don’t want to hard-code everything before that.

KNIME has a remarkably simple way of letting you deal with this in the form of standard variable keywords. Take this Create Directory node as an example:

Create-Directory_495x400
Figure 1

This syntax uses two such variables, “knime://” and “knime.workflow”. The former, “knime://”, is the system’s KNIME mount point, specified when you open your work space in the editor. This mount point almost entirely solves the problem on its own. The second keyword, “knime.workflow”, is the directory of the current workflow. Without having to define anything on your own, KNIME provides these. We can then use generic manipulation syntax like “..” to climb back up the directory structure. In this example a directory named “temp” will be made in the mount point directory which KNIME will store as a variable called “temp_dir” for this workflow. Now the rest of your workflow can reference this directory freely on any system that we run the workflow on.

The File Path to the Workflow Contains a Space, and KNIME Can’t Find the Location

Sometimes your workflow will be mounted in a URL that contains a space, and anyone who has worked with those before can tell you they’re trouble. KNIME inherently doesn’t account for these, as far it knows you’re supplying it intended syntax and you are getting intended results. Luckily there is an easy workaround for this in the URL to File Path nodes.

CD-Workflow_500x268
Figure 2

After creating our new directory “temp”, we can use a URL to File Path (Variable) node to turn the URL into a proper file path.

URL-to-file_480x400
Figure 3

Simply choose the variable you want to clean up and you’ll end up with a nice file path for KNIME to reference with proper syntax, overwriting the variable with the output. You could also do this with some String Manipulation and Java Edit nodes if you want to alter multiple variables at once.

The Workflow Needs to Run in Windows and Linux

For as long as we live in a bipartisan world of popular operating systems, we will need to deal with this thorn in our side. KNIME doesn’t have a node to handle this inherently, but with the help of our old friend the Java Edit nodes this can be handled elegantly. The Java Edit Variable (Simple) node is quite efficient for changing a single variable, as shown below, building on our previous examples:

CD-workflow2_500x203
Figure 4
Java-Edit-Variable_475x400
Figure 5

As KNIME is built on Java we can use any of the libraries in Java to accomplish this. Just as before this will overwrite the “temp_dir” variable with our desired output, making the workflow Windows and Linux compatible.

Leave a comment Cancel reply

Your email address will not be published. Required fields are marked *

BigBear.ai

2022 BigBear.ai • All Rights Reserved.

  • Privacy Policy
Corporate Headquarters

6811 Benjamin Franklin Drive, Suite 200
Columbia, MD 21046
Tel: 410.312.0885 • Email: [email protected]

CareersContact