Sign up to take part
Registered users can ask their own questions, contribute to discussions, and be part of the Community!
Registered users can ask their own questions, contribute to discussions, and be part of the Community!
I would like to create massive dataiku dataset using python interpretor, without using creating them manually in the recipe
Note: The following command works only if I have created a dataiku dataset called "myoutputdataset" in my recipe. But, my problem is to create a new dataiku Dataset with out creating it before in my recipe and save my pandas dataframe in it
output_ds = dataiku.Dataset("myoutputdataset")
output_ds.write_with_schema(my_dataframe)
Hi,
"myoutputdataset" and "my_dataframe" are just placeholders that need to be changed with your own names / code.
For instance, the following (complete) recipe has a output DSS dataset called "results" which is filled by a Pandas dataframe called "o":
# -*- coding: utf-8 -*-
import dataiku
import pandas as pd
# Recipe inputs
titanic = dataiku.Dataset("titanic")
df = titanic.get_dataframe()
# Some Python code
# ...
o = df.sort('PassengerId')
# Recipe outputs
output = dataiku.Dataset("results")
output.write_with_schema(o)
Hope this helps.
@N_JAYANTH Any luck in finding a solution?
Exception: None: b'dataset does not exist: EGMED.s22'
I know that error happens because there is no s22 place holder but my question is can I create that place hold automatically?
The "results" Dataset is not created by the Python code, but when you create your Recipe first: