Accessing flow variables from within a FS provider?

rmnvncnt
rmnvncnt Registered Posts: 41 ✭✭✭✭✭

I'm currently writing a custom FS provider (see here) and I'd like to use some flow variables into my code. For instance, I'd like to get the project in which the connector is instantiated to customize the path of my data files. I tried naively something like :


from dataiku.fsprovider import FSProvider

import os, shutil
import dataiku

class CustomFSProvider(FSProvider):

def __init__(self, root, config, plugin_config):

self.root = root
self.provider_root = plugin_config['base_path']

base_path = os.path.join(self.provider_root, self.root)
vars = dataiku.dku_flow_variables

But the last line throws an error. Should I use the dataiku api client?

Best,

Romain

Tagged:

Answers

Setup Info
    Tags
      Help me…