provide more details on each of the data sources.

We use the administrative longitudinal employer-employee database collected by the Brazilian Ministry of Labor Rela ̧c ̃ao Anual de Informa ̧c ̃oes Sociais (RAIS) from 2004 to 2017. The RAIS database tracks every Brazilian formal worker and contains information of all firms with employees, identifying each worker’s employing firm at any point in time. The RAIS database includes job records for each worker with worker and firm unique identifiers and all corresponding characteristics. We use information on worker demographic characteristics (gender, age, education), job characteristics (monthly earnings, date of hire and separation and motive for separation, occupation, hours worked), and on location, industry, and state ownership of the firm for which the individual works at each point in time.<sup>5</sup> In order to construct the worker panel database needed for our analysis of the impact of firm foreign shocks on worker outcomes we take several steps. First, we identify in the RAIS database the complete cohort of individuals employed in the tradables sector in 2004 or entering the sector after 2004.<sup>6</sup> For each of these individuals we keep all their work histories until 2017 (including their employment in the non-tradables sector). For each worker, we select the highest paid job in December of each year to identify her/his wage, employing firm, and sector.<sup>7</sup> We designate this dataset as the starting RAIS worker panel database. Second, we construct an auxiliary database that restricts the sample to workers in the 16-65 age range and importantly to workers employed at least once by an exporting firm.<sup>8</sup> Third, we select a 10% random sample of workers from this auxiliary database due to the computational impossibility of using the entire RAIS database.<sup>9</sup> If a worker’s unique identifier is selected for our random sample, her/his entire work history is included. Fourth, our final worker panel database consists of this 10% random sample expanded such that each worker has observations for all consecutive years between the first and last RAIS year (when the worker had a job record) and after the worker’s last RAIS year before 2017 provided the worker’s age does not surpass the retirement age of 65. This expansion of the database by adding observations with zero months worked and missing wages is necessary to construct the cumulative employment and wage measures we use as worker outcomes, described in Section III. Observations with zero

> 5RAIS is a high-quality employer-employee administrative database which has been used extensively in research: e.g., Alvarez et al. (2018); Ulyssea (2018); Dix-Carneiro & Kovak (2019); Dix-Carneiro et al. (2021), and Gerard, Lagos, et al. (2021). As mentioned by Dix-Carneiro & Kovak (2019), firms have an incentive to accurately report to RAIS since they risk fines if they fail to report and workers face similar incentives since their access to government benefits depends on such reporting.

> 6The tradables sector is defined as the set of industries with 2-digit codes below 37 in the Brazilian National Classification of Economic Activities (CNAE) version 1.0 classification.

> 7The choice of the highest paid job in a given month follows that made by previous studies using RAIS (e.g., Dix-Carneiro & Kovak (2019)) as well as that made for similar employer-employee databases for other countries (e.g., Fr ́ıas et al. (2022) for Mexico).

> 8The firm’s exporting status is based on matching RAIS to the customs data as described below.

9Our selection of a random sample of workers is done for computational reasons and it follows the approach of Dix-Carneiro & Kovak (2019) for RAIS data and of Autor et al. (2014) for US social security data.

7