liuyu2013 opened a new issue, #21939:
URL: https://github.com/apache/superset/issues/21939
##I need to modify the data value of the ”Upload a CSV“,such as
`df_empty = g.lytmp
database.db_engine_spec.df_to_sql(
database,
csv_table,
df_empty,
to_sql_kwargs={
"chunksize": 1000,
"if_exists": form.if_exists.data,
"index": form.index.data,
"index_label": form.index_label.data,
},
)
`
[drag & drop image(s) here!]
## and I use the global variable g to save the incoming value, such as
`def create_app(data) -> Flask:
app = SupersetApp(__name__)
with app.app_context():
g.lytmp = data
try:
# Allow user to override our config completely
config_module = os.environ.get("SUPERSET_CONFIG", "superset.config")
app.config.from_object(config_module)
app_initializer = app.config.get("APP_INITIALIZER",
SupersetAppInitializer)(app)
app_initializer.init_app()
return app
# Make sure that bootstrap errors ALWAYS get logged
except Exception as ex:
logger.exception("Failed to create app")
raise ex
`
[And when i run it, its wrong, Error message: '_AppCtxGlobals' object has no
attribute 'g.lytmp', what should i do ,please help me]
## Design input
[describe any input/collaboration you'd like from designers, and
tag accordingly. For design review, add the
label `design:review`. If this includes a design proposal,
include the label `design:suggest`]
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]