@@ -385,7 +385,7 @@ class DataFrame:
385385 >>> with tempfile.NamedTemporaryFile(mode="w+t") as t:
386386 ... t.writelines(["id1, Product A", "\\ n" "id2, Product B"])
387387 ... t.flush()
388- ... create_stage_result = session.sql("create temp stage test_stage").collect()
388+ ... create_stage_result = session.sql("create or replace temp stage test_stage").collect()
389389 ... put_result = session.file.put(t.name, "@test_stage/test_dir")
390390
391391 Example 1
@@ -418,7 +418,7 @@ class DataFrame:
418418 |2 |two |
419419 ---------------------
420420 <BLANKLINE>
421- >>> session.range(1, 10, 2).to_df("col1").show()
421+ >>> session.range(1, 10, 2).to_df("col1").sort("col1"). show()
422422 ----------
423423 |"COL1" |
424424 ----------
@@ -4641,7 +4641,7 @@ def write(self) -> DataFrameWriter:
46414641 |3 |4 |
46424642 -------------
46434643 <BLANKLINE>
4644- >>> stage_created_result = session.sql("create temp stage if not exists test_stage").collect()
4644+ >>> stage_created_result = session.sql("create or replace temp stage test_stage").collect()
46454645 >>> df.write.copy_into_location("@test_stage/copied_from_dataframe") # default CSV
46464646 [Row(rows_unloaded=2, input_bytes=8, output_bytes=28)]
46474647 """
@@ -4689,7 +4689,7 @@ def copy_into_table(
46894689 >>> with tempfile.NamedTemporaryFile(mode="w+t") as t:
46904690 ... t.writelines(["id1, Product A", "\\ n" "id2, Product B"])
46914691 ... t.flush()
4692- ... create_stage_result = session.sql("create temp stage if not exists test_stage").collect()
4692+ ... create_stage_result = session.sql("create or replace temp stage test_stage").collect()
46934693 ... put_result = session.file.put(t.name, "@test_stage/copy_into_table_dir", overwrite=True)
46944694 >>> # user_schema is used to read from CSV files. For other files it's not needed.
46954695 >>> from snowflake.snowpark.types import StringType, StructField, StringType
0 commit comments