Alteryx 无法从数据帧写入 SQL/excel
Alteryx not able to write from dataframe to SQL/excel
我制作了一个 Alteryx 工作流程,其中我 运行 在 python 笔记本中编写代码,从网络 API 中提取数据,将 API 提取的输出存储为数据框并尝试通过锚点 1 将其写入 excel 文件。当我 运行 工作流程时出现以下错误:
FileNotFoundError: 缓存数据不可用 -- 运行 使输入数据在 Jupyter notebook 中可用的工作流程 (.\Alteryx_Automation\dsd_runner\jupyterPipes.json)
我是 Alteryx 的新手,非常感谢任何 guidance/suggestions
Here is code that replicates the error and has similar structure to what I have in my notebook
``from ayx import Alteryx
class DataExtract():
def __init__(self):
self.url = 'https://raw.githubusercontent.com/owid/covid-19-data/master/public/data/owid-covid-data.csv'
self.data = dict()
def get_data(self):
self.data['owid'] = pd.read_csv(self.url)
de = DataExtract()
de.get_data()
temp = de.data['owid']
Alteryx.write(temp,1)``
解决了这个问题,我在 python 笔记本中发出 os.chdir() 命令,我的工作目录被更改为我没有写权限的目录。通过跟踪当前目录 ( orig_dir = os.getcwd() ) 然后在脚本末尾发出 os.chdir(orig_dir) 来解决它。此外,对 class 属性进行深度复制也有助于解决该问题。
我制作了一个 Alteryx 工作流程,其中我 运行 在 python 笔记本中编写代码,从网络 API 中提取数据,将 API 提取的输出存储为数据框并尝试通过锚点 1 将其写入 excel 文件。当我 运行 工作流程时出现以下错误:
FileNotFoundError: 缓存数据不可用 -- 运行 使输入数据在 Jupyter notebook 中可用的工作流程 (.\Alteryx_Automation\dsd_runner\jupyterPipes.json)
我是 Alteryx 的新手,非常感谢任何 guidance/suggestions
Here is code that replicates the error and has similar structure to what I have in my notebook
``from ayx import Alteryx
class DataExtract():
def __init__(self):
self.url = 'https://raw.githubusercontent.com/owid/covid-19-data/master/public/data/owid-covid-data.csv'
self.data = dict()
def get_data(self):
self.data['owid'] = pd.read_csv(self.url)
de = DataExtract()
de.get_data()
temp = de.data['owid']
Alteryx.write(temp,1)``
解决了这个问题,我在 python 笔记本中发出 os.chdir() 命令,我的工作目录被更改为我没有写权限的目录。通过跟踪当前目录 ( orig_dir = os.getcwd() ) 然后在脚本末尾发出 os.chdir(orig_dir) 来解决它。此外,对 class 属性进行深度复制也有助于解决该问题。