-
Notifications
You must be signed in to change notification settings - Fork 16.7k
add form_data with query #20014
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add form_data with query #20014
Conversation
| contextual_key = cache_key(session.get("_id"), tab_id, dataset_id, chart_id) | ||
| check_access(datasource_id, chart_id, actor, datasource_type) | ||
| contextual_key = cache_key( | ||
| session.get("_id"), tab_id, datasource_id, chart_id |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
missing datasource_type here
| class CommandParameters: | ||
| actor: User | ||
| dataset_id: int = 0 | ||
| datasource_type: str |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use the DatasourceType enum
| dataset_id: int | ||
| chart_id: Optional[int] | ||
| form_data: str | ||
| datasource_type: str |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use DatasourceType enum
| "datasource_type": "query", | ||
| } | ||
| resp = client.post("api/v1/explore/form_data", json=payload) | ||
| print(resp.data) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove this
| datasource_type = fields.String( | ||
| description=datasource_type_description, | ||
| validate=validate.OneOf(choices=("druid", "table", "view")), | ||
| validate=validate.OneOf(choices=("druid", "table", "view", "query")), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we change these to be the enums as well?
| docker-compose stop superset-tests-worker superset || true | ||
| RESET_DB_CMD="psql \"postgresql://${DB_USER}:${DB_PASSWORD}@127.0.0.1:5432\" <<-EOF | ||
| # docker-compose stop superset-tests-worker superset || true | ||
| psql -U ${DB_USER} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we want to check in these changes?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no, they're just for testing
SUMMARY
BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
TESTING INSTRUCTIONS
ADDITIONAL INFORMATION