Forum Discussion
Loading files from json folder
- 2 years ago
randyrettig
I have enacted the old and new scenarios in the attached PBIX, Could you analyse it and let me know if this will help.
If no can you share a sample JSON file[both old and new]? I might need to do make sure i have same input as you.
If this post helps, then please consider Accept it as the solution to help the others find it more quickly. Appreciate you kudos!!
Follow me on LinkedIn!!!
Hi randyrettig
Your transformation steps is using record functions and the new structure is considered a list, Thus the error. Can you paste the whole transformation step from advance editor? make sure to pseudonymize the source or remove it.
Regards,
NG
Sure thing! And thanks for the tip about pseudonymize.
let
Source = Json.Document(Parameter1),
#"Converted to Table" = Table.FromRecords({Source}),
#"Changed Type" = Table.TransformColumnTypes(#"Converted to Table",{{"job_number", Int64.Type}, {"proof.add_job_number_prefix", type logical}, {"account", Int64.Type}, {"customer_name", type text}, {"company_name", type text}, {"job_due_date", type date}, {"sales_rep_code", type text}, {"Set Proof Recipient/s", type text}, {"proof.proof_email_array", type text}, {"proof.pdf_download", type logical}, {"proof.notify_on_comment", type logical}, {"proof.disable_comments", type logical}, {"proof.disable_markup", type logical}, {"proof.brand", type text}, {"operator_proof_comments", type text}, {"proof_expected_due_date", type date}, {"proof.due_date", type date}, {"next_step_on_approval", type text}, {"job.id", Int64.Type}, {"job.job_folder_name", Int64.Type}, {"job.job_id", type text}, {"job.job_number", Int64.Type}, {"job.job_type", type text}, {"job.number_of_files", Int64.Type}, {"job.status", type text}, {"job.submit_type", type text}, {"job.time_received", type datetime}, {"job.updated_at", type datetime}, {"job.user_id", Int64.Type}, {"job.user_notify", type text}, {"job_component.brand_logo_path", type text}, {"job_component.created_at", type datetime}, {"job_component.due_date", type date}, {"job_component.file_name", type text}, {"job_component.id", Int64.Type}, {"job_component.job_id", type text}, {"job_component.processed", Int64.Type}, {"job_component.processed_id", type text}, {"job_component.status", type text}, {"job_component.thumbnail_generated", Int64.Type}, {"proof.user_id", Int64.Type}, {"proof.token", type text}, {"proof.udf_9", Int64.Type}, {"settings.switch_server_address", type text}, {"settings.updated_at", type datetime}, {"settings.web_server_root_path", type text}, {"settings_preflight.created_at", type datetime}, {"settings_preflight.id", Int64.Type}, {"settings_preflight.review_bypass_on_failed", Int64.Type}, {"settings_preflight.review_bypass_on_passed", Int64.Type}, {"settings_preflight.review_bypass_on_warning", Int64.Type}, {"settings_preflight.updated_at", type datetime}, {"settings_signoff_proof.id", Int64.Type}, {"settings_signoff_proof.multiproof_response_delay_in_mins", Int64.Type}, {"settings_signoff_proof.notify_on_comments", Int64.Type}, {"settings_signoff_proof.notify_on_comments_delay_in_mins", Int64.Type}, {"settings_signoff_proof.number_days_to_remind", Int64.Type}, {"settings_signoff_proof.number_days_to_warn_due_date", Int64.Type}, {"settings_signoff_proof.signoff_web_address", type text}, {"settings_signoff_proof.updated_at", type datetime}, {"settings_signoff_quote.created_at", type datetime}, {"settings_signoff_quote.enable_component_upload", Int64.Type}, {"settings_signoff_quote.id", Int64.Type}, {"settings_signoff_quote.mis_integration", type text}, {"settings_signoff_quote.notify_on_comments", Int64.Type}, {"settings_signoff_quote.options_from_mis", Int64.Type}, {"settings_signoff_quote.signoff_quotes_web_address", type text}, {"settings_signoff_quote.updated_at", type datetime}, {"settings_utransfer.created_at", type datetime}, {"settings_utransfer.days_before_expiration", Int64.Type}, {"settings_utransfer.enable_component_upload", Int64.Type}, {"job_component.updated_at", type datetime}, {"job_component.user_email", type text}, {"job_component.user_id", Int64.Type}, {"job_component.user_notify", type text}, {"job_component.version", Int64.Type}, {"jobnumber_componentnumber", type text}, {"proof.email_notes", type text}, {"proof.email_subject", type text}, {"proof.multi_proof_id", type text}, {"proof.number_of_pages", Int64.Type}, {"proof.pdf_review_url", type text}, {"proof.proof_folder_name", type text}, {"proof.proof_id", type text}, {"proof.proof_original_name", type text}, {"proof.proof_original_name.Extension", type text}, {"proof.proof_original_name.Name", type text}, {"proof.proof_original_name.NameProper", type text}, {"proof.proof_version", Int64.Type}, {"proof.response_email_subject", type text}, {"proof.status", type text}, {"settings.number_days_to_warn_due_date", Int64.Type}, {"settings.sidebar_default_font_color", type text}, {"settings.sidebar_default_hover_color", type text}, {"settings.sidebar_font_color", type text}, {"settings.sidebar_hover_color", type text}, {"job_component.unique_id", type text}, {"proof.status_updated_at", type datetime}, {"proof.status_notified_at", type datetime}, {"proof.decision_by", Int64.Type}, {"settings_signoff_proof.created_at", type datetime}, {"settings_signoff_proof.default_proof_recipient", type text}, {"settings_signoff_proof.disable_comments", Int64.Type}, {"settings_signoff_proof.disable_markups", Int64.Type}, {"settings_signoff_proof.download_pdf", Int64.Type}, {"settings_signoff_proof.due_date_number_of_days", Int64.Type}, {"settings_utransfer.id", Int64.Type}, {"settings_utransfer.job_component_default", type text}, {"settings_utransfer.job_component_external_data_data_source", Int64.Type}, {"settings_utransfer.job_description_default", type text}, {"settings_utransfer.job_description_external_data_data_source", Int64.Type}, {"settings_utransfer.job_description_external_data_data_source_operation", Int64.Type}, {"settings_utransfer.job_description_external_data_data_source_operation_query", type text}, {"settings_utransfer.job_number_default", type text}, {"settings_utransfer.job_number_external_data_data_source", Int64.Type}, {"settings_utransfer.job_number_external_data_data_source_operation", Int64.Type}, {"settings_utransfer.job_number_external_data_data_source_operation_custom_query", type text}, {"settings_utransfer.mis_integration", type text}, {"settings_utransfer.updated_at", type datetime}, {"settings_utransfer.utransfer_web_address", type text}, {"user.email", type text}, {"user.first_name", type text}, {"user.id", Int64.Type}, {"user.last_name", type text}, {"ArrivalTime", type datetime}, {"BaseFolder", type text}, {"ShouldContain", Int64.Type}, {"CreationTime", type datetime}, {"proof.component_unique_id", type text}, {"proof.job_number", Int64.Type}, {"proof.updated_at", type datetime}, {"proof.created_at", type datetime}, {"aF.user_notify", type text}, {"assigned_operator", type text}, {"component_number", Int64.Type}, {"job.brand", type text}, {"job.created_at", type datetime}, {"job.due_date", type date}, {"job.file_name", type text}, {"job.form_id", Int64.Type}, {"job.form_name", type text}, {"proof.web_safe_name", type text}, {"settings.application_folder_root_path", type text}, {"settings.backup_path", type text}, {"settings.backup_time", type time}, {"settings.color_current_navbar", type text}, {"settings.color_current_sidebar", type text}, {"settings.color_default_navbar", type text}, {"settings.color_default_sidebar", type text}, {"settings.logo_header", type text}, {"settings.logo_login", type text}, {"settings.logo_system", type text}, {"proof.id", Int64.Type}, {"proof.last_comment_at", type datetime}, {"settings.created_at", type datetime}, {"settings.due_date_number_of_days", Int64.Type}, {"settings.font_default_size", type text}, {"settings.font_size", type text}, {"settings.header_default_font_color", type text}, {"settings.header_font_color", type text}, {"settings.header_logo", type text}, {"settings.id", Int64.Type}, {"settings.keep_all_backups_for_days", Int64.Type}, {"settings.login_logo", type text}, {"proof.proof_email_array_add", type any}, {"proof.udf_1", type any}, {"proof.udf_10", type any}, {"proof.udf_2", type any}, {"proof.udf_3", type any}, {"proof.udf_4", type any}, {"proof.udf_5", type any}, {"proof.udf_6", type any}, {"proof.udf_7", type any}, {"proof.udf_8", type any}, {"sales_rep_email", type any}, {"settings.allowed_domains", type any}, {"settings.switch_helper_address", type any}, {"proof.company_name", type any}, {"proof.footer", type any}, {"proof.comments_notified_at", type any}, {"proof.multigroup_update_notified_at", type any}, {"n_comments", Int64.Type}, {"comments.0.id", Int64.Type}, {"comments.0.proof_id", Int64.Type}, {"comments.0.comments", type text}, {"comments.0.created_at", type datetime}, {"comments.0.user_name", type text}, {"comments.0.user_id", Int64.Type}, {"comments.0.markers", type any}, {"comments.0.type", type text}, {"comments.0.user_profile_picture", type text}, {"comments.1.id", Int64.Type}, {"comments.1.proof_id", Int64.Type}, {"comments.1.comments", type text}, {"comments.1.created_at", type datetime}, {"comments.1.user_name", type text}, {"comments.1.user_id", Int64.Type}, {"comments.1.markers", type any}, {"comments.1.type", type text}, {"comments.1.user_profile_picture", type text}, {"comments.2.id", Int64.Type}, {"comments.2.proof_id", Int64.Type}, {"comments.2.comments", type text}, {"comments.2.created_at", type datetime}, {"comments.2.user_name", type text}, {"comments.2.user_id", Int64.Type}, {"comments.2.markers", type text}, {"comments.2.type", type text}, {"comments.2.user_profile_picture", type text}, {"comments.3.id", Int64.Type}, {"comments.3.proof_id", Int64.Type}, {"comments.3.comments", type text}, {"comments.3.created_at", type datetime}, {"comments.3.user_name", type text}, {"comments.3.user_id", Int64.Type}, {"comments.3.markers", type text}, {"comments.3.type", type text}, {"comments.3.user_profile_picture", type text}, {"comments.4.id", Int64.Type}, {"comments.4.proof_id", Int64.Type}, {"comments.4.comments", type text}, {"comments.4.created_at", type datetime}, {"comments.4.user_name", type text}, {"comments.4.user_id", Int64.Type}, {"comments.4.markers", type text}, {"comments.4.type", type text}, {"comments.4.user_profile_picture", type text}, {"comments.5.id", Int64.Type}, {"comments.5.proof_id", Int64.Type}, {"comments.5.comments", type text}, {"comments.5.created_at", type datetime}, {"comments.5.user_name", type text}, {"comments.5.user_id", Int64.Type}, {"comments.5.markers", type text}, {"comments.5.type", type text}, {"comments.5.user_profile_picture", type text}, {"comments.6.id", Int64.Type}, {"comments.6.proof_id", Int64.Type}, {"comments.6.comments", type text}, {"comments.6.created_at", type datetime}, {"comments.6.user_name", type text}, {"comments.6.user_id", Int64.Type}, {"comments.6.markers", type text}, {"comments.6.type", type text}, {"comments.6.user_profile_picture", type text}, {"comments.7.id", Int64.Type}, {"comments.7.proof_id", Int64.Type}, {"comments.7.comments", type text}, {"comments.7.created_at", type datetime}, {"comments.7.user_name", type text}, {"comments.7.user_id", Int64.Type}, {"comments.7.markers", type text}, {"comments.7.type", type text}, {"comments.7.user_profile_picture", type text}, {"comments.8.id", Int64.Type}, {"comments.8.proof_id", Int64.Type}, {"comments.8.comments", type text}, {"comments.8.created_at", type datetime}, {"comments.8.user_name", type text}, {"comments.8.user_id", Int64.Type}, {"comments.8.markers", type text}, {"comments.8.type", type text}, {"comments.8.user_profile_picture", type text}, {"comments.9.id", Int64.Type}, {"comments.9.proof_id", Int64.Type}, {"comments.9.comments", type text}, {"comments.9.created_at", type datetime}, {"comments.9.user_name", type text}, {"comments.9.user_id", Int64.Type}, {"comments.9.markers", type text}, {"comments.9.type", type text}, {"comments.9.user_profile_picture", type text}, {"comments.10.id", Int64.Type}, {"comments.10.proof_id", Int64.Type}, {"comments.10.comments", type text}, {"comments.10.created_at", type datetime}, {"comments.10.user_name", type text}, {"comments.10.user_id", Int64.Type}, {"comments.10.markers", type text}, {"comments.10.type", type text}, {"comments.10.user_profile_picture", type text}, {"comments.11.id", Int64.Type}, {"comments.11.proof_id", Int64.Type}, {"comments.11.comments", type text}, {"comments.11.created_at", type datetime}, {"comments.11.user_name", type text}, {"comments.11.user_id", Int64.Type}, {"comments.11.markers", type text}, {"comments.11.type", type text}, {"comments.11.user_profile_picture", type text}, {"comments.12.id", Int64.Type}, {"comments.12.proof_id", Int64.Type}, {"comments.12.comments", type text}, {"comments.12.created_at", type datetime}, {"comments.12.user_name", type text}, {"comments.12.user_id", Int64.Type}, {"comments.12.markers", type text}, {"comments.12.type", type text}, {"comments.12.user_profile_picture", type text}, {"comments.13.id", Int64.Type}, {"comments.13.proof_id", Int64.Type}, {"comments.13.comments", type text}, {"comments.13.created_at", type datetime}, {"comments.13.user_name", type text}, {"comments.13.user_id", Int64.Type}, {"comments.13.markers", type text}, {"comments.13.type", type text}, {"comments.13.user_profile_picture", type text}, {"comments.14.id", type any}, {"comments.14.proof_id", Int64.Type}, {"comments.14.comments", type text}, {"comments.14.created_at", type datetime}, {"comments.14.user_name", type text}, {"comments.14.user_id", Int64.Type}, {"comments.14.markers", type any}, {"comments.14.type", type any}, {"comments.14.user_profile_picture", type text}, {"thumbnail_base64", type text}})
in
#"Changed Type"